Changeset 29
- Timestamp:
- 12/14/05 18:20:12 (19 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/debbuild
r28 r29 417 417 exit 0; 418 418 } 419 419 420 # pre/post (un)install scripts 420 421 if (/^\%pre\b/) { … … 442 443 } 443 444 } 445 # done %pre/%post scripts 446 444 447 if (/^\%files(?:\s+(?:-n\s+)?([a-zA-z0-9]+))?/) { 445 448 my $pkgname = 'main'; 446 if ($1) { 449 if ($1) { # Magic to add entries to the right list of files 447 450 if (/-n/) { $pkgname = $1; } else { $pkgname = "$pkgdata{main}{name}-$1"; } 448 451 } 449 # subpackage not based on "main" package450 #print "$pkgname\n";451 452 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 ... 453 463 redo LINE if /^\%/; 454 chomp; 455 #print; print "\n"; 464 465 # ... and "normal" files 456 466 $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 462 470 if (/^\%changelog/) { 463 471 $pkgdata{main}{changelog} = ''; … … 815 823 # Globals, and not-so-globals 816 824 if ($section =~ /g/) { 817 $macrostring =~ s/\%\{_topdir\}/$topdir/g; 825 $macrostring =~ s|%{_builddir}|%{_topdir}/BUILD|g; 826 $macrostring =~ s|%{_topdir}|$topdir|g; 818 827 $macrostring =~ s|%{_tmppath}|$tmpdir|g; 819 828 $macrostring =~ s'%{_docdir}'/usr/share/doc'g;
Note:
See TracChangeset
for help on using the changeset viewer.