]> git.pld-linux.org Git - packages/rpm-build-tools.git/commitdiff
- fixes for Summary(xx_XX) and Group(xx_XX) preamble fields
authorJakub Bogusz <qboosh@pld-linux.org>
Sun, 12 Aug 2001 12:51:28 +0000 (12:51 +0000)
committercvs2git <feedback@pld-linux.org>
Sun, 24 Jun 2012 12:13:13 +0000 (12:13 +0000)
Changed files:
    adapter.awk -> 1.95

adapter.awk

index 258b59423e77899773be253f84d3d688609d73c7..120720168b511b0a7a6489b10fad57a56f266488 100644 (file)
@@ -317,9 +317,10 @@ preamble == 1 {
        sub(/[ \t]*:/, ":")
        
        field = tolower($1)
+       fieldnlower = $1
        if (Byla_grupa == 1 && field ~ /^#/)
                next
-       if (Byla_grupa == 1 && field !~ /group(\(..\))?:/) {
+       if (Byla_grupa == 1 && field !~ /group(\([^)]+\))?:/) {
                Byla_grupa = 0
                print "Group:\t\t" Grupa["en"]
                if (Grupa["en"] ~ /^X11/ && x11 == 0)   # Is it X11 application?
@@ -364,7 +365,7 @@ preamble == 1 {
        if (field ~ /buildroot:/)
                $0 = $1 "%{tmpdir}/%{name}-%{version}-root-%(id -u -n)"
 
-       if (field ~ /group(\(..\))?:/) {
+       if (field ~ /group(\([^)]+\))?:/) {
                format_preamble()
                sub(/^Utilities\//,"Applications/",$2)
                sub(/^Games/,"Applications/Games",$2)
@@ -376,10 +377,10 @@ preamble == 1 {
                sub(/^X11\/Games\/Strategy/,"X11/Applications/Games/Strategy",$2)
                sub(/^Shells/,"Applications/Shells",$2)
 
-               if (!match(field,/\(..\):/))
+               if (!match(fieldnlower,/\([^)]+\):/))
                        glang="en"
                else
-                       glang=substr(field,RSTART+1,2)
+                       glang=substr(fieldnlower,RSTART+1,RLENGTH-3)
                sub(/^[^ \t]*[ \t]*/,"")
                Grupa[glang] = $0
                Byla_grupa = 1
@@ -528,7 +529,7 @@ function fixedsub(s1,s2,t,      ind) {
 function format_preamble()
 {
        sub(/:[ \t]*/, ":")
-       if (match($0, /[A-Za-z0-9()# \t]+[ \t]*:[ \t]*/) == 1) {
+       if (match($0, /[A-Za-z0-9()#_ \t]+[ \t]*:[ \t]*/) == 1) {
                if (RLENGTH < 8)
                        sub(/:/, ":\t\t")
                else
This page took 0.063567 seconds and 4 git commands to generate.