File: rules

package info (click to toggle)
debian-edu-install 0.674
  • links: PTS, VCS
  • area: main
  • in suites: lenny
  • size: 956 kB
  • ctags: 51
  • sloc: sh: 1,035; perl: 278; makefile: 181
file content (130 lines) | stat: -rwxr-xr-x 4,884 bytes parent folder | download
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
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
#!/usr/bin/make -f
# Sample debian/rules that uses debhelper.
# GNU copyright 1997 to 1999 by Joey Hess.

# Uncomment this to turn on verbose mode.
#export DH_VERBOSE=1

# TARGET_DIST is one of stable, etch, terra, lenny, lenny-test,
# unstable, fetch from the changelog
TARGET_DIST = $(shell head -1 debian/changelog |awk '{print $$3}'|tr -d ';')

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

INSTALL      = install -D -m0755
INSTALL_DATA = install -D -m0644

PACKAGES=$(shell dh_listpackages)

INSTALLUDEB=debian-edu-install-udeb
PROFILEUDEB=debian-edu-profile-udeb
VERSION=$(shell dpkg-parsechangelog | grep ^Version: | cut -d ' ' -f 2)
ARCH=all
INSTALLUDEBFILENAME=$(INSTALLUDEB)_$(VERSION)_$(ARCH).udeb
REPORTBUGUDEBFILENAME=$(REPORTBUGUDEB)_$(VERSION)_$(ARCH).udeb
PROFILEUDEBFILENAME=$(PROFILEUDEB)_$(VERSION)_$(ARCH).udeb

build:
	$(MAKE)

clean:
	debconf-updatepo
	dh_testdir
	dh_testroot
	rm -f build-stamp configure-stamp
	$(MAKE) clean
	dh_clean

install-common: build
	dh_testdir
	dh_testroot
	dh_clean -k
	dh_installdirs

install-debian-edu-install: install-common
	$(MAKE) install DESTDIR=$(CURDIR)/debian/debian-edu-install
	cp debian/debian-edu-install.lintian-override $(CURDIR)/debian/debian-edu-install/usr/share/lintian/overrides/debian-edu-install
	$(INSTALL) -d $(CURDIR)/debian/debian-edu-install/lib/debian-edu-install/
	$(INSTALL) debian/debian-edu-install.firstboot $(CURDIR)/debian/debian-edu-install/usr/lib/debian-edu-install/firstboot

.PHONY: install-debian-edu-profile-udeb
install-debian-edu-profile-udeb: install-common
	$(INSTALL) base-installer $(CURDIR)/debian/debian-edu-profile-udeb/usr/lib/base-installer.d/10debian-edu-profile-udeb
	$(INSTALL) base-installer-late $(CURDIR)/debian/debian-edu-profile-udeb/usr/lib/base-installer.d/99debian-edu-profile-udeb
	$(INSTALL) post-base-installer $(CURDIR)/debian/debian-edu-profile-udeb/usr/lib/post-base-installer.d/10debian-edu-profile-udeb
	$(INSTALL) post-base-installer-late $(CURDIR)/debian/debian-edu-profile-udeb/usr/lib/post-base-installer.d/90debian-edu-profile-udeb
	$(INSTALL) pre-pkgsel $(CURDIR)/debian/debian-edu-profile-udeb/usr/lib/pre-pkgsel.d/10debian-edu-profile-udeb
	$(INSTALL) finish-install $(CURDIR)/debian/debian-edu-profile-udeb/usr/lib/finish-install.d/19debian-edu-profile-udeb
	$(INSTALL) apt-setup/generators/70debian-edu-install $(CURDIR)/debian/debian-edu-profile-udeb/usr/lib/apt-setup/generators/70debian-edu-install
	for profile in $(DEFAULTS) ; do \
	    $(INSTALL_DATA) base-config/defaults.$$profile $(CURDIR)/debian/debian-edu-profile-udeb/usr/lib/debian-edu-install ; \
	done
	$(MAKE) install-partman-recipes DESTDIR=$(CURDIR)/debian/debian-edu-profile-udeb
	$(INSTALL_DATA) lib/partman/commit.d/* $(CURDIR)/debian/debian-edu-profile-udeb/lib/partman/commit.d
	$(INSTALL) debian-edu-profile $(CURDIR)/debian/debian-edu-profile-udeb/usr/bin
	touch $(CURDIR)/debian/debian-edu-profile-udeb/etc/uselvm
	$(INSTALL) version $(CURDIR)/debian/debian-edu-profile-udeb/usr/lib/debian-edu-install

# Build architecture-independent files here.
binary-indep: install debian-edu-install debian-edu-install-udeb debian-edu-profile-udeb

debian-edu-install-udeb: # install-debian-edu-install-udeb
	dh_testdir -p$@
	dh_testroot -p$@
	dh_installdebconf -p$@ -n
	dh_strip -p$@
	dh_compress -p$@
	dh_fixperms -p$@
	cp debian/debian-edu-install-udeb.isinstallable debian/debian-edu-install-udeb/DEBIAN/isinstallable
	chmod +x debian/debian-edu-install-udeb/DEBIAN/isinstallable
	dh_installdeb -p$@
	dh_gencontrol -p$@ -- -n$(INSTALLUDEBFILENAME)
ifeq ($(TARGET_DIST),terra)
	sed -i -e 's/^Installer-Menu-Item: \(.*\)00$$/Installer-Menu-Item: \1/' \
		debian/debian-edu-install-udeb/DEBIAN/control
endif
	dh_builddeb -p$@ --filename=$(INSTALLUDEBFILENAME)

.PHONY: debian-edu-profile-udeb
debian-edu-profile-udeb: install-debian-edu-profile-udeb
	dh_testdir -p$@
	dh_testroot -p$@
	dh_installdebconf -p$@ -n
	dh_strip -p$@
	dh_compress -p$@
	dh_fixperms -p$@
	dh_installdeb -p$@
	dh_gencontrol -p$@ -- -n$(PROFILEUDEBFILENAME)
ifeq ($(TARGET_DIST),terra)
	sed -i -e 's/^Installer-Menu-Item: \(.*\)00$$/Installer-Menu-Item: \1/' \
		debian/debian-edu-profile-udeb/DEBIAN/control
endif
	dh_builddeb -p$@ --filename=$(PROFILEUDEBFILENAME)

debian-edu-install: install-debian-edu-install
	dh_testdir -p$@
	dh_testroot -p$@
	dh_installdebconf -p$@
	dh_installdocs -p$@
	dh_installexamples -p$@
	dh_installmenu -p$@
	dh_installcron -p$@
	dh_installman -p$@
	dh_installinfo -p$@
	dh_installchangelogs -p$@
	dh_link -p$@
	dh_strip -p$@
	dh_compress -p$@
	dh_fixperms -p$@
	dh_installdeb -p$@
	dh_gencontrol -p$@
	dh_md5sums -p$@
	dh_builddeb -p$@

# Build architecture-dependent files here.
binary-arch: build install

binary: binary-indep binary-arch
.PHONY: build clean binary-indep binary-arch binary install configure