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:
@@ -138,7 +138,6 @@ sub scan {
|
||||
Version => 'version',
|
||||
Architecture => 'arch',
|
||||
Maintainer => 'maintainer',
|
||||
Depends => 'depends',
|
||||
Section => 'group',
|
||||
Description => 'summary',
|
||||
);
|
||||
@@ -300,11 +299,16 @@ sub prep {
|
||||
print OUT "\n";
|
||||
print OUT "Package: ".$this->name."\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 $this->description."\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;
|
||||
|
||||
# Copyright file.
|
||||
@@ -381,16 +385,18 @@ EOF
|
||||
chmod 0755,"$dir/debian/rules";
|
||||
|
||||
# Save any scripts.
|
||||
foreach my $script (qw{postinst postrm preinst prerm}) {
|
||||
my $data=$this->$script();
|
||||
next unless defined $data;
|
||||
next if $data =~ m/^\s*$/;
|
||||
open (OUT,">$dir/debian/$script") ||
|
||||
die "$dir/debian/$script: $!";
|
||||
print OUT $data;
|
||||
close OUT;
|
||||
if ($this->usescripts) {
|
||||
foreach my $script (qw{postinst postrm preinst prerm}) {
|
||||
my $data=$this->$script();
|
||||
next unless defined $data;
|
||||
next if $data =~ m/^\s*$/;
|
||||
open (OUT,">$dir/debian/$script") ||
|
||||
die "$dir/debian/$script: $!";
|
||||
print OUT $data;
|
||||
close OUT;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
my %dirtrans=( # Note: no trailing slahshes on these directory names!
|
||||
# Move files to FHS-compliant locations, if possible.
|
||||
'/usr/man' => '/usr/share/man',
|
||||
|
||||
Reference in New Issue
Block a user