Changeset 93 for trunk


Ignore:
Timestamp:
04/27/07 16:34:52 (18 years ago)
Author:
kdeugau
Message:

/trunk

Miscellaneous bugfixery and cosmetic cleanup

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/debbuild

    r92 r93  
    1 #!/usr/bin/perl
     1#!/usr/bin/perl -w
    22# debbuild script
    33# Shamelessly steals interface from rpm's "rpmbuild" to create
     
    5757my $srcpkg;
    5858my $cmdbuildroot;
    59 my $tarballdir; # This should really be initialized, but the coding makes it, um, ugly.
     59my $tarballdir; = '%{name}-%{version}'; # We do this in case of a spec file not using %setup...
    6060my %specglobals;        # For %define's in specfile, among other things.
    6161
     
    307307          $cmdopts{type} = 'd'; # d for 'diagnostic' or 'debug' or 'dump'
    308308        } else {
    309           print "Long opt $_\n";
     309          print "Long option $_ not handled\n";
    310310        }
    311311      } else {
     
    414414LINE: while (<SPECFILE>) {
    415415    next if /^#/;       # Ignore comments...
    416     next if /^\s+$/;    # ... and blank lines.
     416    next if /^\s*$/;    # ... and blank lines.
    417417
    418418    if (/^\%/) {
     
    477477            if ( /\s+-n\s+([^\s]+)\s+/ ) {
    478478              $tarballdir = $1;
    479             } else {
    480               $tarballdir = "$pkgdata{main}{name}-$pkgdata{main}{version}";
    481479            }
    482480            $tarballdir = expandmacros($tarballdir,'gp');
     
    657655        }
    658656      }
     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.
    659659
    660660    } else {    # Data from the spec file "header"
     
    737737  $prepscript = expandmacros($prepscript,'gp');
    738738
    739 #print $prepscript; exit 0;
    740 
    741739  # create script filename
    742740  my $prepscriptfile = "$tmpdir/deb-tmp.prep.".int(rand(99998)+1);
     
    792790        or die $!;
    793791  print INSTSCRIPT $scriptletbase;
    794 #  print INSTSCRIPT $cleanscript;       # Clean up our install target before installing into it.
    795792  print INSTSCRIPT $installscript;
    796793  close INSTSCRIPT;
     
    12851282
    12861283    # special %define's.  Handle the general case where we eval anything.
     1284    # Even more general:  %(...) is a spec-parse-time shell code wrapper.
    12871285    # Prime example:
    12881286    #%define perl_vendorlib %(eval "`perl -V:installvendorlib`"; echo $installvendorlib)
    1289     if ($macrostring =~ /^\%\(eval.+\)$/) {
     1287    if ($macrostring =~ /^\%\(.+\)$/) {
    12901288      $macrostring =~ s/^\%\(//;
    12911289      $macrostring =~ s/\)$//;
Note: See TracChangeset for help on using the changeset viewer.