generate-expr-from-tarballs.pl support multiple versions

svn path=/nixpkgs/trunk/; revision=31183
This commit is contained in:
Florian Friesdorf 2011-12-31 06:07:32 +00:00
parent f6090f6bba
commit 2a2ceace7f

View File

@ -44,11 +44,16 @@ while (<>) {
my $tarball = "$_";
print "\nDOING TARBALL $tarball\n";
$tarball =~ /\/((?:(?:[A-Za-z0-9]|(?:-[^0-9])|(?:-[0-9]*[a-z]))+))[^\/]*$/;
die unless defined $1;
my $pkg = $1;
$pkg =~ s/-//g;
#next unless $pkg eq "xcbutil";
my $pkg;
if ($tarball =~ s/:([a-zA-Z0-9_]+)$//) {
$pkg = $1;
} else {
$tarball =~ /\/((?:(?:[A-Za-z0-9]|(?:-[^0-9])|(?:-[0-9]*[a-z]))+))[^\/]*$/;
die unless defined $1;
$pkg = $1;
$pkg =~ s/-//g;
#next unless $pkg eq "xcbutil";
}
$tarball =~ /\/([^\/]*)\.tar\.bz2$/;
my $pkgName = $1;