[dpkg] 43/187: man: Generate the man pages at build time

Reiner Herrmann reiner at reiner-h.de
Sun Nov 6 12:46:23 UTC 2016


This is an automated email from the git hooks/post-receive script.

deki-guest pushed a commit to branch master
in repository dpkg.

commit 75439a326729192b9ceeee0021956bda7e89158d
Author: Guillem Jover <guillem at debian.org>
Date:   Wed Oct 5 04:30:17 2016 +0200

    man: Generate the man pages at build time
    
    This makes it possible to filter them and update several variable
    strings such as system and package pathnames, the release date and
    the dpkg suite version. And will make it possible to use UTF-8 in
    the source and convert to the more conservative groff escape
    sequences on the output.
---
 configure.ac                                       |   1 +
 debian/changelog                                   |   5 +
 m4/dpkg-build.m4                                   |   8 ++
 man/.gitignore                                     |   5 +
 man/Makefile.am                                    | 130 ++++++++++++++++++---
 man/{deb-changelog.5 => deb-changelog.man}         |   2 +-
 man/{deb-changes.5 => deb-changes.man}             |   2 +-
 man/{deb-conffiles.5 => deb-conffiles.man}         |  10 +-
 man/{deb-control.5 => deb-control.man}             |   2 +-
 ...deb-extra-override.5 => deb-extra-override.man} |   2 +-
 man/{deb-old.5 => deb-old.man}                     |   2 +-
 man/{deb-origin.5 => deb-origin.man}               |   6 +-
 man/{deb-override.5 => deb-override.man}           |   2 +-
 man/{deb-postinst.5 => deb-postinst.man}           |   2 +-
 man/{deb-postrm.5 => deb-postrm.man}               |   2 +-
 man/{deb-preinst.5 => deb-preinst.man}             |   2 +-
 man/{deb-prerm.5 => deb-prerm.man}                 |   2 +-
 man/{deb-shlibs.5 => deb-shlibs.man}               |   2 +-
 man/{deb-split.5 => deb-split.man}                 |   2 +-
 man/{deb-src-control.5 => deb-src-control.man}     |   2 +-
 man/{deb-src-files.5 => deb-src-files.man}         |   2 +-
 man/{deb-substvars.5 => deb-substvars.man}         |   2 +-
 man/{deb-symbols.5 => deb-symbols.man}             |   2 +-
 man/{deb-triggers.5 => deb-triggers.man}           |   3 +-
 man/{deb-version.5 => deb-version.man}             |   2 +-
 man/{deb.5 => deb.man}                             |   2 +-
 man/{deb822.5 => deb822.man}                       |   2 +-
 man/{dpkg-architecture.1 => dpkg-architecture.man} |  14 +--
 man/{dpkg-buildflags.1 => dpkg-buildflags.man}     |  16 +--
 man/{dpkg-buildpackage.1 => dpkg-buildpackage.man} |   6 +-
 ...kg-checkbuilddeps.1 => dpkg-checkbuilddeps.man} |   4 +-
 man/{dpkg-deb.1 => dpkg-deb.man}                   |   2 +-
 man/{dpkg-distaddfile.1 => dpkg-distaddfile.man}   |   2 +-
 man/{dpkg-divert.1 => dpkg-divert.man}             |   6 +-
 man/{dpkg-genchanges.1 => dpkg-genchanges.man}     |   2 +-
 man/{dpkg-gencontrol.1 => dpkg-gencontrol.man}     |   2 +-
 man/{dpkg-gensymbols.1 => dpkg-gensymbols.man}     |   2 +-
 ...script-helper.1 => dpkg-maintscript-helper.man} |   2 +-
 ...-mergechangelogs.1 => dpkg-mergechangelogs.man} |   2 +-
 man/{dpkg-name.1 => dpkg-name.man}                 |   2 +-
 ...kg-parsechangelog.1 => dpkg-parsechangelog.man} |   2 +-
 man/{dpkg-query.1 => dpkg-query.man}               |   8 +-
 man/{dpkg-scanpackages.1 => dpkg-scanpackages.man} |   2 +-
 man/{dpkg-scansources.1 => dpkg-scansources.man}   |   2 +-
 man/{dpkg-shlibdeps.1 => dpkg-shlibdeps.man}       |  22 ++--
 man/{dpkg-source.1 => dpkg-source.man}             |   2 +-
 man/{dpkg-split.1 => dpkg-split.man}               |   6 +-
 man/{dpkg-statoverride.1 => dpkg-statoverride.man} |   6 +-
 man/{dpkg-trigger.1 => dpkg-trigger.man}           |   5 +-
 man/{dpkg-vendor.1 => dpkg-vendor.man}             |   8 +-
 man/{dpkg.cfg.5 => dpkg.cfg.man}                   |   6 +-
 man/{dpkg.1 => dpkg.man}                           |  38 +++---
 man/{dsc.5 => dsc.man}                             |   2 +-
 man/{dselect.cfg.5 => dselect.cfg.man}             |   6 +-
 man/{dselect.1 => dselect.man}                     |   8 +-
 man/po/po4a.cfg                                    | 104 ++++++++---------
 man/{start-stop-daemon.8 => start-stop-daemon.man} |   2 +-
 ...date-alternatives.1 => update-alternatives.man} |  14 +--
 man/utf8toman.sed                                  |  88 ++++++++++++++
 59 files changed, 404 insertions(+), 195 deletions(-)

diff --git a/configure.ac b/configure.ac
index 2481b71..93a26c1 100644
--- a/configure.ac
+++ b/configure.ac
@@ -43,6 +43,7 @@ DPKG_BUILD_PROG([dselect])
 DPKG_BUILD_PROG([start-stop-daemon])
 DPKG_BUILD_PROG([update-alternatives])
 
+DPKG_BUILD_RELEASE_DATE
 DPKG_BUILD_DEVEL_DOCS
 
 # Allow alternate directories
diff --git a/debian/changelog b/debian/changelog
index d02b6a1..7af5cb0 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -23,6 +23,11 @@ dpkg (1.18.11) UNRELEASED; urgency=medium
     - Improve user-defined field export marker documentation in
       deb-src-control(5); clarify that X can be followed by zero or more
       (instead of one or more) letters and turn the items into a proper list.
+    - Generate the man pages at build time. This makes it possible to process
+      them and update several variable strings such as system and package
+      pathnames, the release date and the dpkg suite version. And makes it
+      possible to use UTF-8 in the source and convert to the more conservative
+      groff escape sequences on the output.
   * Build system:
     - Add support for profiling perl modules.
     - Clean up compiler and linker automatic flag usage in configure.
diff --git a/m4/dpkg-build.m4 b/m4/dpkg-build.m4
index bb766c9..afb2a7d 100644
--- a/m4/dpkg-build.m4
+++ b/m4/dpkg-build.m4
@@ -10,6 +10,14 @@ AC_DEFUN([DPKG_BUILD_SHARED_LIBS], [
   AM_CONDITIONAL([BUILD_SHARED], [test "$enable_shared" = "yes"])
 ])# DPKG_BUILD_SHARED_LIBS
 
+# DPKG_BUILD_RELEASE_DATE()
+# -----------------------
+AC_DEFUN([DPKG_BUILD_RELEASE_DATE], [
+  TIMESTAMP=$(PERL=$PERL $srcdir/run-script scripts/dpkg-parsechangelog.pl -l$srcdir/debian/changelog -STimestamp)
+  PACKAGE_RELEASE_DATE=$(date --date="@$TIMESTAMP" +%Y-%m-%d)
+  AC_SUBST([PACKAGE_RELEASE_DATE])
+])# DPKG_BUILD_RELEASE_DATE
+
 # DPKG_BUILD_PROG(PROG)
 # ---------------
 # Allow disabling compilation and usage of specific programs.
diff --git a/man/.gitignore b/man/.gitignore
index ba28839..d3c5536 100644
--- a/man/.gitignore
+++ b/man/.gitignore
@@ -1,3 +1,8 @@
+# Generated man pages
+*.1
+*.5
+*.8
+# Translated man pages
 de
 es
 fr
diff --git a/man/Makefile.am b/man/Makefile.am
index a8687c0..bf468a2 100644
--- a/man/Makefile.am
+++ b/man/Makefile.am
@@ -1,6 +1,6 @@
 ## Process this file with automake to produce Makefile.in
 
-dist_man_MANS = \
+man_MANS = \
 	deb-changelog.5 \
 	deb-changes.5 \
 	deb-conffiles.5 \
@@ -52,22 +52,77 @@ dist_man_MANS = \
 	$(nil)
 
 if BUILD_DSELECT
-dist_man_MANS += \
+man_MANS += \
 	dselect.1 \
 	dselect.cfg.5
 endif
 
 if BUILD_START_STOP_DAEMON
-dist_man_MANS += \
+man_MANS += \
 	start-stop-daemon.8
 endif
 
 if BUILD_UPDATE_ALTERNATIVES
-dist_man_MANS += \
+man_MANS += \
 	update-alternatives.1
 endif
 
+CLEANFILES = $(man_MANS)
+
 EXTRA_DIST = \
+	deb-changelog.man \
+	deb-changes.man \
+	deb-conffiles.man \
+	deb-control.man \
+	deb-extra-override.man \
+	deb-old.man \
+	deb-origin.man \
+	deb-override.man \
+	deb-postinst.man \
+	deb-postrm.man \
+	deb-preinst.man \
+	deb-prerm.man \
+	deb-shlibs.man \
+	deb-split.man \
+	deb-src-control.man \
+	deb-src-files.man \
+	deb-substvars.man \
+	deb-symbols.man \
+	deb-triggers.man \
+	deb-version.man \
+	deb.man \
+	deb822.man \
+	dpkg-architecture.man \
+	dpkg-buildflags.man \
+	dpkg-buildpackage.man \
+	dpkg-checkbuilddeps.man \
+	dpkg-deb.man \
+	dpkg-distaddfile.man \
+	dpkg-divert.man \
+	dpkg-genchanges.man \
+	dpkg-gencontrol.man \
+	dpkg-gensymbols.man \
+	dpkg-maintscript-helper.man \
+	dpkg-mergechangelogs.man \
+	dpkg-name.man \
+	dpkg-parsechangelog.man \
+	dpkg-query.man \
+	dpkg-scanpackages.man \
+	dpkg-scansources.man \
+	dpkg-shlibdeps.man \
+	dpkg-source.man \
+	dpkg-split.man \
+	dpkg-statoverride.man \
+	dpkg-trigger.man \
+	dpkg-vendor.man \
+	dpkg.man \
+	dpkg.cfg.man \
+	dsc.man \
+	dselect.man \
+	dselect.cfg.man \
+	start-stop-daemon.man \
+	update-alternatives.man \
+	utf8toman.sed \
 	po/ChangeLog.old \
 	po/po4a.cfg \
 	po/dpkg-man.pot
@@ -93,7 +148,25 @@ PO4A_OPTS = --previous --srcdir $(srcdir) --destdir $(builddir) --no-backups \
 all-local: all-local- at USE_PO4A@
 
 all-local-no:
-all-local-yes: man.stamp
+all-local-yes: gen-man
+
+# We use the man-once target to guarantee there is never an empty call in
+# gen-man, that starts recursing infinitely.
+.PHONY: gen-man man-once
+
+gen-man: man.stamp
+	for lang in $(LINGUAS); do \
+	  files=""; \
+	  for man in $(man_MANS); do \
+	    trans="$${man%%.[0-9]}.man"; \
+	    if [ -f $(builddir)/$$lang/$$trans ]; then \
+	      files="$$files $(builddir)/$$lang/$$man"; \
+	    elif [ -f $(srcdir)/$$lang/$$trans ]; then \
+	      files="$$files $(srcdir)/$$lang/$$man"; \
+	    fi; \
+	  done; \
+	  $(MAKE) mandir="$(mandir)/$$lang" man_MANS="" man-once $$files; \
+	done
 
 # FIXME: Use a stamp file until po4a supports them internally.
 man.stamp:
@@ -112,21 +185,48 @@ clean-local-yes:
 update-po:
 	$(PO4A_V) $(PO4A) $(PO4A_OPTS) --force $(srcdir)/po/po4a.cfg
 
