Changeset 26 in ProjectBuilder for devel/pb/bin
- Timestamp:
- Aug 1, 2007, 3:11:04 PM (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
devel/pb/bin/pb.pl
r25 r26 16 16 use AppConfig qw(:argcount :expand); 17 17 use File::Basename; 18 use File::Copy; 18 19 use Time::localtime qw(localtime); 19 20 use POSIX qw(strftime); … … 317 318 318 319 # We need to first extract the spec file 319 print $LOG "Extracting spec file\n" if ($debug >= 0); 320 symlink $src,"SOURCES/" || die "Unable to symlink $src in SOURCES";; 321 chdir "SPECS"; 322 extract_build_files($src,"$pkg-$pbver/pbconf/$ddir-$dver/"); 320 symlink "$src","SOURCES/".basename($src) || die "Unable to symlink $src in SOURCES";; 321 extract_build_files($src,"$pkg-$pbver/pbconf/$ddir-$dver/","SPECS"); 323 322 324 323 # set LANGUAGE to check for correct log messages 325 324 $ENV{'LANGUAGE'}="C"; 326 system("rpmbuild -ba *.spec 2>&1 | tee "); 325 system("ls -R "); 326 system("cd SPECS ; rpmbuild -ba *.spec"); 327 327 328 328 } elsif ($dtype eq "tgz") { … … 404 404 my $src=shift; 405 405 my $dir=shift; 406 406 my $ddir=shift; 407 408 print $LOG "Extracting build files... " if ($debug >= 0); 407 409 system("tar xfz $src $dir >/dev/null"); 408 410 if ($? == -1) { … … 416 418 foreach my $f (readdir(DIR)) { 417 419 next if ($f =~ /^\./); 418 rename("$dir/$f","."); 420 move("$dir/$f","$ddir") || die "Unable to move $dir/$f to $ddir"; 421 print $LOG "mv $dir/$f .\n" if ($debug >= 1); 419 422 } 420 423 closedir(DIR); 424 # Not enough but still a first cleanup 421 425 pbrm_rf("$dir"); 422 426 }
Note:
See TracChangeset
for help on using the changeset viewer.