Changeset 29


Ignore:
Timestamp:
12/14/05 18:20:12 (18 years ago)
Author:
kdeugau
Message:

/trunk

Checkpoint

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/debbuild

    r28 r29  
    417417exit 0;
    418418      }
     419
    419420    # pre/post (un)install scripts
    420421      if (/^\%pre\b/) {
     
    442443        }
    443444      }
     445    # done %pre/%post scripts
     446
    444447      if (/^\%files(?:\s+(?:-n\s+)?([a-zA-z0-9]+))?/) {
    445448        my $pkgname = 'main';
    446         if ($1) {
     449        if ($1) {       # Magic to add entries to the right list of files
    447450          if (/-n/) { $pkgname = $1; } else { $pkgname = "$pkgdata{main}{name}-$1"; }
    448451        }
    449         # subpackage not based on "main" package
    450 #print "$pkgname\n";
    451452        while (<SPECFILE>) {
    452           # need to update this to deal with %dir, %attr, etc
     453          chomp;
     454          # need to update this to deal (properly) with %dir, %attr, etc
     455          next if /^\%dir/;
     456          next if /^\%attr/;
     457          next if /^\%defattr/;
     458
     459          # and finally we can fall through %{_<FHS>}-prefixed locations...
     460          $filelist{$pkgname} .= " $_" if /^\%\{_/;
     461
     462          # ... unknown or "next section" % directives ...
    453463          redo LINE if /^\%/;
    454 chomp;
    455 #print; print "\n";
     464
     465          # ... and "normal" files
    456466          $filelist{$pkgname} .= " $_";
    457 #print $pkgdata{$pkgname}{files}; print "\n";
    458         }
    459         # do we replace \n's with \s in $filelist{$pkgname}?
    460         # Danger! Danger!
    461       }
     467        }
     468      } # done %file section
     469
    462470      if (/^\%changelog/) {
    463471        $pkgdata{main}{changelog} = '';
     
    815823  # Globals, and not-so-globals
    816824  if ($section =~ /g/) {
    817     $macrostring =~ s/\%\{_topdir\}/$topdir/g;
     825    $macrostring =~ s|%{_builddir}|%{_topdir}/BUILD|g;
     826    $macrostring =~ s|%{_topdir}|$topdir|g;
    818827    $macrostring =~ s|%{_tmppath}|$tmpdir|g;
    819828    $macrostring =~ s'%{_docdir}'/usr/share/doc'g;
Note: See TracChangeset for help on using the changeset viewer.