more options supported

This commit is contained in:
joey
2000-04-21 23:30:38 +00:00
parent 81a6189984
commit 25915dbdbc

16
alien
View File

@@ -239,7 +239,7 @@ Usage: alien [options] file [...]
-r, --to-rpm Generate a RedHat rpm package. -r, --to-rpm Generate a RedHat rpm package.
--to-slp Generate a Stampede slp package. --to-slp Generate a Stampede slp package.
-t, --to-tgz Generate a Slackware tgz package. -t, --to-tgz Generate a Slackware tgz package.
Enables the following options: Enables the following option:
--description=<desc> Specify package description. --description=<desc> Specify package description.
-i, --install Install generated package. -i, --install Install generated package.
-g, --generate Unpack, but do not generate a new package. -g, --generate Unpack, but do not generate a new package.
@@ -318,6 +318,7 @@ foreach my $file (@ARGV) {
} }
elsif (Alien::Package::Tgz->checkfile($file)) { elsif (Alien::Package::Tgz->checkfile($file)) {
$package=Alien::Package::Tgz->new(filename => $file); $package=Alien::Package::Tgz->new(filename => $file);
$package->description($tgzdescription) if $tgzdescription ne '';
} }
elsif (Alien::Package::Slp->checkfile($file)) { elsif (Alien::Package::Slp->checkfile($file)) {
$package=Alien::Package::Slp->new(filename => $file); $package=Alien::Package::Slp->new(filename => $file);
@@ -326,6 +327,19 @@ foreach my $file (@ARGV) {
die "Unknown type of package, $file.\n"; die "Unknown type of package, $file.\n";
} }
# Kill scripts from the package, unless they were enabled.
unless ($scripts) {
$package->postinst('');
$package->postrm('');
$package->preinst('');
$package->prerm('');
}
# Increment revision.
unless ($keepversion) {
$package->revision($package->revision + 1);
}
foreach my $format (keys %destformats) { foreach my $format (keys %destformats) {
# Skip conversion if package is already the correct format. # Skip conversion if package is already the correct format.
if ($package->origformat ne $format) { if ($package->origformat ne $format) {