File: Makefile

package info (click to toggle)
debian-edu-install 1.821
  • links: PTS, VCS
  • area: main
  • in suites: jessie-kfreebsd
  • size: 1,164 kB
  • sloc: sh: 1,327; makefile: 101
file content (98 lines) | stat: -rw-r--r-- 2,804 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
#
# Install file for Debian-Edu debconf override package
#

INSTALL     = install
INSTALL_DATA= install -m 644

libdir      = /usr/lib
templatedir = /usr/share/debconf/templates
pkglibdir   = $(libdir)/debian-edu-install
sbindir     = /usr/sbin
sysconfdir  = /etc

PART_RECIPES = \
        90edumain \
        92edumain+ws \
        96eduwork \
        91edumain+ltsp \
        94edultsp \
        97minimal \
        98edustandalone

PART_ARCHES = \
        recipes \
        recipes-powerpc-powermac_newworld \
        recipes-powerpc-prep

WRITE_ARCH_RECIPE = \
	sed -e "/>*>ARCH SPECIFIC<*</ r lib/partman/$$partarch-specific" \
	    -e '/>*>ARCH SPECIFIC<*</ d' \
	lib/partman/common/$$partrecipe > lib/partman/$$partarch/$$partrecipe

# Created using 'file * */*|grep Bourne|cut -d: -f1'
SCRIPTS = $(shell file * */*|egrep 'Bourne|POSIX'|cut -d: -f1)

DEFAULTS = \
	common networked main-server workstation thin-client-server \
	standalone ltsp-chroot

all: check
check: update-partman-recipes check-scripts # check-defaults

install: 
	for profile in $(DEFAULTS) ; do \
	    $(INSTALL_DATA) preseed-values/defaults.$$profile $(DESTDIR)$(pkglibdir)/; \
	done
	$(INSTALL_DATA) version $(DESTDIR)$(pkglibdir)

debian-edu-profile.templates: debian/debian-edu-profile-udeb.templates
	(cd debian; po2debconf debian-edu-profile-udeb.templates) > $@

.PHONY: profile-demo
profile-demo: debian-edu-profile.templates
	chmod a+x ./debian-edu-profile
	DEBIAN_FRONTEND=dialog DEBCONF_DEBUG=developer /usr/share/debconf/frontend ./debian-edu-profile
	rm -f debian-edu-profile.templates

# This check need write access to the debconf database.
check-defaults:
	for profile in $(DEFAULTS) ; do \
	    tools/debconf-load-defaults -c preseed-values/defaults.$$profile; \
	done

# Detect typos in /bin/sh scripts
check-scripts:
	for script in $(SCRIPTS) ; do \
		dash -n $$script ; \
	done

update-partman-recipes: lib/partman/common/* lib/partman/recipes*-specific
	for partarch in $(PART_ARCHES) ; do \
            for partrecipe in $(PART_RECIPES) ; do \
               $(WRITE_ARCH_RECIPE) ;\
            done ; \
        done
	LC_ALL=C printf "Last made $@ `date` for:\n$(?F)\n" > $@	# Avoid redundant makes.

install-partman-recipes: update-partman-recipes
	for partarch in $(PART_ARCHES) ; do \
		$(INSTALL_DATA) lib/partman/$$partarch/* $(DESTDIR)/lib/partman/$$partarch ;\
        done

minimum-diskreq:
	@echo "Minimum disk requirements, in MiB:"
	@for profile in lib/partman/recipes*/* ; do \
	  req=$$(grep '^[0-9]' $$profile |awk '{ sum=sum+$$1} END { print sum }') ; \
	  echo "$$req	$$profile" ; \
	done

status:
	( for f in debian/po/*.po; do \
		echo -n $$f:; LANG=C msgfmt --statistics -o /dev/null $$f 2>&1 ; \
	done ) | egrep 'fuzzy|untranslated' || true
dist:
	debuild -us -uc

clean:
	$(RM) *~