#!/usr/bin/make -f DEB_VERSION := $(shell LC_ALL=C dpkg-parsechangelog | grep ^Version: | sed 's/^Version: *//') DATE := $(shell date +"%Y-%m-%d") build: $(checkdir) rm -f version.ent echo "" >> version.ent echo "" >> version.ent nsgmls -gues policy.sgml # check SGML syntax debiandoc2html policy.sgml debiandoc2text policy.sgml lynx -dump upgrading-checklist.html > upgrading-checklist.text gzip -9 policy.text touch build clean: $(checkdir) -rm -f build -rm -rf policy.html policy.text* policy.lout* -rm -rf lout.li -rm -rf upgrading-checklist.text -rm -f `find . -name "*~"` -rm -rf debian/tmp debian/files* core debian/substvars -rm -rf version.ent binary-indep: checkroot build $(checkdir) -rm -rf debian/tmp install -d debian/tmp cd debian/tmp && install -d `cat ../dirs` # create a substvar to reference from debian/control so that # we don't hardcode the policy compliance of the policy # package. I guess some might question this but I take it as # a given that the debian-policy pkg must always comply with # itself... echo "debian-policy:Version=$(DEB_VERSION)" > debian/substvars cp -a policy.html debian/tmp/usr/doc/debian-policy/ cp policy.text.gz debian/tmp/usr/doc/debian-policy/ cat policy.sgml | gzip -9 > debian/tmp/usr/doc/debian-policy/policy.sgml.gz cp FSSTND-FAQ fsstnd* debian/tmp/usr/doc/debian-policy/fsstnd/ cp virtual-package-names-list.text debian/tmp/usr/doc/debian-policy/ cp upgrading-checklist.text debian/tmp/usr/doc/debian-policy/ cp libc6-migration.text debian/tmp/usr/doc/debian-policy/ gzip -9 debian/tmp/usr/doc/debian-policy/fsstnd/FSSTND-FAQ cp debian/changelog debian/tmp/usr/doc/debian-policy/ gzip -9 debian/tmp/usr/doc/debian-policy/{changelog,libc6-migration.text,virtual-package-names-list.text,upgrading-checklist.text} cp debian-policy.desc debian/tmp/usr/share/doc-base/debian-policy cp debian/copyright debian/tmp/usr/doc/debian-policy/ mkdir debian/tmp/DEBIAN cp debian/{postinst,prerm} debian/tmp/DEBIAN/ chmod +x debian/tmp/DEBIAN/{postinst,prerm} dpkg-gencontrol -isp chown -R root.root debian/tmp chmod -R go=rX debian/tmp dpkg --build debian/tmp .. debiandoc2ps -pa4 -1 -O policy.sgml | gzip -9v > ../policy.ps.gz dpkg-distaddfile -fdebian/files policy.ps.gz byhand - GZIP=-9v tar zcf ../policy.html.tar.gz policy.html dpkg-distaddfile -fdebian/files policy.html.tar.gz byhand - cp policy.text.gz .. dpkg-distaddfile -fdebian/files policy.text.gz byhand - cp virtual-package-names-list.text .. dpkg-distaddfile -fdebian/files virtual-package-names-list.text byhand - cp libc6-migration.text .. dpkg-distaddfile -fdebian/files libc6-migration.text byhand - binary-arch: checkroot build $(checkdir) # There are no architecture-dependent files to be uploaded # generated by this package. If there were any they would be # made here. define checkdir test -f debian/rules endef # Below here is fairly generic really binary: binary-indep binary-arch checkroot: $(checkdir) test root = "`whoami`" .PHONY: binary binary-arch binary-indep clean checkroot