]> git.donarmstrong.com Git - debian/debian-policy.git/blobdiff - debian/rules
debian/rules: no more ship libc6-migration.txt
[debian/debian-policy.git] / debian / rules
index d242b66020baaee7f0d0acb3934ce63ffab7b099..67b0bd8568ae9f20849648703a378fada0d10a25 100755 (executable)
@@ -6,7 +6,7 @@ date    := $(shell date +"%Y-%m-%d")
 version := $(shell dpkg-parsechangelog | awk '/^Version:/ { print $$2; exit }')
 
 # Currently, emacs23 is required (xemacs is not sufficient).
-EMACS   := emacs23
+EMACS   := emacs24
 
 # Location of the source and build directories.
 SRCTOP := $(CURDIR)
@@ -25,7 +25,7 @@ ORG_FILES   := Process README
 
 # doc-base description files for the documents we include.
 DESC_FILES  := copyright-format-1.0 debian-policy debian-menu-policy \
-              debian-perl-policy debconf-spec fhs
+              debian-perl-policy debconf-spec fhs autopkgtest
 
 # Our local copy of the File Hierarchy Standard.  We don't build this from
 # source, but we do have a copy of the source in FHS_ARCHIVE.
@@ -37,9 +37,11 @@ FHS_FILES   := fhs-2.3.html fhs-2.3.ps.gz fhs-2.3.txt.gz fhs-2.3.pdf.gz
 # separately, as are the directories of HTML output.
 POLICY_FILES := $(SGML_FILES:=.sgml) $(SGML_FILES:=.txt.gz)            \
                $(SGML_FILES:=-1.html) version.ent                      \
-               virtual-package-names-list.txt libc6-migration.txt      \
+               virtual-package-names-list.txt                          \
                copyright-format/copyright-format-1.0.html              \
                copyright-format/copyright-format-1.0.txt.gz            \
+               autopkgtest/autopkgtest.html                            \
+               autopkgtest/autopkgtest.txt.gz                          \
                debconf_spec/debconf_specification.html                 \
                debconf_spec/debconf_specification.txt.gz               \
                policy.ps.gz policy.pdf.gz README.txt README.html       \
@@ -56,8 +58,10 @@ FILES_TO_CLEAN       := $(SGML_FILES:=.txt) $(SGML_FILES:=.txt.gz)           \
                   $(ORG_FILES:=.html) $(ORG_FILES:=.txt)               \
                   policy.pdf.gz policy.ps.gz                           \
                   policy.pdf policy.ps policy.tpt policy.txt           \
-                  version.ent                                          \
-                  copyright-format-1.0.xml.tar.gz                      \
+                  copyright-format/version.xml                         \
+                  autopkgtest/version.txt                              \
+                  debconf_spec/include/version.xml version.ent         \
+                  copyright-format.xml.tar.gz                          \
                   debconf_specification.xml.tar.gz                     \
                   debian/files
 
@@ -68,7 +72,9 @@ mkdir   := install -d -o root -g root -m 755
 
 all build build-indep: stamp-build
 build-arch:
-stamp-build: version.ent
+stamp-build: version.ent copyright-format/version.xml \
+            autopkgtest/version.txt \
+            debconf_spec/include/version.xml
        $(MAKE) $(SGML_FILES:=.sgml.validate) \
                $(SGML_FILES:=.html.tar.gz) \
                 $(SGML_FILES:=-1.html) \
@@ -77,22 +83,44 @@ stamp-build: version.ent
        $(MAKE) $(ORG_FILES:=.html) \
                $(ORG_FILES:=.txt)
        $(MAKE) -C copyright-format all
+       $(MAKE) -C autopkgtest all
        $(MAKE) -C debconf_spec all
-       GZIP=-9 cd copyright-format && \
-               tar -zcf ../copyright-format-1.0.xml.tar.gz *
-       GZIP=-9 cd debconf_spec && \
-               tar -zcf ../debconf_specification.xml.tar.gz *
+       cd copyright-format && \
+               GZIP=-n9 tar -zcf ../copyright-format.xml.tar.gz *
+       cd debconf_spec && \
+               GZIP=-n9 tar -zcf ../debconf_specification.xml.tar.gz *
        touch stamp-build
 
-configure: version.ent
+# Create the version files for inclusion in the various documents.  We want
+# to put the Policy version and date in each document, even if they
+# separately have their own versions.
+configure: version.ent copyright-format/version.xml \
+          autopkgtest/version.txt \
+          debconf_spec/include/version.xml
 version.ent: debian/changelog
        rm -f $@
        echo "<!entity version \"$(version)\">" >> $@
        echo "<!entity date    \"$(date)\">"    >> $@
+copyright-format/version.xml: debian/changelog
+       rm -f $@
+       echo '<?xml version="1.0" standalone="no"?>' >  $@
+       echo '<!ENTITY version "$(version)">'        >> $@
+       echo '<!ENTITY date    "$(date)">'           >> $@
+debconf_spec/include/version.xml: debian/changelog
+       rm -f $@
+       echo '<?xml version="1.0" standalone="no"?>' >  $@
+       echo '<!ENTITY version "$(version)">'        >> $@
+       echo '<!ENTITY date    "$(date)">'           >> $@
+autopkgtest/version.txt: debian/changelog
+       rm -f $@
+       echo                                     > $@
+       echo '---'                               >> $@
+       echo 'Debian Policy $(version), $(date)' >> $@
 
 clean:
        rm -f $(STAMPS_TO_CLEAN)
        $(MAKE) -C copyright-format clean
+       $(MAKE) -C autopkgtest clean
        $(MAKE) -C debconf_spec clean
        rm -f $(FILES_TO_CLEAN)
        rm -rf $(DIRS_TO_CLEAN)
@@ -122,7 +150,7 @@ stamp-binary: stamp-build
 #
 # Install DocBook XML source.
 #
-       $(install)      copyright-format-1.0.xml.tar.gz         $(DOCDIR)/
+       $(install)      copyright-format.xml.tar.gz             $(DOCDIR)/
        $(install)      debconf_specification.xml.tar.gz        $(DOCDIR)/
 #
 # Install generated HTML directories.
@@ -131,6 +159,13 @@ stamp-binary: stamp-build
                tar -C $(DOCDIR) -zxf $$file.html.tar.gz;       \
        done
 #
+# Make upgrading-checklist-1.html a symlink to the copy in the policy.html
+# directory.  This is temporary until it becomes a proper appendix.
+#
+       rm -f $(DOCDIR)/upgrading-checklist-1.html
+       ln -s policy.html/upgrading-checklist.html \
+               $(DOCDIR)/upgrading-checklist-1.html
+#
 # Install doc-base files.
 #
        @set -ex; for file in $(DESC_FILES); do                 \
@@ -139,14 +174,15 @@ stamp-binary: stamp-build
 #
 # Compress files and build MD5 checksums.
 #
-       gzip -f9 $(DOCDIR)/*.txt $(DOCDIR)/*.sgml $(DOCDIR)/changelog
+       gzip -f9 $(DOCDIR)/*.sgml $(DOCDIR)/changelog
+       gzip -f9 -n $(DOCDIR)/*.txt
        @set -ex; cd debian/tmp; \
        find . -path './DEBIAN' -prune -o -type f -printf '%P\0' \
                | xargs -r0 md5sum > DEBIAN/md5sums
 #
 # Build the package.
 #
-       dpkg-gencontrol -p$(package) -Pdebian/tmp -isp
+       dpkg-gencontrol -p$(package) -Pdebian/tmp
        chown -R root:root debian/tmp
        chmod -R go=rX debian/tmp
        dpkg --build debian/tmp ..