SPECS: adapter.awk - sorting fixes
glen
glen at pld-linux.org
Tue Dec 27 00:49:22 CET 2005
Author: glen Date: Mon Dec 26 23:49:22 2005 GMT
Module: SPECS Tag: HEAD
---- Log message:
- sorting fixes
---- Files affected:
SPECS:
adapter.awk (1.253 -> 1.254)
---- Diffs:
================================================================
Index: SPECS/adapter.awk
diff -u SPECS/adapter.awk:1.253 SPECS/adapter.awk:1.254
--- SPECS/adapter.awk:1.253 Tue Dec 27 00:14:43 2005
+++ SPECS/adapter.awk Tue Dec 27 00:49:17 2005
@@ -27,7 +27,7 @@
RPM_SECTIONS = "package|build|changelog|clean|description|install|post|posttrans|postun|pre|prep|pretrans|preun|triggerin|triggerpostun|triggerun"
SECTIONS = "^%(" RPM_SECTIONS ")"
- PREAMBLE_TAGS = "(Summary|Name|Version|Release|License|Group|URL|BuildArch|BuildRoot|Obsoletes|Provides|PreReq|(Build)?Requires)"
+ PREAMBLE_TAGS = "(Summary|Name|Version|Release|License|Group|URL|BuildArch|BuildRoot|Obsoletes|Conflicts|Provides|ExclusiveArch|ExcludeArch|PreReq|(Build)?Requires)"
preamble = 1 # Is it part of preamble? Default - yes
boc = 4 # Beginning of %changelog
@@ -108,7 +108,7 @@
gsub(/[#%]+{[!?]+[_a-zA-Z0-9]+:/, "", s);
# kill commented out items
- gsub(/[# \t]*/, "", s);
+ gsub(/^#[ \t]*/, "", s);
# force order
gsub(/^Summary\(/, "11Summary(", s);
@@ -120,10 +120,13 @@
gsub(/^Group/, "6Group", s);
gsub(/^URL/, "7URL", s);
- gsub(/^Provides/, "XProvides", s);
- gsub(/^Obsoletes/, "YObsoletes", s);
- gsub(/^BuildArch/, "ZBuildArch", s);
- gsub(/^BuildRoot/, "ZBuildRoot", s);
+ gsub(/^Provides/, "X1Provides", s);
+ gsub(/^Obsoletes/, "X2Obsoletes", s);
+ gsub(/^Conflicts/, "X3Conflicts", s);
+ gsub(/^BuildArch/, "X4BuildArch", s);
+ gsub(/^BuildRoot/, "X5BuildRoot", s);
+ gsub(/^ExclusiveArch/, "X6ExclusiveArch", s);
+ gsub(/^ExcludeArch/, "X6ExcludeArch", s);
# printf("%s -> %s\n", a""b, s);
return s;
@@ -141,8 +144,11 @@
# Generally, comments are printed without touching
sub(/[ \t]+$/, "")
- print $0
- next
+
+ if (/Source.*md5/) {
+ print $0
+ next
+ }
}
/^%define/ {
================================================================
---- CVS-web:
http://cvs.pld-linux.org/SPECS/adapter.awk?r1=1.253&r2=1.254&f=u
More information about the pld-cvs-commit
mailing list