mirror of
https://github.com/Project-OSS-Revival/alien.git
synced 2026-04-24 14:00:17 +00:00
* LSB package support. It can generate LSB packages (not guarenteed
fully conformant with the LSB), and it can take LSB packages and convert
them into other formats. Unlike all the other conversions, lsb packages's
dependancy (on lsb) and their package scripts are preserved in the
generated packages (when allowed by the target package format). This means
your distribution will need to have a package named 'lsb' for the result
to be installable. (Debian will have one soon..)
* Suggest rpm-lsb, which is the preferred rpm to build lsb packages with.
Use it if it's present, plain old rpm otherwise.
This commit is contained in:
@@ -61,7 +61,8 @@ The package's maintainer.
|
|||||||
|
|
||||||
=item depends
|
=item depends
|
||||||
|
|
||||||
The package's dependancies.
|
The package's dependancies. Only dependencies that should exist on all
|
||||||
|
target distributions can be put in here though (ie: lsb).
|
||||||
|
|
||||||
=item group
|
=item group
|
||||||
|
|
||||||
@@ -120,6 +121,11 @@ The preinst script of the package.
|
|||||||
|
|
||||||
The prerm script of the package.
|
The prerm script of the package.
|
||||||
|
|
||||||
|
=item usescripts
|
||||||
|
|
||||||
|
Only use the above scripts fields when generating the package if this is set
|
||||||
|
to a true value.
|
||||||
|
|
||||||
=item unpacked_tree
|
=item unpacked_tree
|
||||||
|
|
||||||
Points to a directory where the package has been unpacked.
|
Points to a directory where the package has been unpacked.
|
||||||
@@ -266,6 +272,15 @@ build methods might have on it.
|
|||||||
|
|
||||||
sub cleantree {}
|
sub cleantree {}
|
||||||
|
|
||||||
|
=item revert
|
||||||
|
|
||||||
|
This method should ensure that the object is in the same state it was in
|
||||||
|
before the prep method was called.
|
||||||
|
|
||||||
|
=cut
|
||||||
|
|
||||||
|
sub revert {}
|
||||||
|
|
||||||
=item build
|
=item build
|
||||||
|
|
||||||
This method takes a prepped build tree, and simply builds a package from
|
This method takes a prepped build tree, and simply builds a package from
|
||||||
|
|||||||
@@ -138,7 +138,6 @@ sub scan {
|
|||||||
Version => 'version',
|
Version => 'version',
|
||||||
Architecture => 'arch',
|
Architecture => 'arch',
|
||||||
Maintainer => 'maintainer',
|
Maintainer => 'maintainer',
|
||||||
Depends => 'depends',
|
|
||||||
Section => 'group',
|
Section => 'group',
|
||||||
Description => 'summary',
|
Description => 'summary',
|
||||||
);
|
);
|
||||||
@@ -300,11 +299,16 @@ sub prep {
|
|||||||
print OUT "\n";
|
print OUT "\n";
|
||||||
print OUT "Package: ".$this->name."\n";
|
print OUT "Package: ".$this->name."\n";
|
||||||
print OUT "Architecture: ".$this->arch."\n";
|
print OUT "Architecture: ".$this->arch."\n";
|
||||||
print OUT "Depends: \${shlibs:Depends}\n";
|
if (defined $this->depends) {
|
||||||
|
print OUT "Depends: ".join(", ", "\${shlibs:Depends}", $this->depends)."\n";
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
print OUT "Depends: \${shlibs:Depends}\n";
|
||||||
|
}
|
||||||
print OUT "Description: ".$this->summary."\n";
|
print OUT "Description: ".$this->summary."\n";
|
||||||
print OUT $this->description."\n";
|
print OUT $this->description."\n";
|
||||||
print OUT " .\n";
|
print OUT " .\n";
|
||||||
print OUT " (Converted from a .".$this->origformat." package by alien.)\n";
|
print OUT " (Converted from a ".$this->origformat." package by alien.)\n";
|
||||||
close OUT;
|
close OUT;
|
||||||
|
|
||||||
# Copyright file.
|
# Copyright file.
|
||||||
@@ -381,16 +385,18 @@ EOF
|
|||||||
chmod 0755,"$dir/debian/rules";
|
chmod 0755,"$dir/debian/rules";
|
||||||
|
|
||||||
# Save any scripts.
|
# Save any scripts.
|
||||||
foreach my $script (qw{postinst postrm preinst prerm}) {
|
if ($this->usescripts) {
|
||||||
my $data=$this->$script();
|
foreach my $script (qw{postinst postrm preinst prerm}) {
|
||||||
next unless defined $data;
|
my $data=$this->$script();
|
||||||
next if $data =~ m/^\s*$/;
|
next unless defined $data;
|
||||||
open (OUT,">$dir/debian/$script") ||
|
next if $data =~ m/^\s*$/;
|
||||||
die "$dir/debian/$script: $!";
|
open (OUT,">$dir/debian/$script") ||
|
||||||
print OUT $data;
|
die "$dir/debian/$script: $!";
|
||||||
close OUT;
|
print OUT $data;
|
||||||
|
close OUT;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
my %dirtrans=( # Note: no trailing slahshes on these directory names!
|
my %dirtrans=( # Note: no trailing slahshes on these directory names!
|
||||||
# Move files to FHS-compliant locations, if possible.
|
# Move files to FHS-compliant locations, if possible.
|
||||||
'/usr/man' => '/usr/share/man',
|
'/usr/man' => '/usr/share/man',
|
||||||
|
|||||||
128
Alien/Package/Lsb.pm
Normal file
128
Alien/Package/Lsb.pm
Normal file
@@ -0,0 +1,128 @@
|
|||||||
|
#!/usr/bin/perl -w
|
||||||
|
|
||||||
|
=head1 NAME
|
||||||
|
|
||||||
|
Alien::Package::Lsb - an object that represents a lsb package
|
||||||
|
|
||||||
|
=cut
|
||||||
|
|
||||||
|
package Alien::Package::Lsb;
|
||||||
|
use strict;
|
||||||
|
use base qw(Alien::Package::Rpm);
|
||||||
|
|
||||||
|
=head1 DESCRIPTION
|
||||||
|
|
||||||
|
This is an object class that represents a lsb package. It is derived from
|
||||||
|
Alien::Package::Rpm.
|
||||||
|
|
||||||
|
=head1 FIELDS
|
||||||
|
|
||||||
|
=over 4
|
||||||
|
|
||||||
|
=head1 METHODS
|
||||||
|
|
||||||
|
=over 4
|
||||||
|
|
||||||
|
=item checkfile
|
||||||
|
|
||||||
|
Lsb files are rpm's with a lsb- prefix, that depend on a package called 'lsb'
|
||||||
|
and nothing else.
|
||||||
|
|
||||||
|
=cut
|
||||||
|
|
||||||
|
sub checkfile {
|
||||||
|
my $this=shift;
|
||||||
|
my $file=shift;
|
||||||
|
return unless $file =~ m/^lsb-.*\.rpm$/;
|
||||||
|
my @deps=`LANG=C rpm -qp -R $file`;
|
||||||
|
return 1 if grep { s/\s+//g; $_ eq 'lsb' } @deps;
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
=item scan
|
||||||
|
|
||||||
|
Uses the parent scan method to read the file. lsb is added to the depends.
|
||||||
|
|
||||||
|
=cut
|
||||||
|
|
||||||
|
sub scan {
|
||||||
|
my $this=shift;
|
||||||
|
$this->SUPER::scan(@_);
|
||||||
|
|
||||||
|
$this->distribution("Linux Standard Base");
|
||||||
|
$this->origformat("lsb");
|
||||||
|
$this->depends("lsb");
|
||||||
|
# Converting from lsb, so the scripts should be portable and safe.
|
||||||
|
# Haha.
|
||||||
|
$this->usescripts(1);
|
||||||
|
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
=item prep
|
||||||
|
|
||||||
|
The parent's prep method is used to generate the spec file. First though,
|
||||||
|
the package's name is munged to make it lsb compliant (sorta) and lsb is added
|
||||||
|
to its dependencies.
|
||||||
|
|
||||||
|
=cut
|
||||||
|
|
||||||
|
sub prep {
|
||||||
|
my $this=shift;
|
||||||
|
|
||||||
|
$this->_orig_name($this->name);
|
||||||
|
if ($this->name !~ /^lsb-/) {
|
||||||
|
$this->name("lsb-".$this->name);
|
||||||
|
}
|
||||||
|
$this->_orig_depends($this->depends);
|
||||||
|
$this->depends("lsb");
|
||||||
|
# Always include scripts when generating lsb package.
|
||||||
|
$this->_orig_usescripts($this->usescripts);
|
||||||
|
$this->usescripts(1);
|
||||||
|
|
||||||
|
$this->SUPER::prep(@_);
|
||||||
|
}
|
||||||
|
|
||||||
|
=item revert
|
||||||
|
|
||||||
|
Undo the changes made by prep.
|
||||||
|
|
||||||
|
=cut
|
||||||
|
|
||||||
|
sub revert {
|
||||||
|
my $this=shift;
|
||||||
|
$this->name($this->_orig_name);
|
||||||
|
$this->depends($this->_orig_depends);
|
||||||
|
$this->usescripts($this->_orig_usescripts);
|
||||||
|
$this->SUPER::revert(@_);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
=item build
|
||||||
|
|
||||||
|
Uses the parent's build command. If a lsb-rpm is available, uses it to build
|
||||||
|
the package.
|
||||||
|
|
||||||
|
=cut
|
||||||
|
|
||||||
|
sub build {
|
||||||
|
my $this=shift;
|
||||||
|
my $buildcmd=shift || 'rpm';
|
||||||
|
foreach (split(/:/,$ENV{PATH})) {
|
||||||
|
if (-x "$_/lsb-rpm") {
|
||||||
|
$buildcmd='lsb-rpm';
|
||||||
|
last;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
$this->SUPER::build($buildcmd);
|
||||||
|
}
|
||||||
|
|
||||||
|
=back
|
||||||
|
|
||||||
|
=head1 AUTHOR
|
||||||
|
|
||||||
|
Joey Hess <joey@kitenet.net>
|
||||||
|
|
||||||
|
=cut
|
||||||
|
|
||||||
|
1
|
||||||
@@ -246,6 +246,7 @@ sub prep {
|
|||||||
print OUT "Name: ".$this->name."\n";
|
print OUT "Name: ".$this->name."\n";
|
||||||
print OUT "Version: ".$this->version."\n";
|
print OUT "Version: ".$this->version."\n";
|
||||||
print OUT "Release: ".$this->release."\n";
|
print OUT "Release: ".$this->release."\n";
|
||||||
|
print OUT "Requires: ".$this->depends."\n" if length $this->depends;
|
||||||
print OUT "Summary: ".$this->summary."\n";
|
print OUT "Summary: ".$this->summary."\n";
|
||||||
print OUT "Copyright: ".$this->copyright."\n";
|
print OUT "Copyright: ".$this->copyright."\n";
|
||||||
print OUT "Distribution: ".$this->distribution."\n";
|
print OUT "Distribution: ".$this->distribution."\n";
|
||||||
@@ -254,30 +255,32 @@ sub prep {
|
|||||||
print OUT "\%define _rpmdir ../\n"; # write rpm to current directory
|
print OUT "\%define _rpmdir ../\n"; # write rpm to current directory
|
||||||
print OUT "\%define _rpmfilename %%{NAME}-%%{VERSION}-%%{RELEASE}.%%{ARCH}.rpm\n";
|
print OUT "\%define _rpmfilename %%{NAME}-%%{VERSION}-%%{RELEASE}.%%{ARCH}.rpm\n";
|
||||||
print OUT "\n";
|
print OUT "\n";
|
||||||
if ($this->preinst) {
|
if ($this->usescripts) {
|
||||||
print OUT "\%pre\n";
|
if ($this->preinst) {
|
||||||
print OUT $this->preinst."\n";
|
print OUT "\%pre\n";
|
||||||
print OUT "\n";
|
print OUT $this->preinst."\n";
|
||||||
}
|
print OUT "\n";
|
||||||
if ($this->postinst) {
|
}
|
||||||
print OUT "\%post\n";
|
if ($this->postinst) {
|
||||||
print OUT $this->postinst."\n";
|
print OUT "\%post\n";
|
||||||
print OUT "\n";
|
print OUT $this->postinst."\n";
|
||||||
}
|
print OUT "\n";
|
||||||
if ($this->prerm) {
|
}
|
||||||
print OUT "\%preun\n";
|
if ($this->prerm) {
|
||||||
print OUT $this->prerm."\n";
|
print OUT "\%preun\n";
|
||||||
print OUT "\n";
|
print OUT $this->prerm."\n";
|
||||||
}
|
print OUT "\n";
|
||||||
if ($this->postun) {
|
}
|
||||||
print OUT "\%postun\n";
|
if ($this->postun) {
|
||||||
print OUT $this->postrm."\n";
|
print OUT "\%postun\n";
|
||||||
print OUT "\n";
|
print OUT $this->postrm."\n";
|
||||||
|
print OUT "\n";
|
||||||
|
}
|
||||||
}
|
}
|
||||||
print OUT "\%description\n";
|
print OUT "\%description\n";
|
||||||
print OUT $this->description."\n";
|
print OUT $this->description."\n";
|
||||||
print OUT "\n";
|
print OUT "\n";
|
||||||
print OUT "(Converted from a .".$this->origformat." package by alien.)\n";
|
print OUT "(Converted from a ".$this->origformat." package by alien.)\n";
|
||||||
print OUT "\n";
|
print OUT "\n";
|
||||||
print OUT "%files\n";
|
print OUT "%files\n";
|
||||||
print OUT $filelist;
|
print OUT $filelist;
|
||||||
@@ -302,10 +305,14 @@ sub cleantree {
|
|||||||
Build a rpm. If RPMBUILDOPT is set in the environement, the options in
|
Build a rpm. If RPMBUILDOPT is set in the environement, the options in
|
||||||
it are passed to rpm on its command line.
|
it are passed to rpm on its command line.
|
||||||
|
|
||||||
|
An optional parameter, if passed, can be used to specify the program to use
|
||||||
|
to build the rpm. It defaults to rpm.
|
||||||
|
|
||||||
=cut
|
=cut
|
||||||
|
|
||||||
sub build {
|
sub build {
|
||||||
my $this=shift;
|
my $this=shift;
|
||||||
|
my $buildcmd=shift || 'rpm';
|
||||||
my $dir=$this->unpacked_tree || die "The package must be unpacked first!";
|
my $dir=$this->unpacked_tree || die "The package must be unpacked first!";
|
||||||
|
|
||||||
# Ask rpm how it's set up. We want to know what architecture it
|
# Ask rpm how it's set up. We want to know what architecture it
|
||||||
@@ -352,7 +359,7 @@ sub build {
|
|||||||
}
|
}
|
||||||
|
|
||||||
$opts.=" $ENV{RPMBUILDOPTS}" if exists $ENV{RPMBUILDOPTS};
|
$opts.=" $ENV{RPMBUILDOPTS}" if exists $ENV{RPMBUILDOPTS};
|
||||||
my $command="cd $dir; rpm -bb $opts ".$this->name."-".$this->version."-".$this->release.".spec";
|
my $command="cd $dir; $buildcmd -bb $opts ".$this->name."-".$this->version."-".$this->release.".spec";
|
||||||
my $log=`$command 2>&1`;
|
my $log=`$command 2>&1`;
|
||||||
if ($?) {
|
if ($?) {
|
||||||
die "Package build failed. Here's the log of the command ($command):\n", $log;
|
die "Package build failed. Here's the log of the command ($command):\n", $log;
|
||||||
|
|||||||
@@ -234,7 +234,7 @@ sub build {
|
|||||||
'', # Set up script. TODO
|
'', # Set up script. TODO
|
||||||
$this->summary,
|
$this->summary,
|
||||||
$this->description,
|
$this->description,
|
||||||
'', # Depends.
|
$this->depends,
|
||||||
'', # Provides.
|
'', # Provides.
|
||||||
$this->maintainer,
|
$this->maintainer,
|
||||||
scalar localtime, # Use current date.
|
scalar localtime, # Use current date.
|
||||||
|
|||||||
@@ -181,18 +181,20 @@ sub prep {
|
|||||||
my $dir=$this->unpacked_tree || die "The package must be unpacked first!";
|
my $dir=$this->unpacked_tree || die "The package must be unpacked first!";
|
||||||
|
|
||||||
my $install_made=0;
|
my $install_made=0;
|
||||||
foreach my $script (keys %{scripttrans()}) {
|
if ($this->usescripts) {
|
||||||
my $data=$this->$script();
|
foreach my $script (keys %{scripttrans()}) {
|
||||||
my $out=$this->unpacked_tree."/install/".${scripttrans()}{$script};
|
my $data=$this->$script();
|
||||||
next if ! defined $data || $data =~ m/^\s*$/;
|
my $out=$this->unpacked_tree."/install/".${scripttrans()}{$script};
|
||||||
if (!$install_made) {
|
next if ! defined $data || $data =~ m/^\s*$/;
|
||||||
mkdir $this->unpacked_tree."/install", 0755;
|
if (!$install_made) {
|
||||||
$install_made=1;
|
mkdir $this->unpacked_tree."/install", 0755;
|
||||||
|
$install_made=1;
|
||||||
|
}
|
||||||
|
open (OUT, ">$out") || die "$out: $!";
|
||||||
|
print OUT $data;
|
||||||
|
close OUT;
|
||||||
|
chmod 0755, $out;
|
||||||
}
|
}
|
||||||
open (OUT, ">$out") || die "$out: $!";
|
|
||||||
print OUT $data;
|
|
||||||
close OUT;
|
|
||||||
chmod 0755, $out;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
13
alien.lsm.in
13
alien.lsm.in
@@ -2,12 +2,13 @@ Begin3
|
|||||||
Title: alien
|
Title: alien
|
||||||
Version: @version@
|
Version: @version@
|
||||||
Entered-date: 31MAR97
|
Entered-date: 31MAR97
|
||||||
Description: Alien converts Slackware .tgz packages, Red Hat .rpm packages
|
Description: Alien converts Slackware .tgz packages, Red Hat .rpm packages,
|
||||||
and Debian .deb packages. It can convert these formats to
|
Debian .deb packages, and Stampede .slp packages. It can
|
||||||
either .deb or .rpm. It works only on binary packages.
|
convert from any of the formats to any other format. It works
|
||||||
Keywords: dpkg rpm tgz convert
|
only on binary packages. It also support LSB packages.
|
||||||
Author: joey@kite.ml.org
|
Keywords: debian dpkg deb red hat redhat rpm slackware tgz stampede slp convert package LSB
|
||||||
Primary-site: sunsite.unc.edu /pub/Linux/utils/scripts
|
Author: joey@kitenet.net
|
||||||
|
Primary-site: sunsite.unc.edu /pub/Linux/utils/package
|
||||||
32 alien-@version@.tar.gz
|
32 alien-@version@.tar.gz
|
||||||
Copying-policy: GPL
|
Copying-policy: GPL
|
||||||
End
|
End
|
||||||
|
|||||||
47
alien.pl
47
alien.pl
@@ -11,10 +11,10 @@ alien - Convert or install an alien binary package
|
|||||||
=head1 DESCRIPTION
|
=head1 DESCRIPTION
|
||||||
|
|
||||||
B<alien> is a program that converts between Redhat rpm, Debian deb,
|
B<alien> is a program that converts between Redhat rpm, Debian deb,
|
||||||
Stampede slp and Slackware tgz file formats. If you want to use a package
|
Stampede slp, Slackware tgz, and Solaris pkg file formats. If you want to
|
||||||
from another linux distribution than the one you have installed on your
|
use a package from another linux distribution than the one you have
|
||||||
system, you can use alien to convert it to your preferred package format
|
installed on your system, you can use alien to convert it to your preferred
|
||||||
and install it.
|
package format and install it. It also supports LSB packages.
|
||||||
|
|
||||||
=head1 WARNING
|
=head1 WARNING
|
||||||
|
|
||||||
@@ -39,6 +39,22 @@ alien version.
|
|||||||
For converting to and from rpm format the Red Hat Package Manager must be
|
For converting to and from rpm format the Red Hat Package Manager must be
|
||||||
installed.
|
installed.
|
||||||
|
|
||||||
|
=item lsb
|
||||||
|
|
||||||
|
To convert from lsb packages, the Red Hat Package Manager must be installed.
|
||||||
|
Unlike the other package formats, alien can handle the depenendencies of
|
||||||
|
lsb packages if the destination package format supports dependencies. Note
|
||||||
|
that this means that the package generated from a lsb package will depend on
|
||||||
|
a package named "lsb" -- your distribution should provide a package by that
|
||||||
|
name, if it is lsb compliant. The scripts in the lsb package will be converted
|
||||||
|
by default as well.
|
||||||
|
|
||||||
|
To generate lsb packages, the Red Hat Package Manager must be installed,
|
||||||
|
and alien will use by preference a program named lsb-rpm, if it exists.
|
||||||
|
No guarantees are made that the generated lsb packages will be fully LSB
|
||||||
|
compliant, and it's rather unlikely they will unless you build them in the
|
||||||
|
lsbdev environment.
|
||||||
|
|
||||||
=item deb
|
=item deb
|
||||||
|
|
||||||
For converting to (but not from) deb format, the gcc, make, debmake,
|
For converting to (but not from) deb format, the gcc, make, debmake,
|
||||||
@@ -136,6 +152,8 @@ scripts might be designed to work on a system unlike your own, and could
|
|||||||
cause problems. It is recommended that you examine the scripts by hand
|
cause problems. It is recommended that you examine the scripts by hand
|
||||||
and check to see what they do before using this option.
|
and check to see what they do before using this option.
|
||||||
|
|
||||||
|
This is enabled by default when converting from lsb packages.
|
||||||
|
|
||||||
=item B<-k>, B<--keep-version>
|
=item B<-k>, B<--keep-version>
|
||||||
|
|
||||||
By default, alien adds one to the minor version number of each package it
|
By default, alien adds one to the minor version number of each package it
|
||||||
@@ -230,6 +248,7 @@ use Alien::Package::Rpm;
|
|||||||
use Alien::Package::Tgz;
|
use Alien::Package::Tgz;
|
||||||
use Alien::Package::Slp;
|
use Alien::Package::Slp;
|
||||||
use Alien::Package::Pkg;
|
use Alien::Package::Pkg;
|
||||||
|
use Alien::Package::Lsb;
|
||||||
|
|
||||||
# Returns a list of directories to search for patches.
|
# Returns a list of directories to search for patches.
|
||||||
sub patchdirs {
|
sub patchdirs {
|
||||||
@@ -257,6 +276,7 @@ Usage: alien [options] file [...]
|
|||||||
directory.
|
directory.
|
||||||
-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.
|
||||||
|
-l, --to-lsb Generate a LSB package.
|
||||||
-t, --to-tgz Generate a Slackware tgz package.
|
-t, --to-tgz Generate a Slackware tgz package.
|
||||||
Enables the following option:
|
Enables the following option:
|
||||||
--description=<desc> Specify package description.
|
--description=<desc> Specify package description.
|
||||||
@@ -279,6 +299,7 @@ my (%destformats, $generate, $install, $single, $scripts, $patchfile,
|
|||||||
GetOptions(
|
GetOptions(
|
||||||
"to-deb|d", sub { $destformats{deb}=1 },
|
"to-deb|d", sub { $destformats{deb}=1 },
|
||||||
"to-rpm|r", sub { $destformats{rpm}=1 },
|
"to-rpm|r", sub { $destformats{rpm}=1 },
|
||||||
|
"to-lsb|l", sub { $destformats{lsb}=1 },
|
||||||
"to-tgz|t", sub { $destformats{tgz}=1 },
|
"to-tgz|t", sub { $destformats{tgz}=1 },
|
||||||
"to-slp", sub { $destformats{slp}=1 },
|
"to-slp", sub { $destformats{slp}=1 },
|
||||||
"to-pkg|p", sub { $destformats{pkg}=1 },
|
"to-pkg|p", sub { $destformats{pkg}=1 },
|
||||||
@@ -336,7 +357,13 @@ foreach my $file (@ARGV) {
|
|||||||
|
|
||||||
# Figure out what kind of file this is.
|
# Figure out what kind of file this is.
|
||||||
my $package;
|
my $package;
|
||||||
if (Alien::Package::Rpm->checkfile($file)) {
|
|
||||||
|
# Check lsb before rpm, since lsb packages are really just
|
||||||
|
# glorified rpms.
|
||||||
|
if (Alien::Package::Lsb->checkfile($file)) {
|
||||||
|
$package=Alien::Package::Lsb->new(filename => $file);
|
||||||
|
}
|
||||||
|
elsif (Alien::Package::Rpm->checkfile($file)) {
|
||||||
$package=Alien::Package::Rpm->new(filename => $file);
|
$package=Alien::Package::Rpm->new(filename => $file);
|
||||||
}
|
}
|
||||||
elsif (Alien::Package::Deb->checkfile($file)) {
|
elsif (Alien::Package::Deb->checkfile($file)) {
|
||||||
@@ -356,13 +383,7 @@ 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.
|
$package->usescripts($scripts) unless $package->usescripts;
|
||||||
unless (defined $scripts) {
|
|
||||||
$package->postinst('');
|
|
||||||
$package->postrm('');
|
|
||||||
$package->preinst('');
|
|
||||||
$package->prerm('');
|
|
||||||
}
|
|
||||||
|
|
||||||
# Increment release.
|
# Increment release.
|
||||||
unless (defined $keepversion) {
|
unless (defined $keepversion) {
|
||||||
@@ -434,5 +455,7 @@ foreach my $file (@ARGV) {
|
|||||||
# Note I don't unlink it. I figure that might annoy
|
# Note I don't unlink it. I figure that might annoy
|
||||||
# people, since it was an input file.
|
# people, since it was an input file.
|
||||||
}
|
}
|
||||||
|
|
||||||
|
$package->revert;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
14
debian/changelog
vendored
14
debian/changelog
vendored
@@ -1,3 +1,17 @@
|
|||||||
|
alien (8.00) unstable; urgency=low
|
||||||
|
|
||||||
|
* LSB package support. It can generate LSB packages (not guarenteed
|
||||||
|
fully conformant with the LSB), and it can take LSB packages and convert
|
||||||
|
them into other formats. Unlike all the other conversions, lsb packages's
|
||||||
|
dependancy (on lsb) and their package scripts are preserved in the
|
||||||
|
generated packages (when allowed by the target package format). This means
|
||||||
|
your distribution will need to have a package named 'lsb' for the result
|
||||||
|
to be installable. (Debian will have one soon..)
|
||||||
|
* Suggest rpm-lsb, which is the preferred rpm to build lsb packages with.
|
||||||
|
Use it if it's present, plain old rpm otherwise.
|
||||||
|
|
||||||
|
-- Joey Hess <joeyh@debian.org> Mon, 11 Feb 2002 12:55:42 -0500
|
||||||
|
|
||||||
alien (7.32) unstable; urgency=low
|
alien (7.32) unstable; urgency=low
|
||||||
|
|
||||||
* Support ancient (bo-era) debs with upper-case field names. Closes: #130736
|
* Support ancient (bo-era) debs with upper-case field names. Closes: #130736
|
||||||
|
|||||||
10
debian/control
vendored
10
debian/control
vendored
@@ -9,11 +9,11 @@ Package: alien
|
|||||||
Architecture: all
|
Architecture: all
|
||||||
Section: admin
|
Section: admin
|
||||||
Depends: debhelper (>= 3), ${perl:Depends}, rpm (>= 2.4.4-2), dpkg-dev, make, cpio
|
Depends: debhelper (>= 3), ${perl:Depends}, rpm (>= 2.4.4-2), dpkg-dev, make, cpio
|
||||||
Suggests: patch, bzip2
|
Suggests: patch, bzip2, lsb-rpm
|
||||||
Description: Install Red Hat, Stampede, and Slackware Packages with dpkg.
|
Description: Install LSB, Red Hat, Stampede, and Slackware Packages with dpkg.
|
||||||
Alien allows you to convert Red Hat, Stampede and Slackware Packages into
|
Alien allows you to convert LSB, Red Hat, Stampede and Slackware Packages
|
||||||
Debian packages, which can be installed with dpkg.
|
into Debian packages, which can be installed with dpkg.
|
||||||
.
|
.
|
||||||
It can also convert into Slackware, Red Hat, and Stampede packages.
|
It can also generate packages of any of the other formats.
|
||||||
.
|
.
|
||||||
This is a tool only suitable for binary packages.
|
This is a tool only suitable for binary packages.
|
||||||
|
|||||||
Reference in New Issue
Block a user