- Timestamp:
- 08/16/15 19:20:07 (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/debbuild
r200 r202 31 31 use Cwd 'abs_path'; # for finding where files really are 32 32 use Config; 33 use File::Basename; 33 34 34 35 my $version = "0.11.3"; #VERSION# … … 668 669 $_ !~ /^%(?:attr|build|changelog|check|clean|config|configure|defattr|define|description| 669 670 dir|doc|docdir|else|endif|files|ghost|if|ifarch|ifn|ifnarch|ifnos|ifnxxx|fos|ifxxx| 670 install|makeinstall|package|patch\d +|post|postun|pre|prep|preun|readme|setup[^\s]*|671 install|makeinstall|package|patch\d*|post|postun|pre|prep|preun|readme|setup[^\s]*| 671 672 triggerin|triggerpostun|triggerun|verify|verifyscript)\b/x 672 673 ) { … … 986 987 qq(/bin/chmod -Rf a+rX,u+w,g-w,o-w .\n); 987 988 988 } elsif ( my ($patchnum,$patchopts) = (/^\%patch([^\s]+)(\s+.+)?$/) ) { 989 chomp $patchnum; 989 } elsif ( my ($patchnum,$patchopts) = (/^\%patch(\d*)(\s+.+)?$/) ) { 990 unless ( $patchnum ) { 991 $patchnum = ( $patchopts =~ s/-P\s+(\d+)// ? $1 : 0 ); 992 } 990 993 $prepscript .= qq(echo "Patch #$patchnum ($pkgdata{main}{"patch$patchnum"}):"\n); 991 994 # If there are options passed, use'em. … … 1165 1168 } elsif (/^buildroot:\s*(.+)/i) { 1166 1169 $specglobals{buildroot} = $1; 1167 } elsif (my ($sval) = /^source0?:\s*(.+)/i) { 1168 $sval =~ s/\s*$//; 1169 $pkgdata{main}{source} = $sval; 1170 # Do this here since we don't use any URL forms elsewhere (maybe some other time) 1171 $pkgdata{main}{source} =~ s|^.+/([^/]+)$|$1|; 1172 $pkgdata{sources}{0} = $pkgdata{main}{source}; 1173 # .tar, .tar.gz, .tar.Z, .tar.bz2, .tar.xz, .tgz, .zip 1174 die "Unknown Source: header format $sval\n" if $sval !~ /\.(?:tar(?:\.(?:gz|bz2|xz|Z))?|tgz|zip)$/; 1175 } elsif (my ($srcnum, $src) = (/^source([0-9]+):\s*(.+)/i)) { 1170 } elsif (my ($srcnum, $src) = (/^source(\d*):\s*(.+)/i)) { 1176 1171 $src =~ s/\s*$//; 1177 $pkgdata{sources}{$srcnum} = $src; 1178 # Do this here since we don't use any URL forms elsewhere (maybe some other time) 1179 $pkgdata{sources}{$srcnum} =~ s|^.+/([^/]+)$|$1|; 1180 } elsif (/^patch([^:]+):\s*(.+)$/i) { 1181 my $patchname = "patch$1"; 1182 $pkgdata{main}{$patchname} = $2; 1183 if ($pkgdata{main}{$patchname} =~ /\//) { 1184 # URL-style patch. Rare but not unheard-of. 1185 my @patchbits = split '/', $pkgdata{main}{$patchname}; 1186 $pkgdata{main}{$patchname} = $patchbits[$#patchbits]; 1187 } 1188 chomp $pkgdata{main}{$patchname}; 1172 $srcnum = 0 unless $srcnum; 1173 $pkgdata{main}{source} = basename($src); 1174 $pkgdata{sources}{0} = $pkgdata{main}{source} if 0 == $srcnum; 1175 } elsif (my ($patchnum, $patch) = (/^patch(\d*):\s*(.+)/i)) { 1176 $patch =~ s/\s*$//; 1177 $patchnum = 0 unless $patchnum; 1178 $pkgdata{main}{"patch$patchnum"} = basename($patch); 1189 1179 } elsif (/^buildarch(?:itecture)?:\s*(.+)/i) { 1190 1180 $pkgdata{main}{arch} = $1;
Note:
See TracChangeset
for help on using the changeset viewer.