+SUFFIXES = .man
+
+MANGEN_V = $(MANGEN_V_ at AM_V@)
+MANGEN_V_ = $(MANGEN_V_ at AM_DEFAULT_V@)
+MANGEN_V_0 = @echo "  MANGEN $@";
+
+MANGEN = $(MANGEN_V) sed \
+	-f $(srcdir)/utf8toman.sed \
+	-e 's/%PACKAGE%/$(PACKAGE)/g' \
+	-e 's/%VERSION%/$(PACKAGE_VERSION)/g' \
+	-e 's/%RELEASE_DATE%/$(PACKAGE_RELEASE_DATE)/g' \
+	-e 's:%CONFDIR%:$(sysconfdir):g' \
+	-e 's:%LOGDIR%:$(logdir):g' \
+	-e 's:%ADMINDIR%:$(admindir):g' \
+	-e 's:%PKGDOCDIR%:$(docdir):g' \
+	-e 's:%PKGCONFDIR%:$(pkgconfdir):g' \
+	-e 's:%PKGLIBDIR%:$(pkglibdir):g' \
+	-e 's:%PKGDATADIR%:$(pkgdatadir):g'
+	$(nil)
+
+.man.1: Makefile
+	$(MANGEN) $< >$@
+.man.5: Makefile
+	$(MANGEN) $< >$@
+.man.8: Makefile
+	$(MANGEN) $< >$@
+
 install-data-local: install-data-local- at USE_PO4A@
 
 install-data-local-no:
 install-data-local-yes:
 	for lang in $(LINGUAS); do \
 	  files=""; \
-	  for trans in $(dist_man_MANS); do \
+	  for man in $(man_MANS); do \
+	    trans="$${man%%.[0-9]}.man"; \
 	    if [ -f $(builddir)/$$lang/$$trans ]; then \
-	      files="$$files $(builddir)/$$lang/$$trans"; \
+	      files="$$files $(builddir)/$$lang/$$man"; \
 	    elif [ -f $(srcdir)/$$lang/$$trans ]; then \
-	      files="$$files $(srcdir)/$$lang/$$trans"; \
+	      files="$$files $(srcdir)/$$lang/$$man"; \
 	    fi; \
 	  done; \
-	  $(MAKE) install-man mandir="$(mandir)/$$lang" man_MANS="" \
-	          dist_man_MANS="$$files"; \
+	  $(MAKE) install-man mandir="$(mandir)/$$lang" man_MANS="$$files"; \
 	done
 
 uninstall-local: uninstall-local- at USE_PO4A@
@@ -135,15 +235,15 @@ uninstall-local-no:
 uninstall-local-yes:
 	for lang in $(LINGUAS); do \
 	  files=""; \
-	  for trans in $(dist_man_MANS); do \
+	  for man in $(man_MANS); do \
+	    trans="$${man%%.[0-9]}.man"; \
 	    if [ -f $(builddir)/$$lang/$$trans ]; then \
-	      files="$$files $(builddir)/$$lang/$$trans"; \
+	      files="$$files $(builddir)/$$lang/$$man"; \
 	    elif [ -f $(srcdir)/$$lang/$$trans ]; then \
-	      files="$$files $(srcdir)/$$lang/$$trans"; \
+	      files="$$files $(srcdir)/$$lang/$$man"; \
 	    fi; \
 	  done; \
-	  $(MAKE) uninstall-man mandir="$(mandir)/$$lang" man_MANS="" \
-	          dist_man_MANS="$$files"; \
+	  $(MAKE) uninstall-man mandir="$(mandir)/$$lang" man_MANS="$$files"; \
 	done
 
 dist-hook: man.stamp
diff --git a/man/deb-changelog.5 b/man/deb-changelog.man
similarity index 99%
rename from man/deb-changelog.5
rename to man/deb-changelog.man
index 6e03a3a..a68c7ac 100644
--- a/man/deb-changelog.5
+++ b/man/deb-changelog.man
@@ -22,7 +22,7 @@
 .\" You should have received a copy of the GNU General Public License
 .\" along with this program.  If not, see <https://www.gnu.org/licenses/>.
 .
-.TH deb-changelog 5 "2015-06-01" "Debian Project" "Debian"
+.TH deb-changelog 5 "%RELEASE_DATE%" "%VERSION%" "Debian"
 .SH NAME
 deb\-changelog \- dpkg source packages' changelog file format
 .
diff --git a/man/deb-changes.5 b/man/deb-changes.man
similarity index 99%
rename from man/deb-changes.5
rename to man/deb-changes.man
index 6c37fc1..f4e7197 100644
--- a/man/deb-changes.5
+++ b/man/deb-changes.man
@@ -17,7 +17,7 @@
 .\" You should have received a copy of the GNU General Public License
 .\" along with this program.  If not, see <https://www.gnu.org/licenses/>.
 .
-.TH deb\-changes 5 "2015-06-01" "Debian Project" "Debian"
+.TH deb\-changes 5 "%RELEASE_DATE%" "%VERSION%" "Debian"
 .SH NAME
 deb\-changes \- Debian changes file format
 .
diff --git a/man/deb-conffiles.5 b/man/deb-conffiles.man
similarity index 87%
rename from man/deb-conffiles.5
rename to man/deb-conffiles.man
index 31eaef9..fb4f861 100644
--- a/man/deb-conffiles.5
+++ b/man/deb-conffiles.man
@@ -15,7 +15,7 @@
 .\" You should have received a copy of the GNU General Public License
 .\" along with this program.  If not, see <https://www.gnu.org/licenses/>.
 .
-.TH deb\-conffiles 5 "2016-07-07" "Debian Project" "dpkg utilities"
+.TH deb\-conffiles 5 "%RELEASE_DATE%" "%VERSION%" "dpkg utilities"
 .SH NAME
 deb\-conffiles \- package conffiles
 .
@@ -31,10 +31,10 @@ Trailing whitespace will be trimmed, and empty lines will be ignored.
 .
 .SH EXAMPLE
 .nf
-/etc/alternatives/README
-/etc/cron.daily/dpkg
-/etc/dpkg/dpkg.cfg
-/etc/logrotate.d/dpkg
+%CONFDIR%/alternatives/README
+%CONFDIR%/cron.daily/dpkg
+%PKGCONFDIR%/dpkg.cfg
+%CONFDIR%/logrotate.d/dpkg
 .fi
 .
 .SH SEE ALSO
diff --git a/man/deb-control.5 b/man/deb-control.man
similarity index 99%
rename from man/deb-control.5
rename to man/deb-control.man
index 0255915..78241dd 100644
--- a/man/deb-control.5
+++ b/man/deb-control.man
@@ -19,7 +19,7 @@
 .\" You should have received a copy of the GNU General Public License
 .\" along with this program.  If not, see <https://www.gnu.org/licenses/>.
 .
-.TH deb\-control 5 "2013-12-20" "Debian Project" "Debian"
+.TH deb\-control 5 "%RELEASE_DATE%" "%VERSION%" "Debian"
 .SH NAME
 deb\-control \- Debian binary packages' master control file format
 .
diff --git a/man/deb-extra-override.5 b/man/deb-extra-override.man
similarity index 95%
rename from man/deb-extra-override.5
rename to man/deb-extra-override.man
index 4bc1120..dbf530b 100644
--- a/man/deb-extra-override.5
+++ b/man/deb-extra-override.man
@@ -15,7 +15,7 @@
 .\" You should have received a copy of the GNU General Public License
 .\" along with this program.  If not, see <https://www.gnu.org/licenses/>.
 .
-.TH deb\-extra\-override 5 "2009-08-16" "Debian Project" "dpkg utilities"
+.TH deb\-extra\-override 5 "%RELEASE_DATE%" "%VERSION%" "dpkg utilities"
 .SH NAME
 deb\-extra\-override \- Debian archive extra override file
 .
diff --git a/man/deb-old.5 b/man/deb-old.man
similarity index 97%
rename from man/deb-old.5
rename to man/deb-old.man
index 2469ed1..0bc2ea5 100644
--- a/man/deb-old.5
+++ b/man/deb-old.man
@@ -17,7 +17,7 @@
 .\" You should have received a copy of the GNU General Public License
 .\" along with this program.  If not, see <https://www.gnu.org/licenses/>.
 .
-.TH deb\-old 5 "2011-08-14" "Debian Project" "Debian"
+.TH deb\-old 5 "%RELEASE_DATE%" "%VERSION%" "Debian"
 .SH NAME
 deb\-old \- old style Debian binary package format
 .
diff --git a/man/deb-origin.5 b/man/deb-origin.man
similarity index 93%
rename from man/deb-origin.5
rename to man/deb-origin.man
index 60362a6..1f7bad1 100644
--- a/man/deb-origin.5
+++ b/man/deb-origin.man
@@ -16,13 +16,13 @@
 .\" You should have received a copy of the GNU General Public License
 .\" along with this program.  If not, see <https://www.gnu.org/licenses/>.
 .
-.TH deb\-origin 5 "2011-11-10" "Debian Project" "Debian"
+.TH deb\-origin 5 "%RELEASE_DATE%" "%VERSION%" "Debian"
 .SH NAME
 deb\-origin \- Vendor-specific information files
 .SH SYNOPSIS
-.BI /etc/dpkg/origins/ filename
+.BI %PKGCONFDIR%/origins/ filename
 .SH DESCRIPTION
-The files in \fB/etc/dpkg/origins\fP can provide information about
+The files in \fB%PKGCONFDIR%/origins\fP can provide information about
 various vendors who are providing Debian packages.
 
 They contain a number of fields, or comments when the line starts with
diff --git a/man/deb-override.5 b/man/deb-override.man
similarity index 96%
rename from man/deb-override.5
rename to man/deb-override.man
index 2d7ed9e..3723419 100644
--- a/man/deb-override.5
+++ b/man/deb-override.man
@@ -16,7 +16,7 @@
 .\" You should have received a copy of the GNU General Public License
 .\" along with this program.  If not, see <https://www.gnu.org/licenses/>.
 .
-.TH deb\-override 5 "2011-08-14" "Debian Project" "dpkg utilities"
+.TH deb\-override 5 "%RELEASE_DATE%" "%VERSION%" "dpkg utilities"
 .SH NAME
 deb\-override \- Debian archive override file
 .
diff --git a/man/deb-postinst.5 b/man/deb-postinst.man
similarity index 96%
rename from man/deb-postinst.5
rename to man/deb-postinst.man
index 142a052..e505914 100644
--- a/man/deb-postinst.5
+++ b/man/deb-postinst.man
@@ -15,7 +15,7 @@
 .\" You should have received a copy of the GNU General Public License
 .\" along with this program.  If not, see <https://www.gnu.org/licenses/>.
 .
-.TH deb\-postinst 5 "2016-08-16" "Debian Project" "dpkg utilities"
+.TH deb\-postinst 5 "%RELEASE_DATE%" "%VERSION%" "dpkg utilities"
 .SH NAME
 deb\-postinst \- package post-installation maintainer script
 .
diff --git a/man/deb-postrm.5 b/man/deb-postrm.man
similarity index 96%
rename from man/deb-postrm.5
rename to man/deb-postrm.man
index 1e516f5..450dffe 100644
--- a/man/deb-postrm.5
+++ b/man/deb-postrm.man
@@ -15,7 +15,7 @@
 .\" You should have received a copy of the GNU General Public License
 .\" along with this program.  If not, see <https://www.gnu.org/licenses/>.
 .
-.TH deb\-postrm 5 "2016-08-16" "Debian Project" "dpkg utilities"
+.TH deb\-postrm 5 "%RELEASE_DATE%" "%VERSION%" "dpkg utilities"
 .SH NAME
 deb\-postrm \- package post-removal maintainer script
 .
diff --git a/man/deb-preinst.5 b/man/deb-preinst.man
similarity index 95%
rename from man/deb-preinst.5
rename to man/deb-preinst.man
index 01b00e1..1ab99d8 100644
--- a/man/deb-preinst.5
+++ b/man/deb-preinst.man
@@ -15,7 +15,7 @@
 .\" You should have received a copy of the GNU General Public License
 .\" along with this program.  If not, see <https://www.gnu.org/licenses/>.
 .
