- Timestamp:
- 07/05/07 12:49:06 (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/debbuild
r109 r110 151 151 # Files listing. Embedding this in %pkgdata would be, um, messy. 152 152 my %filelist; 153 my %doclist; 153 154 my $buildreq = ''; 154 155 … … 742 743 next LINE; 743 744 } 744 # %doc needs extra processing, because it can be a space-separated list. 745 # %doc needs extra processing, because it can be a space-separated list, and may 746 # include both full and partial pathnames. The partial pathnames must be fiddled 747 # into place in the %install script, because Debian doesn't really have the concept 748 # of "documentation file" that rpm does. (Debian "documentation files" are files 749 # in /usr/share/doc/<packagename>.) 745 750 if (/^\%doc/) { 746 751 s/^\%doc\s+//; 747 752 foreach (split()) { 748 $filelist{$subname} .= " %{_docdir}/$_"; 753 if (m|^/|) { 754 $filelist{$subname} .= " $_"; # and we process this in the processing of the install script 755 } else { 756 my $pkgname = $pkgdata{$subname}{name}; 757 $pkgname =~ tr/_/-/; 758 759 $doclist{$subname} .= " $_"; 760 s|^[^/]+/||g; # Gotta strip leading blah/ bits. Won't handle * (well) yet... (glob()?) 761 $filelist{$subname} .= " \%{_docdir}/$pkgname/$_"; 762 } 749 763 } 750 764 next LINE; … … 894 908 # Writes and executes the %install script (mostly) built while reading the spec file. 895 909 sub install { 910 911 # munge %doc entries into place 912 # rpm handles this with a separate executed %doc script, we're not going to bother. 913 foreach my $docpkg (keys %doclist) { 914 my $pkgname = $pkgdata{$docpkg}{name}; 915 $pkgname =~ s/_/-/g; 916 917 $installscript .= "DOCDIR=\$RPM_BUILD_ROOT\%{_docdir}/$pkgname\nexport DOCDIR\n"; 918 $installscript .= "mkdir -p \$DOCDIR\n"; 919 $doclist{$docpkg} =~ s/^\s*//; 920 foreach (split(' ',$doclist{$docpkg})) { 921 $installscript .= "cp -pr $_ \$DOCDIR/\n"; 922 } 923 } 924 896 925 # Expand the macros 897 926 $installscript = expandmacros($installscript,'igbp');
Note:
See TracChangeset
for help on using the changeset viewer.