- Timestamp:
- 02/16/06 18:05:11 (19 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/debbuild
r36 r37 456 456 if (/-n/) { $pkgname = $1; } else { $pkgname = "$pkgdata{main}{name}-$1"; } 457 457 } 458 459 # Set this now, so it can be flipped a bit later, and used much later. 460 #$pkgdata{$pkgname}{conffiles} = 0; 461 458 462 while (<SPECFILE>) { 459 463 chomp; … … 462 466 next if /^\%attr/; 463 467 next if /^\%defattr/; 468 469 # Debian dpkg doesn't speak "%docdir". Meh. 470 next if /^\%docdir/; 471 472 # Conffiles. Note that Debian and RH have similar, but not 473 # *quite* identical ideas of what constitutes a conffile. Nrgh. 474 if (/^\%config\s+(.+)$/) { 475 $pkgdata{$pkgname}{conffiles} = 1; # Flag it for later 476 my $tmp = $1; # Now we can mangleificationate it. And we probably need to. :/ 477 if ($tmp !~ /\s+/) { 478 # Simplest case, just a file. Whew. 479 push @{$pkgdata{$pkgname}{conflist}}, $tmp; 480 $filelist{$pkgname} .= " $tmp"; 481 } else { 482 # Wot? Spaces? That means extra %-macros. Which, for the most part, can be ignored. 483 ($tmp) = ($tmp =~ /.+\s([^\s]+)/); # Strip everything before the last space 484 $tmp = expandmacros($tmp, 'gp'); # Expand common macros 485 push @{$pkgdata{$pkgname}{conflist}}, $tmp; 486 $filelist{$pkgname} .= " $tmp"; 487 } 488 next; 489 } 464 490 465 491 # and finally we can fall through %{_<FHS>}-prefixed locations... … … 645 671 my @pkgfilelist = split ' ', $filelist{$pkg}; 646 672 foreach my $pkgfile (@pkgfilelist) { 673 $pkgfile = expandmacros($pkgfile, 'gp'); 647 674 my @filepath = ($pkgfile =~ m|(.+)/([^/]+)$|); 648 675 qx { mkdir -p $buildroot/$pkg$filepath[0] } … … 680 707 print CONTROL $control; 681 708 close CONTROL; 709 710 # Iff there are conffiles (as specified in the %files list(s), add'em 711 # in so dpkg-deb can tag them. 712 if ($pkgdata{$pkg}{conffiles}) { 713 open CONFLIST, ">$buildroot/$pkg/DEBIAN/conffiles"; 714 foreach my $conffile (@{$pkgdata{$pkg}{conflist}}) { 715 print CONFLIST "$conffile\n"; 716 } 717 close CONFLIST; 718 } 682 719 683 720 # Can't see much point in scripts on subpackages... although since
Note:
See TracChangeset
for help on using the changeset viewer.