-.TH deb\-preinst 5 "2016-08-16" "Debian Project" "dpkg utilities"
+.TH deb\-preinst 5 "%RELEASE_DATE%" "%VERSION%" "dpkg utilities"
 .SH NAME
 deb\-preinst \- package pre-installation maintainer script
 .
diff --git a/man/deb-prerm.5 b/man/deb-prerm.man
similarity index 96%
rename from man/deb-prerm.5
rename to man/deb-prerm.man
index 509d29f..ccfc995 100644
--- a/man/deb-prerm.5
+++ b/man/deb-prerm.man
@@ -15,7 +15,7 @@
 .\" You should have received a copy of the GNU General Public License
 .\" along with this program.  If not, see <https://www.gnu.org/licenses/>.
 .
-.TH deb\-prerm 5 "2016-08-16" "Debian Project" "dpkg utilities"
+.TH deb\-prerm 5 "%RELEASE_DATE%" "%VERSION%" "dpkg utilities"
 .SH NAME
 deb\-prerm \- package pre-removal maintainer script
 .
diff --git a/man/deb-shlibs.5 b/man/deb-shlibs.man
similarity index 97%
rename from man/deb-shlibs.5
rename to man/deb-shlibs.man
index 3d045a7..55d2078 100644
--- a/man/deb-shlibs.5
+++ b/man/deb-shlibs.man
@@ -16,7 +16,7 @@
 .\" You should have received a copy of the GNU General Public License
 .\" along with this program.  If not, see <https://www.gnu.org/licenses/>.
 .
-.TH deb\-shlibs 5 "2012-02-08" "Debian Project" "dpkg utilities"
+.TH deb\-shlibs 5 "%RELEASE_DATE%" "%VERSION%" "dpkg utilities"
 .SH NAME
 deb\-shlibs \- Debian shared library information file
 .
diff --git a/man/deb-split.5 b/man/deb-split.man
similarity index 97%
rename from man/deb-split.5
rename to man/deb-split.man
index 3bbaf60..c356ccf 100644
--- a/man/deb-split.5
+++ b/man/deb-split.man
@@ -15,7 +15,7 @@
 .\" You should have received a copy of the GNU General Public License
 .\" along with this program.  If not, see <https://www.gnu.org/licenses/>.
 .
-.TH deb\-split 5 "2012-04-09" "Debian Project" "Debian"
+.TH deb\-split 5 "%RELEASE_DATE%" "%VERSION%" "Debian"
 .SH NAME
 deb\-split \- Debian multi-part binary package format
 .SH SYNOPSIS
diff --git a/man/deb-src-control.5 b/man/deb-src-control.man
similarity index 99%
rename from man/deb-src-control.5
rename to man/deb-src-control.man
index 11d1b9d..8a8326d 100644
--- a/man/deb-src-control.5
+++ b/man/deb-src-control.man
@@ -17,7 +17,7 @@
 .\" You should have received a copy of the GNU General Public License
 .\" along with this program.  If not, see <https://www.gnu.org/licenses/>.
 .
-.TH deb\-src\-control 5 "2013-12-20" "Debian Project" "Debian"
+.TH deb\-src\-control 5 "%RELEASE_DATE%" "%VERSION%" "Debian"
 .SH NAME
 deb\-src\-control \- Debian source packages' master control file format
 .
diff --git a/man/deb-src-files.5 b/man/deb-src-files.man
similarity index 95%
rename from man/deb-src-files.5
rename to man/deb-src-files.man
index 9758220..83a19b2 100644
--- a/man/deb-src-files.5
+++ b/man/deb-src-files.man
@@ -15,7 +15,7 @@
 .\" You should have received a copy of the GNU General Public License
 .\" along with this program.  If not, see <https://www.gnu.org/licenses/>.
 .
-.TH deb\-src\-files 5 "2016-08-16" "Debian Project" "dpkg utilities"
+.TH deb\-src\-files 5 "%RELEASE_DATE%" "%VERSION%" "dpkg utilities"
 .SH NAME
 deb\-src\-files \- Debian distribute files format
 .
diff --git a/man/deb-substvars.5 b/man/deb-substvars.man
similarity index 98%
rename from man/deb-substvars.5
rename to man/deb-substvars.man
index f4d73f3..d9dc170 100644
--- a/man/deb-substvars.5
+++ b/man/deb-substvars.man
@@ -18,7 +18,7 @@
 .\" You should have received a copy of the GNU General Public License
 .\" along with this program.  If not, see <https://www.gnu.org/licenses/>.
 .
-.TH deb\-substvars 5 "2015-01-20" "Debian Project" "dpkg utilities"
+.TH deb\-substvars 5 "%RELEASE_DATE%" "%VERSION%" "dpkg utilities"
 .SH NAME
 deb\-substvars \- Debian source substitution variables
 .
diff --git a/man/deb-symbols.5 b/man/deb-symbols.man
similarity index 98%
rename from man/deb-symbols.5
rename to man/deb-symbols.man
index 335666a..9f49a13 100644
--- a/man/deb-symbols.5
+++ b/man/deb-symbols.man
@@ -16,7 +16,7 @@
 .\" You should have received a copy of the GNU General Public License
 .\" along with this program.  If not, see <https://www.gnu.org/licenses/>.
 .
-.TH deb\-symbols 5 "2011-08-14" "Debian Project" "dpkg utilities"
+.TH deb\-symbols 5 "%RELEASE_DATE%" "%VERSION%" "dpkg utilities"
 .SH NAME
 deb\-symbols \- Debian's extended shared library information file
 .
diff --git a/man/deb-triggers.5 b/man/deb-triggers.man
similarity index 96%
rename from man/deb-triggers.5
rename to man/deb-triggers.man
index 092a85d..f0605f7 100644
--- a/man/deb-triggers.5
+++ b/man/deb-triggers.man
@@ -16,7 +16,7 @@
 .\" You should have received a copy of the GNU General Public License
 .\" along with this program.  If not, see <https://www.gnu.org/licenses/>.
 .
-.TH deb\-triggers 5 "2014-10-15" "Debian Project" "dpkg utilities"
+.TH deb\-triggers 5 "%RELEASE_DATE%" "%VERSION%" "dpkg utilities"
 .SH NAME
 deb\-triggers \- package triggers
 .
@@ -90,4 +90,5 @@ those directives.
 .SH SEE ALSO
 .BR dpkg\-trigger (1),
 .BR dpkg (1),
+.\" FIXME: Unhardcode the pathname, and use dpkg instead of dpkg-dev.
 .BR /usr/share/doc/dpkg\-dev/triggers.txt.gz .
diff --git a/man/deb-version.5 b/man/deb-version.man
similarity index 98%
rename from man/deb-version.5
rename to man/deb-version.man
index 73e94e6..b977435 100644
--- a/man/deb-version.5
+++ b/man/deb-version.man
@@ -18,7 +18,7 @@
 .\" You should have received a copy of the GNU General Public License
 .\" along with this program.  If not, see <https://www.gnu.org/licenses/>.
 .
-.TH deb\-version 5 "2013-04-02" "Debian Project" "Debian"
+.TH deb\-version 5 "%RELEASE_DATE%" "%VERSION%" "Debian"
 .SH NAME
 deb\-version \- Debian package version number format
 .
diff --git a/man/deb.5 b/man/deb.man
similarity index 98%
rename from man/deb.5
rename to man/deb.man
index e78faec..bc86458 100644
--- a/man/deb.5
+++ b/man/deb.man
@@ -18,7 +18,7 @@
 .\" You should have received a copy of the GNU General Public License
 .\" along with this program.  If not, see <https://www.gnu.org/licenses/>.
 .
-.TH deb 5 "2014-05-24" "Debian Project" "Debian"
+.TH deb 5 "%RELEASE_DATE%" "%VERSION%" "Debian"
 .SH NAME
 deb \- Debian binary package format
 .SH SYNOPSIS
diff --git a/man/deb822.5 b/man/deb822.man
similarity index 99%
rename from man/deb822.5
rename to man/deb822.man
index 0cc3513..955d61c 100644
--- a/man/deb822.5
+++ b/man/deb822.man
@@ -16,7 +16,7 @@
 .\" You should have received a copy of the GNU General Public License
 .\" along with this program.  If not, see <https://www.gnu.org/licenses/>.
 .
-.TH deb822 5 "2015-06-01" "Debian Project" "Debian"
+.TH deb822 5 "%RELEASE_DATE%" "%VERSION%" "Debian"
 .SH NAME
 deb822 \- Debian RFC822 control data format
 .
diff --git a/man/dpkg-architecture.1 b/man/dpkg-architecture.man
similarity index 97%
rename from man/dpkg-architecture.1
rename to man/dpkg-architecture.man
index 739cd7f..abc1de2 100644
--- a/man/dpkg-architecture.1
+++ b/man/dpkg-architecture.man
@@ -18,7 +18,7 @@
 .\" You should have received a copy of the GNU General Public License
 .\" along with this program.  If not, see <https://www.gnu.org/licenses/>.
 .
-.TH dpkg\-architecture 1 "2013-03-28" "Debian Project" "dpkg utilities"
+.TH dpkg\-architecture 1 "%RELEASE_DATE%" "%VERSION%" "dpkg utilities"
 .SH NAME
 dpkg\-architecture \- set and determine the architecture for package building
 .
@@ -222,21 +222,21 @@ All these files have to be present for \fBdpkg\-architecture\fP to
 work. Their location can be overridden at runtime with the environment
 variable \fBDPKG_DATADIR\fP.
 .TP
-.I /usr/share/dpkg/cputable
+.I %PKGDATADIR%/cputable
 Table of known CPU names and mapping to their GNU name.
 .TP
-.I /usr/share/dpkg/ostable
+.I %PKGDATADIR%/ostable
 Table of known operating system names and mapping to their GNU name.
 .TP
-.I /usr/share/dpkg/triplettable
+.I %PKGDATADIR%/triplettable
 Mapping between Debian architecture triplets and Debian architecture
 names.
 .TP
-.I /usr/share/dpkg/abitable
+.I %PKGDATADIR%/abitable
 Table of Debian architecture ABI attribute overrides.
 .SS Packaging support
 .TP
-.I /usr/share/dpkg/architecture.mk
+.I %PKGDATADIR%/architecture.mk
 Makefile snippet that properly sets and exports all the variables that
 \fBdpkg\-architecture\fP outputs (since dpkg 1.16.1).
 .
@@ -308,7 +308,7 @@ set all the variables that \fBdpkg\-architecture\fP can provide:
 .PP
 .RS 4
 .nf
-include /usr/share/dpkg/architecture.mk
+include %PKGDATADIR%/architecture.mk
 
 ifeq ($(DEB_HOST_ARCH),alpha)
   [...]
diff --git a/man/dpkg-buildflags.1 b/man/dpkg-buildflags.man
similarity index 98%
rename from man/dpkg-buildflags.1
rename to man/dpkg-buildflags.man
index af416ae..e718c85 100644
--- a/man/dpkg-buildflags.1
+++ b/man/dpkg-buildflags.man
@@ -17,7 +17,7 @@
 .\" You should have received a copy of the GNU General Public License
 .\" along with this program.  If not, see <https://www.gnu.org/licenses/>.
 .
-.TH dpkg\-buildflags 1 "2014-09-04" "Debian Project" "dpkg suite"
+.TH dpkg\-buildflags 1 "%RELEASE_DATE%" "%VERSION%" "dpkg suite"
 .SH NAME
 dpkg\-buildflags \- returns build flags to use during package build
 .
@@ -32,7 +32,7 @@ build of Debian packages.
 The default flags are defined by the vendor but they can be
 extended/overridden in several ways:
 .IP 1.
-system-wide with \fB/etc/dpkg/buildflags.conf\fP;
+system-wide with \fB%PKGCONFDIR%/buildflags.conf\fP;
 .IP 2.
 for the current user with \fB$XDG_CONFIG_HOME/dpkg/buildflags.conf\fP
 where \fB$XDG_CONFIG_HOME\fP defaults to \fB$HOME/.config\fP;
