File: Makefile

package info (click to toggle)
debian-edu-install 0.646
  • links: PTS
  • area: main
  • in suites: sarge
  • size: 2,612 kB
  • ctags: 51
  • sloc: sh: 1,442; perl: 727; makefile: 175
file content (109 lines) | stat: -rw-r--r-- 3,233 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
99
100
101
102
103
104
105
106
107
108
109
#
# Install file for Debian-Edu debconf override package
#

INSTALL     = install
INSTALL_DATA= install -m 644

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

FRAGMENTS = 06debian-edu-questions 07debian-edu \
	11debian-edu-auto 16debian-edu-interactive \
	21debian-edu-auto 25debian-edu-insert-cd \
	60_avoid_pkgsel 65debian-edu-inst 76debian-edu-config \
	85debian-edu 87debian-edu-check \
	88debian-edu-reporterr 99zdebian-edu-reboot

COMMON    = debian-edu-common
INSTALLSCRIPT = debian-edu-lessdisks debian-edu-winbind

SBINFILES = \
	debconf-load-defaults \
	debconf-save-answers \
	debconf-set-frontend \
	dpkg-selectforinstall \
	lvm-initialize-debian-edu

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

DEFAULTS = \
	common networked main-server workstation thin-client-server \
	standalone standalone-extras lessdisks-server lessdisks-xterminal

all: check
check: check-scripts check-autopartkit # check-defaults

install: 
	for b in $(FRAGMENTS); do \
	    $(INSTALL) base-config/$$b $(DESTDIR)$(baseconfdir)/$$b; \
	    chmod a+rx $(DESTDIR)$(baseconfdir)/$$b; \
	    if test -e base-config/$$b.templates; then \
		$(INSTALL_DATA) base-config/$$b.templates \
			$(DESTDIR)$(templatedir)/$$b.templates; \
	    fi; \
	done
	mkdir -p $(DESTDIR)/$(baseconfdir)/menu
	cp base-config/menu/*.mnu \
		base-config/menu/debian-edu-inst \
		base-config/menu/debian-edu-probe-cd \
		$(DESTDIR)/$(baseconfdir)/menu
	for lnk in base-config/menu/*.lnk; do \
	    base=`basename $$lnk .lnk`; \
	    ln -s `cat $$lnk` $(DESTDIR)/$(baseconfdir)/menu/$$base; \
	done
	for profile in $(DEFAULTS) ; do \
	    $(INSTALL_DATA) base-config/defaults.$$profile $(DESTDIR)$(pkglibdir)/; \
	done
	for file in $(COMMON) ; do \
	    $(INSTALL_DATA) base-config/$$file $(DESTDIR)$(pkglibdir)/; \
	done
	for file in $(INSTALLSCRIPT) ; do \
	    $(INSTALL) base-config/$$file $(DESTDIR)$(pkglibdir)/; \
	done
	for fil in $(SBINFILES); do \
	  $(INSTALL) tools/$$fil $(DESTDIR)$(sbindir)/$$fil; \
	done

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 base-config/defaults.$$profile; \
	done

# Check with small and large memory value, exit on failure
check-autopartkit:
	set -x ; for f in autopartkit/*.table ;do \
	    ./tools/autopartkit-check.pl $$f 64; \
	    ./tools/autopartkit-check.pl $$f 2048; \
	done

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

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

clean:
	$(RM) *~