Rev | Line | |
---|
[3664] | 1 | #!/bin/awk -f |
---|
| 2 | # remove smp, BOOT, BOOTsmp entry from kernel.spec |
---|
| 3 | # by Jun Nishii <jun@vinelinux.org> |
---|
| 4 | # |
---|
| 5 | # $Id: parsespec,v 1.9 2001/02/20 14:33:02 sagami Exp $ |
---|
| 6 | |
---|
| 7 | BEGIN { status=0; fileflag=0; |
---|
| 8 | # NREV=ARGV[1]; delete ARGV[1]; |
---|
| 9 | # SRPMNAME=ARGV[2]; delete ARGV[2]; |
---|
| 10 | # DISTRIBUTION=ARGV[3]; delete ARGV[3]; |
---|
| 11 | # PACKAGER=ARGV[4]; delete ARGV[4]; |
---|
| 12 | } |
---|
| 13 | |
---|
| 14 | #$1 ~ /^Release/ { print "Release: " NREV; next } |
---|
| 15 | #$1 ~ /^Vendor/ { print "Vendor: mkkpkg (" SRPMNAME ")"; next } |
---|
| 16 | #$1 ~ /^Distribution/ { print "Distribution: " DISTRIBUTION; next } |
---|
| 17 | #$1 ~ /^Packager/ { print "Packager: " PACKAGER; next} |
---|
| 18 | |
---|
| 19 | |
---|
| 20 | $1 ~ /^%description/ || /^%package/ { |
---|
| 21 | if ( $2 != "smp" && $2 != "BOOT" && $2 != "BOOTsmp" ) { |
---|
| 22 | status=0; print; |
---|
| 23 | } else { |
---|
| 24 | status=1; |
---|
| 25 | } |
---|
| 26 | next; |
---|
| 27 | } |
---|
| 28 | |
---|
| 29 | $1 ~ /^%prep/{ status=0; print; next; } |
---|
| 30 | |
---|
| 31 | $1 ~ /^BuildKernel/ || /^BuildiBCS/ || /^SaveHeaders/ || /^BuildPCMCIA/ || /^BuildALSA/ { |
---|
| 32 | if ( $3 != "smp" && $2 != "smp" && $2 != "BOOT" && $2 != "BOOTsmp" ) { |
---|
| 33 | { print; } |
---|
| 34 | } |
---|
| 35 | next; |
---|
| 36 | } |
---|
| 37 | |
---|
| 38 | $1 ~ /^%if/ || /%endif/ || /%else/{ print; next; } |
---|
| 39 | |
---|
| 40 | $1 ~ /^%pre/ || /^%preun/ || /^%post/ || /^%postun/ { |
---|
| 41 | if ( $2 != "smp" && $2 != "BOOT" && $2 != "BOOTsmp" ) { |
---|
| 42 | status=0; print; |
---|
| 43 | } else { |
---|
| 44 | status=1; |
---|
| 45 | } |
---|
| 46 | next; |
---|
| 47 | } |
---|
| 48 | |
---|
| 49 | $1 ~ /^%files/ { |
---|
| 50 | if ( $2 != "smp" && $2 != "BOOT" && $2 != "BOOTsmp" ) { |
---|
| 51 | status=0; print; |
---|
| 52 | } else { |
---|
| 53 | status=1; |
---|
| 54 | } |
---|
| 55 | next; |
---|
| 56 | } |
---|
| 57 | |
---|
| 58 | { if ( status == 0 ) { print; } |
---|
| 59 | } |
---|
Note: See
TracBrowser
for help on using the repository browser.