summaryrefslogtreecommitdiffstats
path: root/Makefile.PL
diff options
context:
space:
mode:
authorRafael Garcia-Suarez <rgarciasuarez@mandriva.org>2005-11-25 11:16:59 +0000
committerRafael Garcia-Suarez <rgarciasuarez@mandriva.org>2005-11-25 11:16:59 +0000
commit5883745ca5dca8f4e79b4359b0651e1a693a6fcd (patch)
tree880aff1311298e2e3e0950829041575d73227d42 /Makefile.PL
parent652d40895cc6b25c95f8cb84876e58f4b1871a1f (diff)
downloadurpmi-5883745ca5dca8f4e79b4359b0651e1a693a6fcd.tar
urpmi-5883745ca5dca8f4e79b4359b0651e1a693a6fcd.tar.gz
urpmi-5883745ca5dca8f4e79b4359b0651e1a693a6fcd.tar.bz2
urpmi-5883745ca5dca8f4e79b4359b0651e1a693a6fcd.tar.xz
urpmi-5883745ca5dca8f4e79b4359b0651e1a693a6fcd.zip
Add the ability to install locale files
Diffstat (limited to 'Makefile.PL')
-rw-r--r--Makefile.PL15
1 files changed, 10 insertions, 5 deletions
diff --git a/Makefile.PL b/Makefile.PL
index 00c652f7..7c54880e 100644
--- a/Makefile.PL
+++ b/Makefile.PL
@@ -6,8 +6,11 @@ use strict;
use ExtUtils::MakeMaker;
# Command-line parsing.
-my $with_rpm = 1;
-$with_rpm = 0 if grep $_ eq '--without-rpm', @ARGV;
+# --without-rpm : 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
+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;
# Directory where to build an rpm of this
my $rpmtopdir = $with_rpm ? qx(rpm --eval %_topdir) : '';
@@ -44,7 +47,8 @@ sub install {
# and new manpage sections
$inherited =~ s/\$\(INST_BIN\) \$\(DESTINSTALL(\w*)BIN\)/$& \$(INST_SBIN) \$(DESTINSTALL$1SBIN) \$(INST_MAN5DIR) \$(DESTINSTALLMAN5DIR) \$(INST_MAN8DIR) \$(DESTINSTALLMAN8DIR)/g;
# install files under /etc and /var
- $inherited =~ s/^install ::/$& installconfigfiles installstatedir/gm;
+ my $po = $with_po ? ' installpo' : '';
+ $inherited =~ s/^install ::/$& installconfigfiles installstatedir$po/gm;
$inherited;
}
@@ -61,8 +65,8 @@ sub postamble {
<<"**MM**";
.PHONY: installconfigfiles installstatedir ChangeLog rpmdist srpm rpm
-po:
- \$(MAKE) -C \$\@
+installpo:
+ \$(MAKE) -C po install
installconfigfiles:
install -d \$(SYSCONFDIR)/urpmi
@@ -117,6 +121,7 @@ WriteMakefile(
},
EXE_FILES => [ @bin_scripts, @sbin_scripts ],
PMLIBDIRS => [ qw(urpm) ],
+ DIR => $with_po ? [ 'po' ] : undef,
MAN1PODS => {
map {
my $targ = $_;