summaryrefslogtreecommitdiffstats
path: root/Makefile.PL
diff options
context:
space:
mode:
authorRafael Garcia-Suarez <rgarciasuarez@mandriva.org>2005-11-25 12:56:42 +0000
committerRafael Garcia-Suarez <rgarciasuarez@mandriva.org>2005-11-25 12:56:42 +0000
commit62eba37b4912d36a84d1fdc976bbba5e312fb98d (patch)
tree735c459a8b163078ccf65e9faddf5f6d6ad75648 /Makefile.PL
parentb2c239912305f20a1593faee543f797c5a09266f (diff)
downloadurpmi-62eba37b4912d36a84d1fdc976bbba5e312fb98d.tar
urpmi-62eba37b4912d36a84d1fdc976bbba5e312fb98d.tar.gz
urpmi-62eba37b4912d36a84d1fdc976bbba5e312fb98d.tar.bz2
urpmi-62eba37b4912d36a84d1fdc976bbba5e312fb98d.tar.xz
urpmi-62eba37b4912d36a84d1fdc976bbba5e312fb98d.zip
Add an option to install gurpmi
Diffstat (limited to 'Makefile.PL')
-rw-r--r--Makefile.PL16
1 files changed, 12 insertions, 4 deletions
diff --git a/Makefile.PL b/Makefile.PL
index 7c54880e..5aa81702 100644
--- a/Makefile.PL
+++ b/Makefile.PL
@@ -9,8 +9,10 @@ use ExtUtils::MakeMaker;
# --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
+# --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;
+my $with_po = 0; $with_po = 1 if grep $_ eq '--install-po', @ARGV;
+my $with_gui = 0; $with_gui = 1 if grep $_ eq '--install-gui', @ARGV;
# Directory where to build an rpm of this
my $rpmtopdir = $with_rpm ? qx(rpm --eval %_topdir) : '';
@@ -19,6 +21,10 @@ chomp $rpmtopdir;
# All scripts, some of them go in /usr/sbin (see DESTINSTALLSBIN below)
our @bin_scripts = qw(urpmq urpmf rpm-find-leaves);
our @sbin_scripts = qw(urpmi urpme urpmi.addmedia urpmi.update urpmi.removemedia rurpmi);
+if ($with_gui) {
+ push @bin_scripts, qw(gurpmi);
+ push @sbin_scripts, qw(gurpmi2);
+}
# And now, add some functionality to MakeMaker.
package MY;
@@ -48,7 +54,8 @@ sub install {
$inherited =~ s/\$\(INST_BIN\) \$\(DESTINSTALL(\w*)BIN\)/$& \$(INST_SBIN) \$(DESTINSTALL$1SBIN) \$(INST_MAN5DIR) \$(DESTINSTALLMAN5DIR) \$(INST_MAN8DIR) \$(DESTINSTALLMAN8DIR)/g;
# install files under /etc and /var
my $po = $with_po ? ' installpo' : '';
- $inherited =~ s/^install ::/$& installconfigfiles installstatedir$po/gm;
+ my $gui = $with_gui ? ' installgurpmi2' : '';
+ $inherited =~ s/^install ::/$& installconfigfiles installstatedir$po$gui/gm;
$inherited;
}
@@ -75,6 +82,9 @@ installconfigfiles:
installstatedir:
install -d \$(LOCALSTATEDIR)/urpmi
+installgurpmi2: pure_install
+ ln -s -f consolehelper \$(DESTINSTALLSCRIPT)/gurpmi2
+
ChangeLog:
cvs2cl -W 400 -I ChangeLog --accum -U ../../soft/common/username
rm -f *.bak
@@ -91,8 +101,6 @@ rpm: rpmdist
**MM**
}
-# TODO gurpmi, gurpmi2 (need console-helper)
-
# Back to our schedule
package main;