Changeset 96 in ProjectBuilder for devel/pb/bin
- Timestamp:
- Sep 3, 2007, 8:11:41 PM (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
devel/pb/bin/pb
r95 r96 303 303 304 304 if ($dtype eq "rpm") { 305 # rpm has its own standard build directory306 my $tmp=`rpmquery --eval '%{_topdir}' 2> /dev/null`;307 chomp($tmp);308 $ENV{'PBBUILDDIR'}=$tmp;309 305 print $LOG "Working under $ENV{'PBBUILDDIR'}\n" if ($debug >= 0); 310 306 foreach my $d ('RPMS','SRPMS','SPECS','SOURCES','BUILD') { 311 307 if (! -d "$ENV{'PBBUILDDIR'}/$d") { 312 pb_mkdir_p("$ENV{'PBBUILDDIR'}/$d") || die "Please ensure that you can write into $ENV{'PBBUILDDIR'} to create $d\n Solution: setup _topdir in your ~/.rpmmacros or\nchown the $ENV{'PBBUILDDIR'} directory to your uid";308 pb_mkdir_p("$ENV{'PBBUILDDIR'}/$d") || die "Please ensure that you can write into $ENV{'PBBUILDDIR'} to create $d\nchown the $ENV{'PBBUILDDIR'} directory to your uid"; 313 309 } 314 310 } … … 325 321 foreach my $f (@specfile) { 326 322 if ($f =~ /\.spec$/) { 327 pb_system("rpmbuild - ba $f","Building package with $f");323 pb_system("rpmbuild --define "_topdir $ENV{'PBBUILDDIR'}" -ba $f","Building package with $f under $ENV{'PBBUILDDIR'}"); 328 324 last; 329 325 } … … 375 371 } elsif ($cmt eq "Packages") { 376 372 if ($dtype eq "rpm") { 377 $src="$ENV{'PBBUILDDIR'}/RPMS/*/$pbpkg$pbver-$pbtag$dsuf.*.rpm $ENV{'PBBUILDDIR'}/SRPMS/$pbpkg$pbver-$pbtag$dsuf.src.rpm" 373 # rpm has its own standard build directory 374 my $tmp=`rpmquery --eval '%{_topdir}' 2> /dev/null`; 375 chomp($tmp); 376 $ENV{'PBBUILDDIR'}=$tmp; 377 $src="$ENV{'PBBUILDDIR'}/RPMS/*/$pbpkg-$pbver-$pbtag$dsuf.*.rpm $ENV{'PBBUILDDIR'}/SRPMS/$pbpkg-$pbver-$pbtag$dsuf.src.rpm" 378 378 } elsif ($dtype eq "deb") { 379 379 my $tmp = "$ENV{'PBBUILDDIR'}/$pbpkg"; 380 380 $src="$tmp"."_*.deb $tmp"."_*.dsc $tmp"."_*.tar.gz" 381 381 } elsif ($dtype eq "ebuild") { 382 $src="$ENV{'PBBUILDDIR'}/portage/*/$pbpkg/$pbpkg $pbver.ebuild"382 $src="$ENV{'PBBUILDDIR'}/portage/*/$pbpkg/$pbpkg-$pbver.ebuild" 383 383 } elsif ($dtype eq "slackware") { 384 $src="$ENV{'PBBUILDDIR'}/build-$pbpkg/$pbpkg $pbver-*-$pbtag.tgz"384 $src="$ENV{'PBBUILDDIR'}/build-$pbpkg/$pbpkg-$pbver-*-$pbtag.tgz" 385 385 } else { 386 386 die "Unknown dtype format $dtype"; … … 390 390 push @src, $src; 391 391 } 392 my ($pt) = pb_conf_get("sshhost", "sshlogin", "sshdir"); 393 my ($sshhost,$sshlogin,$sshdir) = @$pt; 392 my ($sshhost,$sshlogin,$sshdir) = pb_conf_get("sshhost", "sshlogin", "sshdir"); 394 393 my $mac = "$sshlogin->{$ENV{'PBPROJ'}}\@$sshhost->{$ENV{'PBPROJ'}}"; 395 394 my $dir; … … 402 401 } 403 402 $src = join(' ',@src); 404 pb_system("ssh -q $mac \"mkdir -p $dir ; cd $dir ; rm -f $src \"","Preparing $dir on $mac");403 pb_system("ssh -q $mac \"mkdir -p $dir ; cd $dir ; rm -f $src 2> /dev/null\"","Preparing $dir on $mac"); 405 404 pb_system("scp -p $src $mac:$dir","$cmt delivery in $dir on $mac"); 406 405 }
Note:
See TracChangeset
for help on using the changeset viewer.