@@ -464,7 +464,7 @@ See the \fBFEATURE AREAS\fP section for details.
 .B DEB_VENDOR
 This setting defines the current vendor.
 If not set, it will discover the current vendor by reading
-\fB\%/etc/dpkg/origins/default\fP.
+\fB\%%PKGCONFDIR%/origins/default\fP.
 .TP
 .B DEB_BUILD_PATH
 This variable sets the build path (since dpkg 1.18.8) to use in features
@@ -474,7 +474,7 @@ This variable is currently Debian and derivatives-specific.
 .SH FILES
 .SS Configuration files
 .TP
-.B /etc/dpkg/buildflags.conf
+.B %PKGCONFDIR%/buildflags.conf
 System wide configuration file.
 .TP
 .BR $XDG_CONFIG_HOME/dpkg/buildflags.conf " or "
@@ -483,7 +483,7 @@ System wide configuration file.
 User configuration file.
 .SS Packaging support
 .TP
-.B /usr/share/dpkg/buildflags.mk
+.B %PKGDATADIR%/buildflags.mk
 Makefile snippet that will load (and optionally export) all flags
 supported by \fBdpkg-buildflags\fP into variables (since dpkg 1.16.1).
 .
@@ -538,7 +538,7 @@ can be picked up by your build system):
 .RS 4
 .nf
 DPKG_EXPORT_BUILDFLAGS = 1
-include /usr/share/dpkg/buildflags.mk
+include %PKGDATADIR%/buildflags.mk
 .fi
 .RE
 .PP
@@ -547,7 +547,7 @@ the variables (as none are exported by default):
 .PP
 .RS 4
 .nf
-include /usr/share/dpkg/buildflags.mk
+include %PKGDATADIR%/buildflags.mk
 export CPPFLAGS CFLAGS LDFLAGS
 .fi
 .RE
@@ -556,7 +556,7 @@ And you can of course pass the flags to commands manually:
 .PP
 .RS 4
 .nf
-include /usr/share/dpkg/buildflags.mk
+include %PKGDATADIR%/buildflags.mk
 build\-arch:
 \&	$(CC) \-o hello hello.c $(CPPFLAGS) $(CFLAGS) $(LDFLAGS)
 .fi
diff --git a/man/dpkg-buildpackage.1 b/man/dpkg-buildpackage.man
similarity index 99%
rename from man/dpkg-buildpackage.1
rename to man/dpkg-buildpackage.man
index 5d8d102..adefd99 100644
--- a/man/dpkg-buildpackage.1
+++ b/man/dpkg-buildpackage.man
@@ -19,7 +19,7 @@
 .\" You should have received a copy of the GNU General Public License
 .\" along with this program.  If not, see <https://www.gnu.org/licenses/>.
 .
-.TH dpkg\-buildpackage 1 "2015-07-05" "Debian Project" "dpkg utilities"
+.TH dpkg\-buildpackage 1 "%RELEASE_DATE%" "%VERSION%" "dpkg utilities"
 .SH NAME
 dpkg\-buildpackage \- build binary or source packages from sources
 .
@@ -426,7 +426,7 @@ Can be used multiple times.
 .TQ
 .BI "\-\-admindir " dir
 Change the location of the \fBdpkg\fR database (since dpkg 1.14.0).
-The default location is \fI/var/lib/dpkg\fP.
+The default location is \fI%ADMINDIR%\fP.
 .TP
 .BR \-? ", " \-\-help
 Show the usage message and exit.
@@ -486,7 +486,7 @@ latest entry in \fIdebian/changelog\fP, if it is not already defined.
 .
 .SH FILES
 .TP
-.I /etc/dpkg/buildpackage.conf
+.I %PKGCONFDIR%/buildpackage.conf
 System wide configuration file
 .TP
 .IR $XDG_CONFIG_HOME/dpkg/buildpackage.conf " or"
diff --git a/man/dpkg-checkbuilddeps.1 b/man/dpkg-checkbuilddeps.man
similarity index 96%
rename from man/dpkg-checkbuilddeps.1
rename to man/dpkg-checkbuilddeps.man
index 1449410..da256e0 100644
--- a/man/dpkg-checkbuilddeps.1
+++ b/man/dpkg-checkbuilddeps.man
@@ -17,7 +17,7 @@
 .\" You should have received a copy of the GNU General Public License
 .\" along with this program.  If not, see <https://www.gnu.org/licenses/>.
 .
-.TH dpkg\-checkbuilddeps 1 "2015-07-05" "Debian Project" "dpkg utilities"
+.TH dpkg\-checkbuilddeps 1 "%RELEASE_DATE%" "%VERSION%" "dpkg utilities"
 .SH NAME
 dpkg\-checkbuilddeps \- check build dependencies and conflicts
 .
@@ -38,7 +38,7 @@ may be specified on the command line.
 .TP
 .BI \-\-admindir= dir
 Change the location of the \fBdpkg\fR database (since dpkg 1.14.0).
-The default location is \fI/var/lib/dpkg\fP.
+The default location is \fI%ADMINDIR%\fP.
 .TP
 .B \-A
 Ignore \fBBuild\-Depends\-Arch\fP and \fBBuild\-Conflicts\-Arch\fP
diff --git a/man/dpkg-deb.1 b/man/dpkg-deb.man
similarity index 99%
rename from man/dpkg-deb.1
rename to man/dpkg-deb.man
index 9d66bd5..1dce20e 100644
--- a/man/dpkg-deb.1
+++ b/man/dpkg-deb.man
@@ -18,7 +18,7 @@
 .\" You should have received a copy of the GNU General Public License
 .\" along with this program.  If not, see <https://www.gnu.org/licenses/>.
 .
-.TH dpkg\-deb 1 "2014-08-20" "Debian Project" "dpkg suite"
+.TH dpkg\-deb 1 "%RELEASE_DATE%" "%VERSION%" "dpkg suite"
 .SH NAME
 dpkg\-deb \- Debian package archive (.deb) manipulation tool
 .
diff --git a/man/dpkg-distaddfile.1 b/man/dpkg-distaddfile.man
similarity index 96%
rename from man/dpkg-distaddfile.1
rename to man/dpkg-distaddfile.man
index 0565d72..a690404 100644
--- a/man/dpkg-distaddfile.1
+++ b/man/dpkg-distaddfile.man
@@ -16,7 +16,7 @@
 .\" You should have received a copy of the GNU General Public License
 .\" along with this program.  If not, see <https://www.gnu.org/licenses/>.
 .
-.TH dpkg\-distaddfile 1 "2012-05-04" "Debian Project" "dpkg utilities"
+.TH dpkg\-distaddfile 1 "%RELEASE_DATE%" "%VERSION%" "dpkg utilities"
 .SH NAME
 dpkg\-distaddfile \- add entries to debian/files
 .
diff --git a/man/dpkg-divert.1 b/man/dpkg-divert.man
similarity index 97%
rename from man/dpkg-divert.1
rename to man/dpkg-divert.man
index d2cfe05..0126f13 100644
--- a/man/dpkg-divert.1
+++ b/man/dpkg-divert.man
@@ -18,7 +18,7 @@
 .\" You should have received a copy of the GNU General Public License
 .\" along with this program.  If not, see <https://www.gnu.org/licenses/>.
 .
-.TH dpkg\-divert 1 "2011-08-14" "Debian Project" "dpkg utilities"
+.TH dpkg\-divert 1 "%RELEASE_DATE%" "%VERSION%" "dpkg utilities"
 .SH NAME
 dpkg\-divert \- override a package's version of a file
 .
@@ -64,7 +64,7 @@ Print the real name for a diverted file.
 .TP
 .BI \-\-admindir " directory"
 Set the \fBdpkg\fP data directory to \fIdirectory\fP (default:
-\fI/var/lib/dpkg\fP).
+\fI%ADMINDIR%\fP).
 .TP
 .BI \-\-divert " divert-to"
 \fIdivert-to\fP is the location where the versions of \fIfile\fP, as
@@ -119,7 +119,7 @@ specified, \fBdpkg\-divert\fP will use it as the package name.
 .
 .SH FILES
 .TP
-.I /var/lib/dpkg/diversions
+.I %ADMINDIR%/diversions
 File which contains the current list of diversions of the system. It is
 located in the \fBdpkg\fP administration directory, along with other files
 important to \fBdpkg\fP, such as \fIstatus\fP or \fIavailable\fP.
diff --git a/man/dpkg-genchanges.1 b/man/dpkg-genchanges.man
similarity index 98%
rename from man/dpkg-genchanges.1
rename to man/dpkg-genchanges.man
index a909580..ea4fb04 100644
--- a/man/dpkg-genchanges.1
+++ b/man/dpkg-genchanges.man
@@ -18,7 +18,7 @@
 .\" You should have received a copy of the GNU General Public License
 .\" along with this program.  If not, see <https://www.gnu.org/licenses/>.
 .
-.TH dpkg\-genchanges 1 "2014-09-24" "Debian Project" "dpkg utilities"
+.TH dpkg\-genchanges 1 "%RELEASE_DATE%" "%VERSION%" "dpkg utilities"
 .SH NAME
 dpkg\-genchanges \- generate Debian .changes files
 .
diff --git a/man/dpkg-gencontrol.1 b/man/dpkg-gencontrol.man
similarity index 98%
rename from man/dpkg-gencontrol.1
rename to man/dpkg-gencontrol.man
index 6d4b14b..d7d232e 100644
--- a/man/dpkg-gencontrol.1
+++ b/man/dpkg-gencontrol.man
@@ -18,7 +18,7 @@
 .\" You should have received a copy of the GNU General Public License
 .\" along with this program.  If not, see <https://www.gnu.org/licenses/>.
 .
-.TH dpkg\-gencontrol 1 "2013-09-06" "Debian Project" "dpkg utilities"
+.TH dpkg\-gencontrol 1 "%RELEASE_DATE%" "%VERSION%" "dpkg utilities"
 .SH NAME
 dpkg\-gencontrol \- generate Debian control files
 .
diff --git a/man/dpkg-gensymbols.1 b/man/dpkg-gensymbols.man
similarity index 99%
rename from man/dpkg-gensymbols.1
rename to man/dpkg-gensymbols.man
index 7b15769..93cf984 100644
--- a/man/dpkg-gensymbols.1
+++ b/man/dpkg-gensymbols.man
@@ -17,7 +17,7 @@
 .\" You should have received a copy of the GNU General Public License
 .\" along with this program.  If not, see <https://www.gnu.org/licenses/>.
 .
-.TH dpkg\-gensymbols 1 "2014-12-29" "Debian Project" "dpkg utilities"
+.TH dpkg\-gensymbols 1 "%RELEASE_DATE%" "%VERSION%" "dpkg utilities"
 .SH NAME
 dpkg\-gensymbols \- generate symbols files (shared library dependency information)
 .
diff --git a/man/dpkg-maintscript-helper.1 b/man/dpkg-maintscript-helper.man
similarity index 99%
rename from man/dpkg-maintscript-helper.1
rename to man/dpkg-maintscript-helper.man
index 1f777cc..e9053af 100644
--- a/man/dpkg-maintscript-helper.1
+++ b/man/dpkg-maintscript-helper.man
@@ -16,7 +16,7 @@
 .\" You should have received a copy of the GNU General Public License
 .\" along with this program.  If not, see <https://www.gnu.org/licenses/>.
 .
-.TH dpkg\-maintscript\-helper 1 "2014-09-01" "Debian Project" "dpkg suite"
+.TH dpkg\-maintscript\-helper 1 "%RELEASE_DATE%" "%VERSION%" "dpkg suite"
 .SH NAME
 dpkg\-maintscript\-helper \- works around known dpkg limitations in maintainer scripts
 .
