Changeset 93
- Timestamp:
- 04/27/07 16:34:52 (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/debbuild
r92 r93 1 #!/usr/bin/perl 1 #!/usr/bin/perl -w 2 2 # debbuild script 3 3 # Shamelessly steals interface from rpm's "rpmbuild" to create … … 57 57 my $srcpkg; 58 58 my $cmdbuildroot; 59 my $tarballdir; # This should really be initialized, but the coding makes it, um, ugly.59 my $tarballdir; = '%{name}-%{version}'; # We do this in case of a spec file not using %setup... 60 60 my %specglobals; # For %define's in specfile, among other things. 61 61 … … 307 307 $cmdopts{type} = 'd'; # d for 'diagnostic' or 'debug' or 'dump' 308 308 } else { 309 print "Long opt $_\n";309 print "Long option $_ not handled\n"; 310 310 } 311 311 } else { … … 414 414 LINE: while (<SPECFILE>) { 415 415 next if /^#/; # Ignore comments... 416 next if /^\s +$/; # ... and blank lines.416 next if /^\s*$/; # ... and blank lines. 417 417 418 418 if (/^\%/) { … … 477 477 if ( /\s+-n\s+([^\s]+)\s+/ ) { 478 478 $tarballdir = $1; 479 } else {480 $tarballdir = "$pkgdata{main}{name}-$pkgdata{main}{version}";481 479 } 482 480 $tarballdir = expandmacros($tarballdir,'gp'); … … 657 655 } 658 656 } 657 # don't add any segments after this (%changelog), because something in the (Perl) parser gets 658 # thoroughly confuzzled if it tries to manipulate file data after EOL. Feh. 659 659 660 660 } else { # Data from the spec file "header" … … 737 737 $prepscript = expandmacros($prepscript,'gp'); 738 738 739 #print $prepscript; exit 0;740 741 739 # create script filename 742 740 my $prepscriptfile = "$tmpdir/deb-tmp.prep.".int(rand(99998)+1); … … 792 790 or die $!; 793 791 print INSTSCRIPT $scriptletbase; 794 # print INSTSCRIPT $cleanscript; # Clean up our install target before installing into it.795 792 print INSTSCRIPT $installscript; 796 793 close INSTSCRIPT; … … 1285 1282 1286 1283 # special %define's. Handle the general case where we eval anything. 1284 # Even more general: %(...) is a spec-parse-time shell code wrapper. 1287 1285 # Prime example: 1288 1286 #%define perl_vendorlib %(eval "`perl -V:installvendorlib`"; echo $installvendorlib) 1289 if ($macrostring =~ /^\%\( eval.+\)$/) {1287 if ($macrostring =~ /^\%\(.+\)$/) { 1290 1288 $macrostring =~ s/^\%\(//; 1291 1289 $macrostring =~ s/\)$//;
Note:
See TracChangeset
for help on using the changeset viewer.