The following commit has been merged in the master branch:
commit 99d10e43d038693d59d455ec3402857fc57da034
Author: Raphaël Hertzog <[email protected]>
Date: Fri Feb 26 11:00:57 2010 +0100
Generate manual pages for perl modules with pod2man
diff --git a/configure.ac b/configure.ac
index 337e937..f854756 100644
--- a/configure.ac
+++ b/configure.ac
@@ -79,6 +79,7 @@ AC_CHECK_PROGS([DOXYGEN], [doxygen])
AC_CHECK_PROG([HAVE_DOT], [dot], [YES], [NO])
DPKG_PROG_PO4A
DPKG_PROG_PERL
+DPKG_PROG_POD2MAN
# Checks for operating system services and capabilities.
AC_SYS_LARGEFILE
diff --git a/debian/changelog b/debian/changelog
index 7331669..bc5798f 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -58,6 +58,7 @@ dpkg (1.15.6) UNRELEASED; urgency=low
* dpkg-source supports long option names --diff-ignore and --tar-ignore for
-i and -I. A new option --extend-diff-ignore is introduced. Those options
can thus now be used in debian/source/options.
+ * Generate manual pages for perl modules.
[ Guillem Jover ]
* Handle argument parsing in dpkg-checkbuilddeps and dpkg-scanpackages
diff --git a/debian/dpkg-dev.install b/debian/dpkg-dev.install
index 6f7bd75..e8d74ba 100644
--- a/debian/dpkg-dev.install
+++ b/debian/dpkg-dev.install
@@ -42,4 +42,5 @@ usr/share/man/{*/*,*}/dpkg-scansources.1
usr/share/man/{*/*,*}/dpkg-shlibdeps.1
usr/share/man/{*/*,*}/dpkg-source.1
usr/share/man/{*/*,*}/dpkg-vendor.1
+usr/share/man/man3/Dpkg*.3
usr/share/perl5/Dpkg
diff --git a/m4/dpkg-progs.m4 b/m4/dpkg-progs.m4
index e79b221..2c26aca 100644
--- a/m4/dpkg-progs.m4
+++ b/m4/dpkg-progs.m4
@@ -27,3 +27,10 @@ fi
AC_SUBST([USE_PO4A])
])# DPKG_PROG_PO4A
+# DPKG_PROG_POD2MAN
+# --------------
+AC_DEFUN([DPKG_PROG_POD2MAN], [
+AC_CHECK_PROGS([POD2MAN], [pod2man])
+AM_CONDITIONAL(BUILD_POD_DOC, [test "x$POD2MAN" != "x"])
+])# DPKG_PROG_POD2MAN
+
diff --git a/scripts/Makefile.am b/scripts/Makefile.am
index 929bb9c..d2204ea 100644
--- a/scripts/Makefile.am
+++ b/scripts/Makefile.am
@@ -106,6 +106,9 @@ nobase_dist_perllib_DATA = \
Dpkg/Version.pm \
Dpkg.pm
+# Keep it even if empty to have man3dir correctly set
+man3_MANS =
+
do_perl_subst = $(AM_V_GEN) \
sed -e "s:^\#![:space:]*/usr/bin/perl:\#!$(PERL):" \
-e
"s:\$$dpkglibdir[[:space:]]*=[[:space:]]*['\"][^'\"]*['\"]:\$$dpkglibdir=\"$(pkglibdir)\":"
\
@@ -119,8 +122,22 @@ do_perl_subst = $(AM_V_GEN) \
$(do_perl_subst) <$< >$@
$(AM_V_at) chmod +x $@
-if WITH_UPDATE_ALTERNATIVES
install-data-local:
+if BUILD_POD_DOC
+# Install manual pages for perl modules manually as make can't deal
+# properly with filenames containing colons
+# Remove empty manual pages (perl modules not documented)
+ $(mkdir_p) $(DESTDIR)$(man3dir)
+ for module in $(nobase_dist_perllib_DATA); do \
+ name=`echo $$module | sed -e 's|/|::|g' -e 's/\.pm$$//'`; \
+ pod2man --utf8 --center=libdpkg-perl --release=$(VERSION) \
+ --name="$$name" --section=3 $(srcdir)/$$module \
+ >$(DESTDIR)$(man3dir)/$$name.3; \
+ test -s $(DESTDIR)$(man3dir)/$$name.3 || \
+ rm -f $(DESTDIR)$(man3dir)/$$name.3; \
+ done
+endif
+if WITH_UPDATE_ALTERNATIVES
$(mkdir_p) $(DESTDIR)$(sysconfdir)/alternatives
$(mkdir_p) $(DESTDIR)$(admindir)/alternatives
$(INSTALL_DATA) $(srcdir)/README.alternatives
$(DESTDIR)$(sysconfdir)/alternatives/README
@@ -135,6 +152,11 @@ install-data-hook:
rm $(DESTDIR)$(perllibdir)/Dpkg.pm.tmp
uninstall-local:
+if BUILD_POD_DOC
+ for module in $(nobase_dist_perllib_DATA); do \
+ rm -f $(DESTDIR)$(man3dir)/`echo $$module | sed -e 's|/|::|' -e
's/\.pm$$/.3/'`; \
+ done
+endif
rm -f $(DESTDIR)$(sysconfdir)/alternatives/README
TEST_VERBOSE= 0
@@ -192,6 +214,7 @@ test_data = \
t/750_Dpkg_Substvars/substvars1
clean-local:
+ rm -fr man
rm -fr $(test_tmpdir)
check: $(test_data) $(test_cases)
--
dpkg's main repository
--
To UNSUBSCRIBE, email to [email protected]
with a subject of "unsubscribe". Trouble? Contact [email protected]