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
|
#!/usr/bin/make -f
ARCH=$(shell dpkg-architecture -qDEB_BUILD_ARCH)
VERSION=$(shell LC_ALL=C dpkg-parsechangelog | grep ^Version: | cut -d ' ' -f 2)
DATE=$(shell echo $(VERSION) | cut -d '.' -f 1)
DISTRIBUTION=$(shell LC_ALL=C dpkg-parsechangelog | grep ^Distribution: | cut -d ' ' -f 2)
ifneq (,$(filter stable oldstable,${DISTRIBUTION}))
DISTRIBUTION=sarge
endif
ifeq (${DISTRIBUTION},unstable)
DISTRIBUTION=sarge
endif
ifeq (${DISTRIBUTION},UNRELEASED)
DISTRIBUTION=unstable
endif
ARCHIVEDIR=debian/tmp/installer-$(ARCH)
DESTDIR=$(ARCHIVEDIR)/$(DATE)
IMAGEDIR=$(DESTDIR)/images
MANDIR=$(DESTDIR)/doc/manual
MANTMP=$(shell pwd)/doc/manual/build/manual
TARNAME=debian-installer-images_$(VERSION)_$(ARCH).tar.gz
clean:
dh_testdir
dh_testroot
dh_clean build-stamp
rm -rf $(MANTMP)
$(MAKE) -C build reallyclean
$(MAKE) -C doc/devel/partman clean
# Must run as root, so is not run as part of regular build.
build-images:
$(MAKE) -C build all_build stats \
SUITE=$(DISTRIBUTION) BUILD_DATE=$(DATE)
build: build-stamp
build-stamp:
rm -f $@
-rm -rf $(MANTMP)
set -e && cd doc/manual/build && \
official_build=1 destination=$(MANTMP) \
architectures=$(ARCH) noarchdir=1 ./build.sh
$(MAKE) -C doc/devel/partman
touch $@
install: build
dh_testdir
dh_testroot
dh_clean -k
dh_installdirs
install -d $(MANDIR)
cp -a $(MANTMP)/* $(MANDIR)
# Inclusion of a sources.list.udeb.local is needed to build d-i for
# Sarge 3.1r3 including updated kernel udebs. This hack makes sure
# we also support AMD64 which uses a different mirror.
if [ $(ARCH) = amd64 ] && [ -f build/sources.list.udeb.local.amd64 ]; then \
cp build/sources.list.udeb.local.amd64 build/sources.list.udeb.local; \
fi
debian/rules build-images
install -d $(IMAGEDIR)
cp -a build/dest/* $(IMAGEDIR)
cd $(IMAGEDIR) && md5sum `find . -type f` > MD5SUMS
ln -s $(DATE) $(ARCHIVEDIR)/current
binary-arch: install
dh_testdir
dh_testroot
dh_installchangelogs
dh_installdocs $(MANTMP)
dh_installdocs -X manual doc/* -X Makefile -X partman-doc.sgml
dh_compress
dh_fixperms
dh_gencontrol -- -Vkernel:Package='$(KERNELPACKAGE)'
dh_builddeb
cd debian/tmp && tar czvf ../../../$(TARNAME) .
dpkg-distaddfile $(TARNAME) byhand -
binary-indep:
binary: binary-indep binary-arch
.PHONY: build build-images clean binary-indep binary-arch binary install
|