Changeset 188 for devel/pb/bin/pb


Ignore:
Timestamp:
Oct 8, 2007, 11:51:27 PM (12 years ago)
Author:
bruno
Message:

Lots of SuSE fixes

File:
1 edited

Legend:

Unmodified
Added
Removed
  • devel/pb/bin/pb

    r180 r188  
    333333
    334334        my $src="$ENV{'PBDESTDIR'}/$pbpkg-$pbver.tar.gz";
     335        # Suse < 10.2 forces tar.bz2 usage :-(
     336        if ($ddir eq "suse") {
     337            my $newsrc="$ENV{'PBDESTDIR'}/$pbpkg-$pbver.tar.bz2";
     338            system "gzip -cd $src | bzip2 -c6 > $newsrc";
     339            $src = $newsrc;
     340        }
    335341        print $LOG "Source file: $src\n" if ($debug >= 0);
    336342
     
    343349            }
    344350
     351            symlink "$src","$ENV{'PBBUILDDIR'}/SOURCES/".basename($src) || die "Unable to symlink $src in $ENV{'PBBUILDDIR'}/SOURCES";
    345352            # We need to first extract the spec file
    346             symlink "$src","$ENV{'PBBUILDDIR'}/SOURCES/".basename($src) || die "Unable to symlink $src in $ENV{'PBBUILDDIR'}/SOURCES";
    347353            my @specfile;
    348354            @specfile = pb_extract_build_files($src,"$pbpkg-$pbver/pbconf/$ddir-$dver/","$ENV{'PBBUILDDIR'}/SPECS");
     
    742748my @files;
    743749
    744 pb_system("tar xfpz $src $dir","Extracting build files");
     750if ($src =~ /tar\.gz$/) {
     751    pb_system("tar xfpz $src $dir","Extracting build files");
     752} elsif ($src =~ /tar\.bz2$/) {
     753    pb_system("tar xfpj $src $dir","Extracting build files");
     754} else {
     755    die "Unknown compression algorithm for $src";
     756}
    745757opendir(DIR,"$dir") || die "Unable to open directory $dir";
    746758foreach my $f (readdir(DIR)) {
Note: See TracChangeset for help on using the changeset viewer.