3 # Uncomment this to turn on verbose mode.
6 # Looking in which build system we are
7 BUILD_SYSTEM := $(shell lsb_release --short --id)
13 # Setting BUILD_SYSTEM in the binary package
14 sed -i -e 's/\(BUILD_SYSTEM="\).*"/\1'$(BUILD_SYSTEM)'"/g' casper.conf
15 ifeq ($(BUILD_SYSTEM),Ubuntu)
16 cp debian/control.ubuntu debian/control
18 cp debian/control.debian debian/control
22 $(MAKE) -C casper-md5check
24 for x in bin/* scripts/casper scripts/casper-bottom/* \
25 ubiquity-hooks/*; do \
37 -$(MAKE) -C casper-md5check clean
39 # Putting back default files
40 cp -f debian/control.debian debian/control
41 sed -i -e 's/\(BUILD_SYSTEM="\).*"/\1'Debian'"/g' casper.conf
55 install -m 0755 casper-md5check/casper-md5check debian/casper/usr/lib/casper
58 chmod 0755 debian/casper/usr/share/initramfs-tools/scripts/casper
60 # Temporary Fixing permissions (until upstream merge)
61 chmod 0755 debian/casper/usr/share/initramfs-tools/scripts/casper-bottom/02etc_casper_conf
64 install -m 0644 casper.conf debian/casper/etc/casper.conf
66 binary-indep: build install
67 ifneq ($(BUILD_SYSTEM),Debian)
68 # Conditionally build Ubiquity
73 dh_installchangelogs -i
82 binary-arch: build install
86 dh_installchangelogs -a
90 dh_installinit -a -r --no-start -- start 89 0 6 .
100 binary: binary-arch binary-indep
101 .PHONY: build clean binary-indep binary-arch binary install