Changeset 30
- Timestamp:
- 12/15/05 15:34:00 (19 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/debbuild
r29 r30 22 22 # -> Parse/execute "user" config/macros (if any - *my* requirement is %_topdir) 23 23 # -> Parse command line for options, spec file/tarball/.src.deb (NB - also accept .src.rpm) 24 25 sub expandmacros; 24 26 25 27 # User's prefs for dirs, environment, etc,etc,etc. … … 145 147 if ($cmdopts{stage} =~ /[ilabs]/) { 146 148 install(); 149 #foreach my $pkg (@pkglist) { 150 # print "files in $pkg:\n ".$filelist{$pkg}."\n"; 151 #} 152 147 153 } 148 154 # -> binpkg and srcpkg if -.a … … 412 418 $cleanscript .= $_; 413 419 } 414 print "before:\n$cleanscript\n";415 420 $cleanscript = expandmacros($cleanscript,'gp'); 416 print "\nafter:\n$cleanscript\n";417 exit 0;418 421 } 419 422 … … 458 461 459 462 # and finally we can fall through %{_<FHS>}-prefixed locations... 460 $filelist{$pkgname} .= " $_" if /^\%\{_/; 463 if (/^\%\{_/) { 464 $filelist{$pkgname} .= " $_"; 465 next; 466 } 467 # EW. Necessary to clear up %define expansions before we exit with redo. 468 $_ = expandmacros $_, 'g'; 461 469 462 470 # ... unknown or "next section" % directives ... … … 466 474 $filelist{$pkgname} .= " $_"; 467 475 } 476 $filelist{$pkgname} = expandmacros($filelist{$pkgname}, 'g'); 468 477 } # done %file section 469 478 … … 619 628 # Make sure we have somewhere to write the .deb file 620 629 if (!-e "$topdir/DEBS/i386") { 621 # "if [ -e $topdir/DEBS/i386 ]; then\n\tmkdir $topdir/DEBS/i386\nfi\n".622 630 mkdir "$topdir/DEBS/i386"; 623 631 } … … 628 636 # Gotta do this first, otherwise we don't have a place to move files from %files 629 637 mkdir "$buildroot/$pkg"; 638 639 # Eliminate any lingering % macros 640 $filelist{$pkg} = expandmacros $filelist{$pkg}, 'g'; 630 641 631 642 my @pkgfilelist = split ' ', $filelist{$pkg}; … … 828 839 $macrostring =~ s'%{_docdir}'/usr/share/doc'g; 829 840 841 # Standard FHS locations 842 $macrostring =~ s'%{_bindir}'/usr/bin'g; 843 $macrostring =~ s'%{_sbindir}'/usr/bin'g; 844 $macrostring =~ s'%{_mandir}'/usr/share/man'g; 845 $macrostring =~ s'%{_includedir}'/usr/include'g; 846 830 847 # %define's 831 848 foreach my $key (keys %specglobals) {
Note:
See TracChangeset
for help on using the changeset viewer.