diff --git a/man/dpkg-mergechangelogs.1 b/man/dpkg-mergechangelogs.man
similarity index 97%
rename from man/dpkg-mergechangelogs.1
rename to man/dpkg-mergechangelogs.man
index 3defbb2..c2e610f 100644
--- a/man/dpkg-mergechangelogs.1
+++ b/man/dpkg-mergechangelogs.man
@@ -15,7 +15,7 @@
 .\" You should have received a copy of the GNU General Public License
 .\" along with this program.  If not, see <https://www.gnu.org/licenses/>.
 .
-.TH dpkg\-mergechangelogs 1 "2011-08-14" "Debian Project" "dpkg suite"
+.TH dpkg\-mergechangelogs 1 "%RELEASE_DATE%" "%VERSION%" "dpkg suite"
 .SH NAME
 dpkg\-mergechangelogs \- 3-way merge of debian/changelog files
 .
diff --git a/man/dpkg-name.1 b/man/dpkg-name.man
similarity index 98%
rename from man/dpkg-name.1
rename to man/dpkg-name.man
index 691c250..1b0cb2c 100644
--- a/man/dpkg-name.1
+++ b/man/dpkg-name.man
@@ -16,7 +16,7 @@
 .\" You should have received a copy of the GNU General Public License
 .\" along with this program.  If not, see <https://www.gnu.org/licenses/>.
 .
-.TH dpkg\-name 1 "2012-04-15" "Debian Project" "dpkg utilities"
+.TH dpkg\-name 1 "%RELEASE_DATE%" "%VERSION%" "dpkg utilities"
 .SH NAME
 dpkg\-name \- rename Debian packages to full package names
 .
diff --git a/man/dpkg-parsechangelog.1 b/man/dpkg-parsechangelog.man
similarity index 99%
rename from man/dpkg-parsechangelog.1
rename to man/dpkg-parsechangelog.man
index 80d45f8..6aee98e 100644
--- a/man/dpkg-parsechangelog.1
+++ b/man/dpkg-parsechangelog.man
@@ -19,7 +19,7 @@
 .\" You should have received a copy of the GNU General Public License
 .\" along with this program.  If not, see <https://www.gnu.org/licenses/>.
 .
-.TH dpkg\-parsechangelog 1 "2013-07-06" "Debian Project" "dpkg utilities"
+.TH dpkg\-parsechangelog 1 "%RELEASE_DATE%" "%VERSION%" "dpkg utilities"
 .SH NAME
 dpkg\-parsechangelog \- parse Debian changelog files
 .
diff --git a/man/dpkg-query.1 b/man/dpkg-query.man
similarity index 98%
rename from man/dpkg-query.1
rename to man/dpkg-query.man
index 58eedc7..1effb77 100644
--- a/man/dpkg-query.1
+++ b/man/dpkg-query.man
@@ -18,7 +18,7 @@
 .\" You should have received a copy of the GNU General Public License
 .\" along with this program.  If not, see <https://www.gnu.org/licenses/>.
 .
-.TH dpkg\-query 1 "2015-01-17" "Debian Project" "dpkg suite"
+.TH dpkg\-query 1 "%RELEASE_DATE%" "%VERSION%" "dpkg suite"
 .SH NAME
 dpkg\-query \- a tool to query the dpkg database
 .
@@ -34,7 +34,7 @@ the \fBdpkg\fP database.
 .TP
 .BR \-l ", " \-\-list " [\fIpackage-name-pattern\fP...]"
 List packages matching given pattern. If no \fIpackage-name-pattern\fP
-is given, list all packages in \fI/var/lib/dpkg/status\fP, excluding
+is given, list all packages in \fI%ADMINDIR%/status\fP, excluding
 the ones marked as not-installed (i.e. those which have been previously
 purged). Normal shell wildcard characters are allowed
 in \fIpackage-name-pattern\fP. Please note you will probably have to
@@ -149,7 +149,7 @@ nor will it list alternatives.
 .TP
 .BR \-p ", " \-\-print\-avail " \fIpackage-name\fP..."
 Display details about \fIpackage-name\fP, as found in
-\fI/var/lib/dpkg/available\fP. When multiple \fIpackage-name\fP are
+\fI%ADMINDIR%/available\fP. When multiple \fIpackage-name\fP are
 listed, the requested \fIavailable\fP entries are separated by an empty
 line, with the same order as specified on the argument list.
 
@@ -168,7 +168,7 @@ Show the version and exit.
 .TP
 .BI \-\-admindir= dir
 Change the location of the \fBdpkg\fR database. The default location is
-\fI/var/lib/dpkg\fP.
+\fI%ADMINDIR%\fP.
 .TP
 .B \-\-load\-avail
 Also load the available file when using the \fB\-\-show\fP and \fB\-\-list\fP
diff --git a/man/dpkg-scanpackages.1 b/man/dpkg-scanpackages.man
similarity index 98%
rename from man/dpkg-scanpackages.1
rename to man/dpkg-scanpackages.man
index 913a473..407f041 100644
--- a/man/dpkg-scanpackages.1
+++ b/man/dpkg-scanpackages.man
@@ -18,7 +18,7 @@
 .\" You should have received a copy of the GNU General Public License
 .\" along with this program.  If not, see <https://www.gnu.org/licenses/>.
 .
-.TH dpkg\-scanpackages 1 "2012-05-07" "Debian Project" "dpkg utilities"
+.TH dpkg\-scanpackages 1 "%RELEASE_DATE%" "%VERSION%" "dpkg utilities"
 .SH NAME
 dpkg\-scanpackages \- create Packages index files
 .
diff --git a/man/dpkg-scansources.1 b/man/dpkg-scansources.man
similarity index 98%
rename from man/dpkg-scansources.1
rename to man/dpkg-scansources.man
index c98df31..4826b33 100644
--- a/man/dpkg-scansources.1
+++ b/man/dpkg-scansources.man
@@ -17,7 +17,7 @@
 .\" You should have received a copy of the GNU General Public License
 .\" along with this program.  If not, see <https://www.gnu.org/licenses/>.
 .
-.TH dpkg\-scansources 1 "2011-08-14" "Debian Project" "dpkg utilities"
+.TH dpkg\-scansources 1 "%RELEASE_DATE%" "%VERSION%" "dpkg utilities"
 .SH NAME
 dpkg\-scansources \- create Sources index files
 .
diff --git a/man/dpkg-shlibdeps.1 b/man/dpkg-shlibdeps.man
similarity index 97%
rename from man/dpkg-shlibdeps.1
rename to man/dpkg-shlibdeps.man
index 0a9d409..94b8bef 100644
--- a/man/dpkg-shlibdeps.1
+++ b/man/dpkg-shlibdeps.man
@@ -19,7 +19,7 @@
 .\" You should have received a copy of the GNU General Public License
 .\" along with this program.  If not, see <https://www.gnu.org/licenses/>.
 .
-.TH dpkg\-shlibdeps 1 "2013-09-06" "Debian Project" "dpkg utilities"
+.TH dpkg\-shlibdeps 1 "%RELEASE_DATE%" "%VERSION%" "dpkg utilities"
 .SH NAME
 dpkg\-shlibdeps \- generate shared library substvar dependencies
 .
@@ -57,8 +57,8 @@ file, or the
 file (if the former doesn't exist or if debian/shlibs.local contains
 the relevant dependency). Both files are supposed to be provided
 by the library package and should thus be available as
-/var/lib/dpkg/info/\fIpackage\fR.\fIsymbols\fR
-or /var/lib/dpkg/info/\fIpackage\fR.\fIshlibs\fR. The package name is
+%ADMINDIR%/info/\fIpackage\fR.\fIsymbols\fR
+or %ADMINDIR%/info/\fIpackage\fR.\fIshlibs\fR. The package name is
 identified in two steps: find the library file on the system (looking in
 the same directories that \fBld.so\fR would use), then use
 .BI "dpkg \-S " library-file
@@ -76,15 +76,15 @@ They are generated by
 They are only used if the library is found in a package's build tree. The
 symbols file in that build tree takes precedence over symbols files from
 other binary packages.
-.IP /etc/dpkg/symbols/\fIpackage\fR.symbols.\fIarch\fR
-.IP /etc/dpkg/symbols/\fIpackage\fR.symbols
+.IP %PKGCONFDIR%/symbols/\fIpackage\fR.symbols.\fIarch\fR
+.IP %PKGCONFDIR%/symbols/\fIpackage\fR.symbols
 Per-system overriding shared library dependency information.
 \fIarch\fR is the architecture of the current system (obtained by
 .BR "dpkg\-architecture \-qDEB_HOST_ARCH" ).
 .IP "Output from \(lq\fBdpkg\-query \-\-control\-path\fR \fIpackage\fR symbols\(rq"
 Package-provided shared library dependency information.
 Unless overridden by \fB\-\-admindir\fP, those files are located in
-/var/lib/dpkg.
+%ADMINDIR%.
 .P
 While scanning the symbols used by all binaries,
 .B dpkg\-shlibdeps
@@ -108,7 +108,7 @@ The dependencies for a library are looked up in several places. The first
 file providing information for the library of interest is used:
 .IP debian/shlibs.local
 Package-local overriding shared library dependency information.
-.IP /etc/dpkg/shlibs.override
+.IP %PKGCONFDIR%/shlibs.override
 Per-system overriding shared library dependency information.
 .IP debian/*/DEBIAN/shlibs
 Shared library information generated by the current build process that also invoked
@@ -119,8 +119,8 @@ other binary packages.
 .IP "Output from \(lq\fBdpkg\-query \-\-control\-path\fP \fIpackage\fR shlibs\(rq"
 Package-provided shared library dependency information.
 Unless overridden by \fB\-\-admindir\fP, those files are located in
-/var/lib/dpkg.
-.IP /etc/dpkg/shlibs.default
+%ADMINDIR%.
+.IP %PKGCONFDIR%/shlibs.default
 Per-system default shared library dependency information.
 .P
 The extracted dependencies are then directly used (except if they are
@@ -257,7 +257,7 @@ warnings to be active.
 .TP
 .BI \-\-admindir= dir
 Change the location of the \fBdpkg\fR database (since dpkg 1.14.0).
-The default location is \fI/var/lib/dpkg\fP.
+The default location is \fI%ADMINDIR%\fP.
 .TP
 .BR \-? ", " \-\-help
 Show the usage message and exit.
@@ -351,7 +351,7 @@ find out the dependency, it has tried to map the library to a Debian
 package with the help of
 .BI "dpkg \-S " library-file\fR.
 Then it checked the corresponding shlibs and symbols files in
-/var/lib/dpkg/info/, and in the various package's build trees
+%ADMINDIR%/info/, and in the various package's build trees
 (debian/*/DEBIAN/).
 
 This failure can be caused by a bad or missing shlibs or symbols file
diff --git a/man/dpkg-source.1 b/man/dpkg-source.man
similarity index 99%
rename from man/dpkg-source.1
rename to man/dpkg-source.man
index fd2b966..11e52de 100644
--- a/man/dpkg-source.1
+++ b/man/dpkg-source.man
@@ -20,7 +20,7 @@
 .\" You should have received a copy of the GNU General Public License
 .\" along with this program.  If not, see <https://www.gnu.org/licenses/>.
 .
-.TH dpkg\-source 1 "2013-12-05" "Debian Project" "dpkg utilities"
+.TH dpkg\-source 1 "%RELEASE_DATE%" "%VERSION%" "dpkg utilities"
 .SH NAME
 dpkg\-source \- Debian source package (.dsc) manipulation tool
 .
diff --git a/man/dpkg-split.1 b/man/dpkg-split.man
similarity index 98%
rename from man/dpkg-split.1
rename to man/dpkg-split.man
index 045bd26..34a5bd7 100644
--- a/man/dpkg-split.1
+++ b/man/dpkg-split.man
@@ -16,7 +16,7 @@
 .\" You should have received a copy of the GNU General Public License
 .\" along with this program.  If not, see <https://www.gnu.org/licenses/>.
 .
-.TH dpkg\-split 1 "2011-07-04" "Debian Project" "dpkg utilities"
+.TH dpkg\-split 1 "%RELEASE_DATE%" "%VERSION%" "dpkg utilities"
 .SH NAME
 dpkg\-split \- Debian package archive split/join tool
 .
