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
|
#! /usr/bin/make -f
ARCH = $(shell dpkg-architecture -qDEB_HOST_ARCH)
tmp = $(CURDIR)/debian/base-installer
build: build-stamp debian/templates
build-stamp:
dh_testdir
ifeq (,$(findstring debug,$(DEB_BUILD_OPTIONS)))
$(MAKE) small
else
$(MAKE) DEBUG=1
endif
touch $@
debian/templates: debian/templates-arch
debian/templates-build.pl $(ARCH) < $< > $@
# give the new templates file the same mtime as the input file, so
# that po2debconf doesn't decide that it needs to run
# debconf-updatepo
touch -mr $< $@
clean:
dh_testdir
rm -f build-stamp
$(MAKE) clean
dh_clean debian/templates
test:
$(MAKE) -C kernel test
install: build test
dh_testdir
dh_testroot
dh_clean -k
dh_install run-debootstrap usr/sbin
if [ -e "kernel/$(ARCH).sh" ]; then \
dh_installdirs usr/lib/base-installer; \
install -m644 "kernel/$(ARCH).sh" \
$(tmp)/usr/lib/base-installer/kernel.sh; \
fi
dh_installdirs usr/lib/finish-install.d
install -m755 finish-install $(tmp)/usr/lib/finish-install.d/90base-installer
binary-indep:
binary-arch: install
dh_testdir
dh_testroot
dh_installdebconf -n
(echo ; cat debian/templates) >> debian/base-installer/DEBIAN/templates
dh_strip
dh_compress
dh_fixperms
dh_installdeb
dh_shlibdeps
dh_gencontrol
dh_builddeb
binary: binary-indep binary-arch
.PHONY: clean binary-indep binary-arch binary install
|