From 531a058457fab3f7332af49b8bd95b585b1a8e79 Mon Sep 17 00:00:00 2001 From: Rafael Garcia-Suarez Date: Mon, 20 Mar 2006 15:19:07 +0000 Subject: Install localized manpages if asked --- Makefile.PL | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) (limited to 'Makefile.PL') diff --git a/Makefile.PL b/Makefile.PL index 8a3207ab..c41c9f03 100644 --- a/Makefile.PL +++ b/Makefile.PL @@ -9,6 +9,7 @@ use ExtUtils::MakeMaker; # --without-rpm : don't use rpm to find some paths, and generate make targets # to produce an rpm of this # --install-po : compile .po files and install locale files +# also, install localized man pages # --install-gui : install gurpmi my $with_rpm = 1; $with_rpm = 0 if grep $_ eq '--without-rpm', @ARGV; my $with_po = 0; $with_po = 1 if grep $_ eq '--install-po', @ARGV; @@ -74,6 +75,14 @@ sub special_targets { $inherited; } +sub manifypods { + my $inherited = shift->SUPER::manifypods(@_); + #- TODO repartition of man pages in sections by pod2man is incorrect + #- TODO as more languages are added adapt the following quick hack + $with_po and $inherited =~ s/\t\$/\t\$(NOECHO) \$(MKPATH) \$(INST_MAN8DIR)\/fr\n$&/; + $inherited; +} + # Additional targets sub postamble { <<"**MM**"; @@ -147,7 +156,7 @@ WriteMakefile( $targ =~ s/\.(\d)\.pod$//; my $section = $1 || 1; ( $_ => "\$(INST_MAN${section}DIR)/$targ.$section" ); - } + } , $with_po ? : () }, dist => { COMPRESS => "bzip2", SUFFIX => ".bz2" }, ); -- cgit v1.2.1