@@ -152,7 +152,7 @@ Show the version and exit.
 .BI \-\-depotdir " directory"
 Specifies an alternative directory for the queue of parts awaiting
 automatic reassembly. The default is
-.BR /var/lib/dpkg .
+.BR %ADMINDIR% .
 .TP
 .BR \-S ", " \-\-partsize " \fIkibibytes\fP"
 Specifies the maximum part size when splitting, in kibibytes (1024
@@ -216,7 +216,7 @@ memory allocations, etc.
 .
 .SH FILES
 .TP
-.I /var/lib/dpkg/parts
+.I %ADMINDIR%/parts
 The default queue directory for part files awaiting automatic
 reassembly.
 
diff --git a/man/dpkg-statoverride.1 b/man/dpkg-statoverride.man
similarity index 95%
rename from man/dpkg-statoverride.1
rename to man/dpkg-statoverride.man
index a066198..2aa9329 100644
--- a/man/dpkg-statoverride.1
+++ b/man/dpkg-statoverride.man
@@ -16,7 +16,7 @@
 .\" You should have received a copy of the GNU General Public License
 .\" along with this program.  If not, see <https://www.gnu.org/licenses/>.
 .
-.TH dpkg\-statoverride 1 "2013-04-01" "Debian project" "dpkg utilities"
+.TH dpkg\-statoverride 1 "%RELEASE_DATE%" "Debian project" "dpkg utilities"
 .SH NAME
 dpkg\-statoverride \- override ownership and mode of files
 .
@@ -70,7 +70,7 @@ Show the version and exit.
 .TP
 .BI \-\-admindir " directory"
 Change the \fIdirectory\fP of the \fBdpkg\fP database where the statoverride
-file is also stored. Defaults to \fI/var/lib/dpkg\fP.
+file is also stored. Defaults to \fI%ADMINDIR%\fP.
 .TP
 .B \-\-force
 Force an action, even if a sanity check would otherwise prohibit it.
@@ -105,7 +105,7 @@ be used as the \fBdpkg\fP data directory.
 .
 .SH FILES
 .TP
-.I /var/lib/dpkg/statoverride
+.I %ADMINDIR%/statoverride
 File which contains the current list of stat overrides of the system. It
 is located in the \fBdpkg\fP administration directory, along with other files
 important to \fBdpkg\fP, such as \fIstatus\fP or \fIavailable\fP.
diff --git a/man/dpkg-trigger.1 b/man/dpkg-trigger.man
similarity index 95%
rename from man/dpkg-trigger.1
rename to man/dpkg-trigger.man
index f7b41cc..43688fe 100644
--- a/man/dpkg-trigger.1
+++ b/man/dpkg-trigger.man
@@ -15,7 +15,7 @@
 .\" You should have received a copy of the GNU General Public License
 .\" along with this program.  If not, see <https://www.gnu.org/licenses/>.
 .
-.TH dpkg\-trigger 1 "2011-08-14" "Debian Project" "dpkg suite"
+.TH dpkg\-trigger 1 "%RELEASE_DATE%" "%VERSION%" "dpkg suite"
 .SH NAME
 dpkg\-trigger \- a package trigger utility
 .
@@ -56,7 +56,7 @@ Show the version and exit.
 .TP
 .BI \-\-admindir= dir
 Change the location of the \fBdpkg\fR database. The default location is
-\fI/var/lib/dpkg\fP.
+\fI%ADMINDIR%\fP.
 .TP
 .BR \-\-by\-package=\fIpackage\fR
 Override trigger awaiter (normally set by \fBdpkg\fP through the
@@ -101,4 +101,5 @@ be used as the \fBdpkg\fP data directory.
 .SH SEE ALSO
 .BR dpkg (1),
 .BR deb\-triggers (5),
+.\" FIXME: Unhardcode the pathname, and use dpkg instead of dpkg-dev.
 .BR /usr/share/doc/dpkg\-dev/triggers.txt.gz .
diff --git a/man/dpkg-vendor.1 b/man/dpkg-vendor.man
similarity index 89%
rename from man/dpkg-vendor.1
rename to man/dpkg-vendor.man
index 9ad60e5..accac21 100644
--- a/man/dpkg-vendor.1
+++ b/man/dpkg-vendor.man
@@ -15,7 +15,7 @@
 .\" You should have received a copy of the GNU General Public License
 .\" along with this program.  If not, see <https://www.gnu.org/licenses/>.
 .
-.TH dpkg\-vendor 1 "2011-11-10" "Debian Project" "dpkg suite"
+.TH dpkg\-vendor 1 "%RELEASE_DATE%" "%VERSION%" "dpkg suite"
 .SH NAME
 dpkg\-vendor \- queries information about distribution vendors
 .
@@ -25,7 +25,7 @@ dpkg\-vendor \- queries information about distribution vendors
 .
 .SH DESCRIPTION
 \fBdpkg\-vendor\fP is a tool to query information about vendors listed in
-\fB/etc/dpkg/origins\fP. \fB/etc/dpkg/origins/default\fP contains
+\fB%PKGCONFDIR%/origins\fP. \fB%PKGCONFDIR%/origins/default\fP contains
 information about the current vendor.
 .
 .SH COMMANDS
@@ -54,13 +54,13 @@ Show the version and exit.
 .BI \-\-vendor " vendor"
 Assumes the current vendor is \fIvendor\fP instead of discovering it
 with the \fBDEB_VENDOR\fP environment variable or
-\fB/etc/dpkg/origins/default\fP.
+\fB%PKGCONFDIR%/origins/default\fP.
 .
 .SH ENVIRONMENT
 .TP
 \fBDEB_VENDOR\fP
 This setting defines the current vendor. If not set, it will discover the
-current vendor by reading \fB/etc/dpkg/origins/default\fP.
+current vendor by reading \fB%PKGCONFDIR%/origins/default\fP.
 .
 .SH SEE ALSO
 .BR deb\-origin (5).
diff --git a/man/dpkg.cfg.5 b/man/dpkg.cfg.man
similarity index 91%
rename from man/dpkg.cfg.5
rename to man/dpkg.cfg.man
index 16ccf6c..f35917c 100644
--- a/man/dpkg.cfg.5
+++ b/man/dpkg.cfg.man
@@ -16,7 +16,7 @@
 .\" You should have received a copy of the GNU General Public License
 .\" along with this program.  If not, see <https://www.gnu.org/licenses/>.
 .
-.TH dpkg.cfg 5 "2009-09-05" "Debian Project" "dpkg suite"
+.TH dpkg.cfg 5 "%RELEASE_DATE%" "%VERSION%" "dpkg suite"
 .SH NAME
 dpkg.cfg \- dpkg configuration file
 .
@@ -28,9 +28,9 @@ here. Quotes surrounding option values are stripped. Comments are
 allowed by starting a line with a hash sign (\(oq\fB#\fR\(cq).
 .
 .SH FILES
-.I /etc/dpkg/dpkg.cfg.d/[0-9a-zA-Z_-]*
+.I %PKGCONFDIR%/dpkg.cfg.d/[0-9a-zA-Z_-]*
 .br
-.I /etc/dpkg/dpkg.cfg
+.I %PKGCONFDIR%/dpkg.cfg
 .br
 .I ~/.dpkg.cfg
 .
diff --git a/man/dpkg.1 b/man/dpkg.man
similarity index 97%
rename from man/dpkg.1
rename to man/dpkg.man
index 56923cc..73d445e 100644
--- a/man/dpkg.1
+++ b/man/dpkg.man
@@ -23,7 +23,7 @@
 .\" You should have received a copy of the GNU General Public License
 .\" along with this program.  If not, see <https://www.gnu.org/licenses/>.
 .
-.TH dpkg 1 "2014-08-16" "Debian Project" "dpkg suite"
+.TH dpkg 1 "%RELEASE_DATE%" "%VERSION%" "dpkg suite"
 .SH NAME
 dpkg \- package manager for Debian
 .
@@ -188,7 +188,7 @@ later (conffiles are configuration files that are listed in the
 \fIDEBIAN/conffiles\fP control file).
 If \fB\-a\fP or \fB\-\-pending\fP is given instead of a package name,
 then all packages unpacked, but marked to be removed in file
-\fI/var/lib/dpkg/status\fP, are removed.
+\fI%ADMINDIR%/status\fP, are removed.
 
 Removing of a package consists of the following steps:
 .br
@@ -208,7 +208,7 @@ Purge an installed or already removed package. This removes everything,
 including conffiles.
 If \fB\-a\fP or \fB\-\-pending\fP is given instead of a package name,
 then all packages unpacked or removed, but marked to be purged in file
-\fI/var/lib/dpkg/status\fP, are purged.
+\fI%ADMINDIR%/status\fP, are purged.
 
 Note: some configuration files might be unknown to \fBdpkg\fP because they
 are created and handled separately through the configuration scripts. In
@@ -267,7 +267,7 @@ in the \fIPackages-file\fP. The \fIPackages-file\fP distributed with
 Debian is simply named \(Fo\fIPackages\fP\(Fc. If the \fIPackages-file\fP
 argument is missing or named \(Fo\fB\-\fP\(Fc then it will be read from
 standard input (since dpkg 1.17.7). \fBdpkg\fP keeps its record of
-available packages in \fI/var/lib/dpkg/available\fP.
+available packages in \fI%ADMINDIR%/available\fP.
 
 A simpler one-shot command to retrieve and update the \fIavailable\fR
 file is \fBdselect update\fR. Note that this file is mostly useless
@@ -444,15 +444,15 @@ See \fBdpkg\-query\fP(1) for more information about the following actions.
     Search for a filename from installed packages.
 \fB\-p\fP, \fB\-\-print\-avail\fP \fIpackage-name\fP...
     Display details about \fIpackage-name\fP, as found in
-    \fI/var/lib/dpkg/available\fP. Users of APT-based frontends
+    \fI%ADMINDIR%/available\fP. Users of APT-based frontends
     should use \fBapt\-cache show\fP \fIpackage-name\fP instead.
 .fi
 .
 .SH OPTIONS
 All options can be specified both on the command line and in the \fBdpkg\fP
-configuration file \fI/etc/dpkg/dpkg.cfg\fP or fragment files (with names
+configuration file \fI%PKGCONFDIR%/dpkg.cfg\fP or fragment files (with names
 matching this shell pattern \(aq[0-9a-zA-Z_-]*\(aq) on the configuration
-directory \fI/etc/dpkg/dpkg.cfg.d/\fP. Each line in the configuration
+directory \fI%PKGCONFDIR%/dpkg.cfg.d/\fP. Each line in the configuration
 file is either an option (exactly the same as the command line option but
 without leading hyphens) or a comment (if it starts with a \(oq\fB#\fP\(cq).
 .br
@@ -650,7 +650,7 @@ installed. This is an alias of \fB\-\-refuse\-downgrade\fP.
 .BI \-\-admindir= dir
 Change default administrative directory, which contains many files that
 give information about status of installed or uninstalled packages, etc.
-(Defaults to \(Fo\fI/var/lib/dpkg\fP\(Fc)
+(Defaults to \(Fo\fI%ADMINDIR%\fP\(Fc)
 .TP
 .BI \-\-instdir= dir
 Change default installation directory which refers to the directory where
@@ -661,7 +661,7 @@ means that the scripts see \fBinstdir\fP as a root directory.
 .TP
 .BI \-\-root= dir
 Changing \fBroot\fP changes \fBinstdir\fP to \(Fo\fIdir\fP\(Fc and
-\fBadmindir\fP to \(Fo\fIdir\fP\fB/var/lib/dpkg\fP\(Fc.
+\fBadmindir\fP to \(Fo\fIdir\fP\fB%ADMINDIR%\fP\(Fc.
 .TP
 \fB\-O\fP, \fB\-\-selected\-only\fP
 Only process the packages that are selected for installation. The
@@ -784,7 +784,7 @@ The output format used is the same as in \fB\-\-status\-fd\fP.
 .TP
 \fB\-\-log=\fP\fIfilename\fP
 Log status change updates and actions to \fIfilename\fP, instead of
-the default \fI/var/log/dpkg.log\fP. If this option is given multiple
+the default \fI%LOGDIR%/dpkg.log\fP. If this option is given multiple
 times, the last filename is used. Log messages are of the form:
 .RS
 .TP
@@ -931,23 +931,23 @@ requested (with the \fB\-\-debug\fP option) for the maintainer scripts
 .
 .SH FILES
 .TP
-.I /etc/dpkg/dpkg.cfg.d/[0-9a-zA-Z_-]*
+.I %PKGCONFDIR%/dpkg.cfg.d/[0-9a-zA-Z_-]*
 Configuration fragment files (since dpkg 1.15.4).
 .TP
-.I /etc/dpkg/dpkg.cfg
+.I %PKGCONFDIR%/dpkg.cfg
 Configuration file with default options.
 .TP
-.I /var/log/dpkg.log
-Default log file (see \fI/etc/dpkg/dpkg.cfg\fP(5) and option
+.I %LOGDIR%/dpkg.log
+Default log file (see \fI%PKGCONFDIR%/dpkg.cfg\fP and option
 \fB\-\-log\fP).
 .P
 The other files listed below are in their default directories, see option
 \fB\-\-admindir\fP to see how to change locations of these files.
 .TP
-.I /var/lib/dpkg/available
+.I %ADMINDIR%/available
 List of available packages.
 .TP
-.I /var/lib/dpkg/status
+.I %ADMINDIR%/status
 Statuses of available packages. This file contains information about
 whether a package is marked for removing or not, whether it is
 installed or not, etc. See section \fBINFORMATION ABOUT PACKAGES\fP
@@ -984,14 +984,14 @@ be used instead for that):
 \fB     dpkg \-l \(aq*vi*\(aq\fP
 .br
 
-To see the entries in \fI/var/lib/dpkg/available\fP of two packages:
+To see the entries in \fI%ADMINDIR%/available\fP of two packages:
 .br
 \fB     dpkg \-\-print\-avail elvis vim | less\fP
 .br
 
 To search the listing of packages yourself:
 .br
-\fB     less /var/lib/dpkg/available\fP
+\fB     less %ADMINDIR%/available\fP
 .br
 
 To remove an installed elvis package:
@@ -1059,5 +1059,5 @@ and
 \fBdpkg\-reconfigure\fP(8).
 .
 .SH AUTHORS
-See \fI/usr/share/doc/dpkg/THANKS\fP for the list of people who have
+See \fI%PKGDOCDIR%/THANKS\fP for the list of people who have
 contributed to \fBdpkg\fP.
diff --git a/man/dsc.5 b/man/dsc.man
similarity index 99%
rename from man/dsc.5
rename to man/dsc.man
index 3c6bc30..71ee0c0 100644
--- a/man/dsc.5
+++ b/man/dsc.man
@@ -16,7 +16,7 @@
 .\" You should have received a copy of the GNU General Public License
 .\" along with this program.  If not, see <https://www.gnu.org/licenses/>.
 .
-.TH dsc 5 "2015-06-01" "Debian Project" "Debian"
+.TH dsc 5 "%RELEASE_DATE%" "%VERSION%" "Debian"
 .SH NAME
 dsc \- Debian source packages' control file format
 .
diff --git a/man/dselect.cfg.5 b/man/dselect.cfg.man
similarity index 90%
rename from man/dselect.cfg.5
rename to man/dselect.cfg.man
index 252eb2a..157c664 100644
--- a/man/dselect.cfg.5
+++ b/man/dselect.cfg.man
@@ -16,7 +16,7 @@
 .\" You should have received a copy of the GNU General Public License
 .\" along with this program.  If not, see <https://www.gnu.org/licenses/>.
 .
-.TH dselect.cfg 5 "2011-07-03" "Debian Project" "dpkg suite"
+.TH dselect.cfg 5 "%RELEASE_DATE%" "%VERSION%" "dpkg suite"
 .SH NAME
 dselect.cfg \- dselect configuration file
 .
@@ -28,9 +28,9 @@ here. Quotes surrounding option values are stripped. Comments are
 allowed by starting a line with a hash sign (\(oq\fB#\fR\(cq).
 .
 .SH FILES
-.I /etc/dpkg/dselect.cfg.d/[0-9a-zA-Z_-]*
+.I %PKGCONFDIR%/dselect.cfg.d/[0-9a-zA-Z_-]*
 .br
-.I /etc/dpkg/dselect.cfg
+.I %PKGCONFDIR%/dselect.cfg
 .br
 .I ~/.dselect.cfg
 .
diff --git a/man/dselect.1 b/man/dselect.man
similarity index 98%
rename from man/dselect.1
rename to man/dselect.man
index f41e5b0..2cac244 100644
--- a/man/dselect.1
+++ b/man/dselect.man
@@ -19,7 +19,7 @@
 .\" You should have received a copy of the GNU General Public License
 .\" along with this program.  If not, see <https://www.gnu.org/licenses/>.
 .
-.TH dselect 1 "2014-08-11" "Debian Project" "Debian"
+.TH dselect 1 "%RELEASE_DATE%" "%VERSION%" "Debian"
 .SH NAME
 dselect \- Debian package management frontend
 .
@@ -56,8 +56,8 @@ of \fBdselect\fP or show additional information about the program.
 .
 .SH OPTIONS
 All options can be specified both on the command line and in the \fBdselect\fP
-configuration file \fI/etc/dpkg/dselect.cfg\fP or the files on the
-configuration directory \fI/etc/dpkg/dselect.cfg.d/\fP. Each line in the
+configuration file \fI%PKGCONFDIR%/dselect.cfg\fP or the files on the
+configuration directory \fI%PKGCONFDIR%/dselect.cfg.d/\fP. Each line in the
 configuration file is either an option (exactly the same as the
 command line option but without leading hyphens) or a comment (if it starts
 with a \(oq\fB#\fR\(cq).
@@ -66,7 +66,7 @@ with a \(oq\fB#\fR\(cq).
 .BI \-\-admindir " directory"
 Changes the directory where the dpkg \(oq\fIstatus\fP\(cq,
 \(oq\fIavailable\fP\(cq and similar files are located.
-This defaults to \fI/var/lib/dpkg\fP
+This defaults to \fI%ADMINDIR%\fP
 and normally there shouldn't be any need to change it.
 .TP
 .BR \-D "\fIfile\fP, " \-\-debug " \fIfile\fP"
diff --git a/man/po/po4a.cfg b/man/po/po4a.cfg
index 8754643..466f3e8 100644
--- a/man/po/po4a.cfg
+++ b/man/po/po4a.cfg
@@ -4,158 +4,158 @@
 # Make sure the man pages are generated with the right encoding.
 [po4a_alias:man] man opt:"-L UTF-8 -A UTF-8"
 
-[type:man] deb.5 $lang:$lang/deb.5 \
+[type:man] deb.man $lang:$lang/deb.man \
            add_$lang:po/$lang.add
 
-[type:man] deb822.5 $lang:$lang/deb822.5 \
+[type:man] deb822.man $lang:$lang/deb822.man \
            add_$lang:po/$lang.add
 
-[type:man] deb-changelog.5 $lang:$lang/deb-changelog.5 \
+[type:man] deb-changelog.man $lang:$lang/deb-changelog.man \
            add_$lang:po/$lang.add
 
-[type:man] deb-changes.5 $lang:$lang/deb-changes.5 \
+[type:man] deb-changes.man $lang:$lang/deb-changes.man \
            add_$lang:po/$lang.add
 
-[type:man] deb-control.5 $lang:$lang/deb-control.5 \
+[type:man] deb-control.man $lang:$lang/deb-control.man \
            add_$lang:po/$lang.add
 
-[type:man] deb-conffiles.5 $lang:$lang/deb-conffiles.5 \
+[type:man] deb-conffiles.man $lang:$lang/deb-conffiles.man \
            add_$lang:po/$lang.add
 
-[type:man] deb-src-control.5 $lang:$lang/deb-src-control.5 \
+[type:man] deb-src-control.man $lang:$lang/deb-src-control.man \
            add_$lang:po/$lang.add
 
-[type:man] deb-src-files.5 $lang:$lang/deb-src-files.5 \
+[type:man] deb-src-files.man $lang:$lang/deb-src-files.man \
            add_$lang:po/$lang.add
 
-[type:man] deb-split.5 $lang:$lang/deb-split.5 \
+[type:man] deb-split.man $lang:$lang/deb-split.man \
            add_$lang:po/$lang.add
 
-[type:man] deb-version.5 $lang:$lang/deb-version.5 \
+[type:man] deb-version.man $lang:$lang/deb-version.man \
            add_$lang:po/$lang.add
 
-[type:man] deb-old.5 $lang:$lang/deb-old.5 \
+[type:man] deb-old.man $lang:$lang/deb-old.man \
            add_$lang:po/$lang.add
 
-[type:man] deb-origin.5 $lang:$lang/deb-origin.5 \
+[type:man] deb-origin.man $lang:$lang/deb-origin.man \
            add_$lang:po/$lang.add
 
-[type:man] deb-override.5 $lang:$lang/deb-override.5 \
+[type:man] deb-override.man $lang:$lang/deb-override.man \
            add_$lang:po/$lang.add
 
-[type:man] deb-extra-override.5 $lang:$lang/deb-extra-override.5 \
+[type:man] deb-extra-override.man $lang:$lang/deb-extra-override.man \
            add_$lang:po/$lang.add
 
-[type:man] deb-shlibs.5 $lang:$lang/deb-shlibs.5 \
+[type:man] deb-shlibs.man $lang:$lang/deb-shlibs.man \
            add_$lang:po/$lang.add
 
-[type:man] deb-substvars.5 $lang:$lang/deb-substvars.5 \
+[type:man] deb-substvars.man $lang:$lang/deb-substvars.man \
            add_$lang:po/$lang.add
 
-[type:man] deb-symbols.5 $lang:$lang/deb-symbols.5 \
+[type:man] deb-symbols.man $lang:$lang/deb-symbols.man \
            add_$lang:po/$lang.add
 
-[type:man] deb-postinst.5 $lang:$lang/deb-postinst.5 \
+[type:man] deb-postinst.man $lang:$lang/deb-postinst.man \
            add_$lang:po/$lang.add
 
-[type:man] deb-postrm.5 $lang:$lang/deb-postrm.5 \
+[type:man] deb-postrm.man $lang:$lang/deb-postrm.man \
            add_$lang:po/$lang.add
 
-[type:man] deb-preinst.5 $lang:$lang/deb-preinst.5 \
+[type:man] deb-preinst.man $lang:$lang/deb-preinst.man \
            add_$lang:po/$lang.add
 
-[type:man] deb-prerm.5 $lang:$lang/deb-prerm.5 \
+[type:man] deb-prerm.man $lang:$lang/deb-prerm.man \
            add_$lang:po/$lang.add
 
-[type:man] deb-triggers.5 $lang:$lang/deb-triggers.5 \
+[type:man] deb-triggers.man $lang:$lang/deb-triggers.man \
            add_$lang:po/$lang.add
 
-[type:man] dsc.5 $lang:$lang/dsc.5 \
+[type:man] dsc.man $lang:$lang/dsc.man \
            add_$lang:po/$lang.add
 
-[type:man] dpkg.1 $lang:$lang/dpkg.1 \
+[type:man] dpkg.man $lang:$lang/dpkg.man \
            add_$lang:po/$lang.add
 
-[type:man] dpkg-architecture.1 $lang:$lang/dpkg-architecture.1 \
+[type:man] dpkg-architecture.man $lang:$lang/dpkg-architecture.man \
            add_$lang:po/$lang.add
 
-[type:man] dpkg.cfg.5 $lang:$lang/dpkg.cfg.5 \
+[type:man] dpkg.cfg.man $lang:$lang/dpkg.cfg.man \
            add_$lang:po/$lang.add
 
-[type:man] dpkg-buildflags.1 $lang:$lang/dpkg-buildflags.1 \
+[type:man] dpkg-buildflags.man $lang:$lang/dpkg-buildflags.man \
            add_$lang:po/$lang.add
 
-[type:man] dpkg-buildpackage.1 $lang:$lang/dpkg-buildpackage.1 \
+[type:man] dpkg-buildpackage.man $lang:$lang/dpkg-buildpackage.man \
            add_$lang:po/$lang.add
 
-[type:man] dpkg-checkbuilddeps.1 $lang:$lang/dpkg-checkbuilddeps.1 \
+[type:man] dpkg-checkbuilddeps.man $lang:$lang/dpkg-checkbuilddeps.man \
            add_$lang:po/$lang.add
 
-[type:man] dpkg-distaddfile.1 $lang:$lang/dpkg-distaddfile.1 \
+[type:man] dpkg-distaddfile.man $lang:$lang/dpkg-distaddfile.man \
            add_$lang:po/$lang.add
 
-[type:man] dpkg-deb.1 $lang:$lang/dpkg-deb.1 \
+[type:man] dpkg-deb.man $lang:$lang/dpkg-deb.man \
            add_$lang:po/$lang.add
 
-[type:man] dpkg-divert.1 $lang:$lang/dpkg-divert.1 \
+[type:man] dpkg-divert.man $lang:$lang/dpkg-divert.man \
            add_$lang:po/$lang.add
 
-[type:man] dpkg-genchanges.1 $lang:$lang/dpkg-genchanges.1 \
+[type:man] dpkg-genchanges.man $lang:$lang/dpkg-genchanges.man \
            add_$lang:po/$lang.add
 
-[type:man] dpkg-gencontrol.1 $lang:$lang/dpkg-gencontrol.1 \
+[type:man] dpkg-gencontrol.man $lang:$lang/dpkg-gencontrol.man \
            add_$lang:po/$lang.add
 
-[type:man] dpkg-gensymbols.1 $lang:$lang/dpkg-gensymbols.1 \
+[type:man] dpkg-gensymbols.man $lang:$lang/dpkg-gensymbols.man \
            add_$lang:po/$lang.add
 
-[type:man] dpkg-maintscript-helper.1 $lang:$lang/dpkg-maintscript-helper.1 \
+[type:man] dpkg-maintscript-helper.man $lang:$lang/dpkg-maintscript-helper.man \
            add_$lang:po/$lang.add
 
-[type:man] dpkg-mergechangelogs.1 $lang:$lang/dpkg-mergechangelogs.1 \
+[type:man] dpkg-mergechangelogs.man $lang:$lang/dpkg-mergechangelogs.man \
            add_$lang:po/$lang.add
 
-[type:man] dpkg-name.1 $lang:$lang/dpkg-name.1 \
+[type:man] dpkg-name.man $lang:$lang/dpkg-name.man \
            add_$lang:po/$lang.add
 
-[type:man] dpkg-parsechangelog.1 $lang:$lang/dpkg-parsechangelog.1 \
+[type:man] dpkg-parsechangelog.man $lang:$lang/dpkg-parsechangelog.man \
            add_$lang:po/$lang.add
 
-[type:man] dpkg-query.1 $lang:$lang/dpkg-query.1 \
+[type:man] dpkg-query.man $lang:$lang/dpkg-query.man \
            add_$lang:po/$lang.add
 
-[type:man] dpkg-scanpackages.1 $lang:$lang/dpkg-scanpackages.1 \
+[type:man] dpkg-scanpackages.man $lang:$lang/dpkg-scanpackages.man \
            add_$lang:po/$lang.add
 
-[type:man] dpkg-scansources.1 $lang:$lang/dpkg-scansources.1 \
+[type:man] dpkg-scansources.man $lang:$lang/dpkg-scansources.man \
            add_$lang:po/$lang.add
 
-[type:man] dpkg-shlibdeps.1 $lang:$lang/dpkg-shlibdeps.1 \
+[type:man] dpkg-shlibdeps.man $lang:$lang/dpkg-shlibdeps.man \
            add_$lang:po/$lang.add
 
-[type:man] dpkg-source.1 $lang:$lang/dpkg-source.1 \
+[type:man] dpkg-source.man $lang:$lang/dpkg-source.man \
            add_$lang:po/$lang.add
 
-[type:man] dpkg-split.1 $lang:$lang/dpkg-split.1 \
+[type:man] dpkg-split.man $lang:$lang/dpkg-split.man \
            add_$lang:po/$lang.add
 
-[type:man] dpkg-statoverride.1 $lang:$lang/dpkg-statoverride.1 \
+[type:man] dpkg-statoverride.man $lang:$lang/dpkg-statoverride.man \
            add_$lang:po/$lang.add
 
-[type:man] dpkg-trigger.1 $lang:$lang/dpkg-trigger.1 \
+[type:man] dpkg-trigger.man $lang:$lang/dpkg-trigger.man \
            add_$lang:po/$lang.add
 
-[type:man] dpkg-vendor.1 $lang:$lang/dpkg-vendor.1 \
+[type:man] dpkg-vendor.man $lang:$lang/dpkg-vendor.man \
            add_$lang:po/$lang.add
 
-[type:man] dselect.1 $lang:$lang/dselect.1 \
+[type:man] dselect.man $lang:$lang/dselect.man \
            add_$lang:po/$lang.add
 
-[type:man] dselect.cfg.5 $lang:$lang/dselect.cfg.5 \
+[type:man] dselect.cfg.man $lang:$lang/dselect.cfg.man \
            add_$lang:po/$lang.add
 
-[type:man] start-stop-daemon.8 $lang:$lang/start-stop-daemon.8 \
+[type:man] start-stop-daemon.man $lang:$lang/start-stop-daemon.man \
            add_$lang:po/$lang.add
 
-[type:man] update-alternatives.1 $lang:$lang/update-alternatives.1 \
+[type:man] update-alternatives.man $lang:$lang/update-alternatives.man \
            add_$lang:po/$lang.add
diff --git a/man/start-stop-daemon.8 b/man/start-stop-daemon.man
similarity index 99%
rename from man/start-stop-daemon.8
rename to man/start-stop-daemon.man
index deae6c6..9de5db5 100644
--- a/man/start-stop-daemon.8
+++ b/man/start-stop-daemon.man
@@ -20,7 +20,7 @@
 .\" You should have received a copy of the GNU General Public License
 .\" along with this program.  If not, see <https://www.gnu.org/licenses/>.
 .
-.TH start\-stop\-daemon 8 "2014-03-26" "Debian Project" "dpkg utilities"
+.TH start\-stop\-daemon 8 "%RELEASE_DATE%" "%VERSION%" "dpkg utilities"
 .SH NAME
 start\-stop\-daemon \- start and stop system daemon programs
 .
diff --git a/man/update-alternatives.1 b/man/update-alternatives.man
similarity index 98%
rename from man/update-alternatives.1
rename to man/update-alternatives.man
index 1eeab79..a9ba6ba 100644
--- a/man/update-alternatives.1
+++ b/man/update-alternatives.man
@@ -22,7 +22,7 @@
 .\" You should have received a copy of the GNU General Public License
 .\" along with this program.  If not, see <https://www.gnu.org/licenses/>.
 .
-.TH update\-alternatives 1 "2012-07-31" "Debian Project" "dpkg utilities"
+.TH update\-alternatives 1 "%RELEASE_DATE%" "%VERSION%" "dpkg utilities"
 .SH NAME
 update\-alternatives \- maintain symbolic links determining default commands
 .
@@ -72,7 +72,7 @@ Instead, it is a symbolic link to a name in the
 which in turn is a symbolic link to the actual file referenced.
 This is done so that the system administrator's changes can be confined
 within the
-.I /etc
+.I %CONFDIR%
 directory: the FHS (q.v.) gives reasons why this is a Good Thing.
 .PP
 When each package
@@ -185,12 +185,12 @@ accessible via a generic name using the alternatives system.
 .TP
 alternatives directory
 A directory, by default
-.IR /etc/alternatives ,
+.IR %CONFDIR%/alternatives ,
 containing the symlinks.
 .TP
 administrative directory
 A directory, by default
-.IR /var/lib/dpkg/alternatives ,
+.IR %ADMINDIR%/alternatives ,
 containing
 .BR update\-alternatives '
 state information.
@@ -352,7 +352,7 @@ different from the default.
 .TP
 .BI \-\-log " file"
 Specifies the log file (since version 1.15.0), when this is to be different
-from the default (/var/log/alternatives.log).
+from the default (%LOGDIR%/alternatives.log).
 .TP
 .BI \-\-force
 Allow replacing or dropping any real file that is installed
@@ -386,13 +386,13 @@ be used as the base administrative directory.
 .
 .SH FILES
 .TP
-.I /etc/alternatives/
+.I %CONFDIR%/alternatives/
 The default alternatives directory.
 Can be overridden by the
 .B \-\-altdir
 option.
 .TP
-.I /var/lib/dpkg/alternatives/
+.I %ADMINDIR%/alternatives/
 The default administration directory.
 Can be overridden by the
 .B \-\-admindir
diff --git a/man/utf8toman.sed b/man/utf8toman.sed
new file mode 100644
index 0000000..e1b6e71
--- /dev/null
+++ b/man/utf8toman.sed
@@ -0,0 +1,88 @@
+s/‐/\\(hy/g
+s/–/\\(en/g
+s/—/\\(em/g
+s/•/\\(bu/g
+s/¡/\\(r!/g
+s/¿/\\(r?/g
+s/«/\\(Fo/g
+s/»/\\(Fc/g
+s/‘/\\(oq/g
+s/’/\\(cq/g
+s/‚/\\(bq/g
+s/“/\\(lq/g
+s/”/\\(rq/g
+s/„/\\(Bq/g
+s/‹/\\(fo/g
+s/›/\\(fc/g
+s/À/\\(`A/g
+s/Á/\\('A/g
+s/Â/\\(^A/g
+s/Ã/\\(~A/g
+s/Ä/\\(:A/g
+s/Å/\\(oA/g
+s/Æ/\\(AE/g
+s/Ç/\\(,C/g
+s/È/\\(`E/g
+s/É/\\('E/g
+s/Ê/\\(^E/g
+s/Ë/\\(:E/g
+s/Ì/\\(`I/g
+s/Í/\\('I/g
+s/Î/\\(^I/g
+s/Ï/\\(:I/g
+s/Ñ/\\(~N/g
+s/Ò/\\(`O/g
+s/Ó/\\('O/g
+s/Ô/\\(^O/g
+s/Õ/\\(~O/g
+s/Ö/\\(:O/g
+s/Ø/\\(\/O/g
+s/Ù/\\(`U/g
+s/Ú/\\('U/g
+s/Û/\\(^U/g
+s/Ü/\\(:U/g
+s/Ý/\\('Y/g
+s/ß/\\(ss/g
+s/à/\\(`a/g
+s/á/\\('a/g
+s/â/\\(^a/g
+s/ã/\\(~a/g
+s/ä/\\(:a/g
+s/å/\\(oa/g
+s/æ/\\(ae/g
+s/ç/\\(,c/g
+s/è/\\(`e/g
+s/é/\\('e/g
+s/ê/\\(^e/g
+s/ë/\\(:e/g
+s/ì/\\(`i/g
+s/í/\\('i/g
+s/î/\\(^i/g
+s/ï/\\(:i/g
+s/ñ/\\(~n/g
+s/ò/\\(`o/g
+s/ó/\\('o/g
+s/ô/\\(^o/g
+s/õ/\\(~o/g
+s/ö/\\(:o/g
+s/ø/\\(\/o/g
+s/ù/\\(`u/g
+s/ú/\\('u/g
+s/û/\\(^u/g
+s/ü/\\(:u/g
+s/ý/\\('y/g
+s/ÿ/\\(:y/g
+s/Ć/\\('C/g
+s/ć/\\('c/g
+s/ı/\\(.i/g
+s/IJ/\\(IJ/g
+s/ij/\\(ij/g
+s/Ł/\\(\/L/g
+s/ł/\\(\/l/g
+s/Œ/\\(OE/g
+s/œ/\\(oe/g
+s/Š/\\(vS/g
+s/š/\\(vs/g
+s/Ÿ/\\(:Y/g
+s/Ž/\\(vZ/g
+s/ž/\\(vz/g

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/reproducible/dpkg.git



More information about the Reproducible-commits mailing list