3 DEB_VERSION := $(shell LC_ALL=C dpkg-parsechangelog | grep ^Version: | sed 's/^Version: *//')
4 DATE := $(shell date +"%Y-%m-%d")
9 echo "<!entity version \"$(DEB_VERSION)\">" >> version.ent
10 echo "<!entity date \"$(DATE)\">" >> version.ent
11 nsgmls -gues policy.sgml # check SGML syntax
12 debiandoc2html policy.sgml
13 debiandoc2text policy.sgml
14 lynx -dump upgrading-checklist.html > upgrading-checklist.text
21 -rm -rf policy.html policy.text* policy.lout*
23 -rm -rf upgrading-checklist.text
24 -rm -f `find . -name "*~"`
25 -rm -rf debian/tmp debian/files* core debian/substvars
28 binary-indep: checkroot build
32 cd debian/tmp && install -d `cat ../dirs`
34 # create a substvar to reference from debian/control so that
35 # we don't hardcode the policy compliance of the policy
36 # package. I guess some might question this but I take it as
37 # a given that the debian-policy pkg must always comply with
39 echo "debian-policy:Version=$(DEB_VERSION)" > debian/substvars
41 cp -a policy.html debian/tmp/usr/doc/debian-policy/
42 cp policy.text.gz debian/tmp/usr/doc/debian-policy/
43 cat policy.sgml | gzip -9 > debian/tmp/usr/doc/debian-policy/policy.sgml.gz
44 cp FSSTND-FAQ fsstnd* debian/tmp/usr/doc/debian-policy/fsstnd/
45 cp virtual-package-names-list.text debian/tmp/usr/doc/debian-policy/
46 cp upgrading-checklist.text debian/tmp/usr/doc/debian-policy/
47 cp libc6-migration.text debian/tmp/usr/doc/debian-policy/
48 gzip -9 debian/tmp/usr/doc/debian-policy/fsstnd/FSSTND-FAQ
49 cp debian/changelog debian/tmp/usr/doc/debian-policy/
50 gzip -9 debian/tmp/usr/doc/debian-policy/{changelog,libc6-migration.text,virtual-package-names-list.text,upgrading-checklist.text}
51 cp debian-policy.desc debian/tmp/usr/share/doc-base/debian-policy
52 cp debian/copyright debian/tmp/usr/doc/debian-policy/
53 mkdir debian/tmp/DEBIAN
54 cp debian/{postinst,prerm} debian/tmp/DEBIAN/
55 chmod +x debian/tmp/DEBIAN/{postinst,prerm}
57 chown -R root.root debian/tmp
58 chmod -R go=rX debian/tmp
59 dpkg --build debian/tmp ..
60 debiandoc2ps -pa4 -1 -O policy.sgml | gzip -9v > ../policy.ps.gz
61 dpkg-distaddfile -fdebian/files policy.ps.gz byhand -
62 GZIP=-9v tar zcf ../policy.html.tar.gz policy.html
63 dpkg-distaddfile -fdebian/files policy.html.tar.gz byhand -
65 dpkg-distaddfile -fdebian/files policy.text.gz byhand -
66 cp virtual-package-names-list.text ..
67 dpkg-distaddfile -fdebian/files virtual-package-names-list.text byhand -
68 cp libc6-migration.text ..
69 dpkg-distaddfile -fdebian/files libc6-migration.text byhand -
71 binary-arch: checkroot build
73 # There are no architecture-dependent files to be uploaded
74 # generated by this package. If there were any they would be
81 # Below here is fairly generic really
83 binary: binary-indep binary-arch
87 test root = "`whoami`"
89 .PHONY: binary binary-arch binary-indep clean checkroot