diff --git a/INSTALL b/INSTALL index 04717a2..fcf2ecb 100644 --- a/INSTALL +++ b/INSTALL @@ -1,4 +1,4 @@ -To try alien before installing, just run ./alien from this directory. Most +To try alien before installing, just run ./alien.pl from this directory. Most features will work prior to installation. To install alien, become root and type: diff --git a/Makefile.PL b/Makefile.PL index ae5d8c0..386690b 100755 --- a/Makefile.PL +++ b/Makefile.PL @@ -26,6 +26,10 @@ extra_install: -rm -f $(PREFIX)/usr/share/alien/patches/*.gz gzip -qf9 $(PREFIX)/usr/share/alien/patches/* +alien: + perl -pe ' \ + $$_="\tmy \$$version_string=\"$(VER)\";" \ + if /VERSION_AUTOREPLACE/' alien.pl > alien } } @@ -35,6 +39,6 @@ WriteMakefile( # Pure evil. Hook into build and install targets 'depend' => {'all:' => 'extra_build', 'install:' => 'extra_install', - 'pure_install:' => 'extra_install'}, - 'clean' => {FILES => 'alien.lsm'}, + 'pure_install:' => 'extra_install' + 'clean' => {FILES => 'alien.lsm alien.subst'}, ); diff --git a/alien b/alien.pl similarity index 97% rename from alien rename to alien.pl index cadb081..5b490c5 100755 --- a/alien +++ b/alien.pl @@ -98,7 +98,7 @@ creating a Red Hat package. =item B<-s>, B<--single> -Like -g, but do not generate the packagename.orig directory. This is only +Like B<-g>, but do not generate the packagename.orig directory. This is only useful when you are very low on disk space and are generating a debian package. @@ -213,8 +213,7 @@ use Alien::Package::Slp; # Returns a list of directories to search for patches. sub patchdirs { - my $prefix="/usr"; # PREFIX_AUTOREPLACE done by Makefile, do not edit. - return '/var/lib/alien',"$prefix/lib/alien/patches"; + return '/var/lib/alien',"/usr/lib/alien/patches"; } # Display alien's version number. @@ -372,7 +371,7 @@ foreach my $file (@ARGV) { $package->patchfile($patchfile) } else { - $package->patchfile($package->getpatch); + $package->patchfile($package->getpatch(patchdirs()); } }