[packages/adapter: 103/631] - Support for gettextized groups named in RPM: * /^Group:/ field is checked if group exist in grou
glen
glen at pld-linux.org
Mon Sep 12 19:43:06 CEST 2016
commit f37c1259358bd15d7fbeedb7ac49319ce1504d8f
Author: mkochano <mkochano at pld-linux.org>
Date: Fri Feb 22 21:57:02 2002 +0000
- Support for gettextized groups named in RPM:
* /^Group:/ field is checked if group exist in groups file.
* /^Groups(\([^)]+\)):/ fields are removed.
- Changed my email.
Changed files:
adapter.awk -> 1.103
adapter.awk | 66 ++++++++++++++++++++-----------------------------------------
1 file changed, 21 insertions(+), 45 deletions(-)
---
diff --git a/adapter.awk b/adapter.awk
index 7a0cb88..c4766c0 100644
--- a/adapter.awk
+++ b/adapter.awk
@@ -8,7 +8,7 @@
# Sebastian Zagrodzki <s.zagrodzki at mimuw.edu.pl>
# Tomasz K�oczko <kloczek at rudy.mif.pg.gda.pl>
# Artur Frysiak <wiget at pld.org.pl>
-# Michal Kochanowicz <mkochano at ee.pw.edu.pl>
+# Michal Kochanowicz <mkochano at pld.org.pl>
# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
BEGIN {
@@ -326,19 +326,32 @@ preamble == 1 {
field = tolower($1)
fieldnlower = $1
- if (Byla_grupa == 1 && field ~ /^#/)
+ if (field ~ /group(\([^)]+\)):/)
next
- 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?
+ if (field ~ /group:/) {
+ format_preamble()
+ sub(/^Utilities\//,"Applications/",$2)
+ sub(/^Games/,"Applications/Games",$2)
+ sub(/^X11\/Games/,"X11/Applications/Games",$2)
+ sub(/^X11\/GNOME\/Development\/Libraries/,"X11/Development/Libraries",$2)
+ sub(/^X11\/GNOME\/Applications/,"X11/Applications",$2)
+ sub(/^X11\/GNOME/,"X11/Applications",$2)
+ sub(/^X11\/Utilities/,"X11/Applications",$2)
+ sub(/^X11\/Games\/Strategy/,"X11/Applications/Games/Strategy",$2)
+ sub(/^Shells/,"Applications/Shells",$2)
+
+ sub(/^[^ \t]*[ \t]*/,"")
+ Grupa = $0
+
+ print "Group:\t\t" Grupa
+ if (Grupa ~ /^X11/ && x11 == 0) # Is it X11 application?
x11 = 1
byl_plik_z_grupami = 0
byl_opis_grupy = 0
while ((getline linia_grup < groups_file) > 0) {
byl_plik_z_grupami = 1
- if (linia_grup == Grupa["en"]) {
+ if (linia_grup == Grupa) {
byl_opis_grupy = 1
break
}
@@ -348,23 +361,9 @@ preamble == 1 {
print "######\t\t" groups_file ": no such file"
else if (!byl_opis_grupy)
print "######\t\t" "Unknown group!"
- else
- while (getline linia_grup < groups_file) {
- if (linia_grup == "")
- break
- split(linia_grup, g, /[\[\]:]/)
- sub(/^[ \t]*/,"",g[4])
- Grupa[g[2]]=g[4]
- }
close(groups_file)
-
- delete Grupa["en"]
- for (jezyk in Grupa) {
- print "Group(" jezyk "):\t" Grupa[jezyk] | "sort"
- delete Grupa[jezyk]
- }
- close ("sort")
+ next
}
if (field ~ /packager:|distribution:|docdir:|prefix:/)
@@ -373,29 +372,6 @@ preamble == 1 {
if (field ~ /buildroot:/)
$0 = $1 "%{tmpdir}/%{name}-%{version}-root-%(id -u -n)"
- if (field ~ /group(\([^)]+\))?:/) {
- format_preamble()
- sub(/^Utilities\//,"Applications/",$2)
- sub(/^Games/,"Applications/Games",$2)
- sub(/^X11\/Games/,"X11/Applications/Games",$2)
- sub(/^X11\/GNOME\/Development\/Libraries/,"X11/Development/Libraries",$2)
- sub(/^X11\/GNOME\/Applications/,"X11/Applications",$2)
- sub(/^X11\/GNOME/,"X11/Applications",$2)
- sub(/^X11\/Utilities/,"X11/Applications",$2)
- sub(/^X11\/Games\/Strategy/,"X11/Applications/Games/Strategy",$2)
- sub(/^Shells/,"Applications/Shells",$2)
-
- if (!match(fieldnlower,/\([^)]+\):/))
- glang="en"
- else
- glang=substr(fieldnlower,RSTART+1,RLENGTH-3)
- sub(/^[^ \t]*[ \t]*/,"")
- Grupa[glang] = $0
- Byla_grupa = 1
-
- next # Line is already formatted and printed
- }
-
# Use "License" instead of "Copyright" if it is (L)GPL or BSD
if (field ~ /copyright:/ && $2 ~ /GPL|BSD/)
$1 = "License:"
================================================================
---- gitweb:
http://git.pld-linux.org/gitweb.cgi/packages/adapter.git/commitdiff/6ca0126d4d0c8c79feb7db10b0a0fade0f3b8885
More information about the pld-cvs-commit
mailing list