- Timestamp:
- 06/06/06 17:46:56 (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/debbuild
r64 r65 181 181 } 182 182 183 if ($cmdopts{type} eq 't') { 184 # Need to unpack the tarball to find the spec file. Sort of the inverse of -b above. 185 # zcat $tarball |tar -t |grep .spec 186 # collect some info about the tarball 187 $specfile = "$topdir/BUILD/". qx { zcat $tarball |tar -t |grep .spec\$ }; 188 chomp $specfile; 189 my ($fileonly, $dirname) = ($tarball =~ /(([a-zA-Z0-9._-]+)\.tar\.(?:gz|bz2))$/); 190 191 $tarball = abs_path($tarball); 192 my $unpackcmd = "cd $topdir/BUILD; tar -". 193 ( $tarball =~ /\.tar\.gz$/ ? "z" : "" ). 194 ( $tarball =~ /\.tar\.bz2$/ ? "j" : "" ). "xf $tarball"; 195 system "$unpackcmd"; 196 system "cp $tarball $topdir/SOURCES/$fileonly"; 197 system "cp $specfile $topdir/SPECS/"; 198 parse_spec(); 199 die "Can't build $pkgdata{main}{name}: build requirements not met.\n" 200 if !checkbuildreq(); 201 } 202 183 203 # -> srcpkg if -.s 184 204 if ($cmdopts{stage} eq 's') { … … 304 324 $srcpkg = $_; 305 325 } elsif ($cmdopts{type} eq 'b') { 326 # Spec file 306 327 $specfile = $_; 307 # Spec file308 328 } else { 309 # Tarball 329 # Tarball build. Need to extract tarball to find spec file. Whee. 330 $tarball = $_; 310 331 } 311 332 } … … 362 383 # Parse the .spec file. 363 384 sub parse_spec { 364 open SPECFILE,"<$specfile" ;385 open SPECFILE,"<$specfile" or die "specfile ($specfile) barfed: $!"; 365 386 366 387 LINE: while (<SPECFILE>) { … … 749 770 # magic needed to properly version dependencies... 750 771 # only provided deps will really be included 772 $pkgdata{$pkg}{requires} =~ s/^, //; # Still have to do this here. 751 773 $pkgdata{$pkg}{requires} =~ s/\s+//g; 752 774 my @deps = split /,/, $pkgdata{$pkg}{requires};
Note:
See TracChangeset
for help on using the changeset viewer.