]> git.donarmstrong.com Git - debian/debian-policy.git/blobdiff - debian/rules
Fix FTBFS and migrate to openjade/opensp
[debian/debian-policy.git] / debian / rules
index a3950ca7e2e88416cad8c5655315e1b70c4fbdbc..2a3a76e51e39a146286b7ff58a2e708c30c1383c 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.
@@ -40,6 +40,8 @@ POLICY_FILES := $(SGML_FILES:=.sgml) $(SGML_FILES:=.txt.gz)           \
                virtual-package-names-list.txt libc6-migration.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,7 +58,9 @@ 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/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.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)
@@ -146,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 ..