[packages/adapter: 413/631] - move groups replace to function
glen
glen at pld-linux.org
Mon Sep 12 20:09:04 CEST 2016
commit ad9ea4170b57cd307325651b79c2c3893755e751
Author: Elan Ruusamäe <glen at pld-linux.org>
Date: Sat May 24 01:02:41 2008 +0000
- move groups replace to function
Changed files:
adapter.awk -> 1.395
adapter.awk | 101 +++++++++++++++++++++++++++++++-----------------------------
1 file changed, 53 insertions(+), 48 deletions(-)
---
diff --git a/adapter.awk b/adapter.awk
index fe0655a..174149e 100644
--- a/adapter.awk
+++ b/adapter.awk
@@ -676,54 +676,7 @@ preamble == 1 {
format_preamble()
group = $0;
sub(/^[^ \t]*[ \t]*/, "", group);
-
- sub(/^Amusements\/Games\/Strategy\/Real Time/, "X11/Applications/Games/Strategy", group)
- sub(/^Application\/Multimedia$/, "Applications/Multimedia", group)
- sub(/^Applications\/Compilers$/, "Development/Languages", group)
- sub(/^Applications\/Daemons$/, "Daemons", group)
- sub(/^Applications\/Internet$/, "Applications/Networking", group)
- sub(/^Applications\/Internet\/Peer to Peer/, "Applications/Networking", group)
- sub(/^Applications\/Productivity$/, "X11/Applications", group)
- sub(/^Database$/, "Applications/Databases", group)
- sub(/^Development\/Code Generators$/, "Development", group)
- sub(/^Development\/Docs$/, "Documentation", group)
- sub(/^Development\/Documentation$/, "Documentation", group)
- sub(/^Development\/Java/, "Development/Languages/Java", group)
- sub(/^Development\/Libraries\/C and C\+\+$/, "Development/Libraries", group)
- sub(/^Development\/Libraries\/Java$/, "Development/Languages/Java", group)
- sub(/^Development\/Other/,"Development", group)
- sub(/^Development\/Testing$/, "Development", group)
- sub(/^Emulators$/, "Applications/Emulators", group)
- sub(/^Games/,"Applications/Games", group)
- sub(/^Library\/Development$/, "Development/Libraries", group)
- sub(/^Networking\/Deamons$/, "Networking/Daemons", group)
- sub(/^Shells/,"Applications/Shells", group)
- sub(/^System Environment\/Base$/, "Base", group)
- sub(/^System Environment\/Daemons$/, "Daemons", group)
- sub(/^System Environment\/Kernel$/, "Base/Kernel", group)
- sub(/^System Environment\/Libraries$/, "Libraries", group)
- sub(/^System$/, "Base", group)
- sub(/^System\/Base$/, "Base", group)
- sub(/^System\/Libraries$/, "Libraries", group)
- sub(/^System\/Servers$/, "Daemons", group)
- sub(/^Text Processing\/Markup\/HTML$/, "Applications/Text", group)
- sub(/^Text Processing\/Markup\/XML$/, "Applications/Text", group)
- sub(/^Utilities\//,"Applications/", group)
- sub(/^Web\/Database$/, "Applications/WWW", group)
- sub(/^X11\/GNOME/,"X11/Applications", group)
- sub(/^X11\/GNOME\/Applications/,"X11/Applications", group)
- sub(/^X11\/GNOME\/Development\/Libraries/,"X11/Development/Libraries", group)
- sub(/^X11\/Games/,"X11/Applications/Games", group)
- sub(/^X11\/Games\/Strategy/,"X11/Applications/Games/Strategy", group)
- sub(/^X11\/Library/,"X11/Libraries", group)
- sub(/^X11\/Utilities/,"X11/Applications", group)
- sub(/^X11\/XFree86/, "X11", group)
- sub(/^X11\/Xserver$/, "X11/Servers", group)
- sub(/^Development\/C$/, "Development/Libraries", group)
- sub(/^Development\/Python$/, "Development/Languages/Python", group)
- sub(/^System\/Kernel and hardware$/, "Base/Kernel", group)
- sub(/^Application\/System$/, "Applications/System", group)
-
+ group = replace_groupnames(group);
$0 = "Group:\t\t" group
if (group ~ /^X11/ && x11 == 0) # Is it X11 application?
@@ -1770,4 +1723,56 @@ function replace_php_virtual_deps()
}
}
+function replace_groupnames(group)
+{
+ sub(/^Amusements\/Games\/Strategy\/Real Time/, "X11/Applications/Games/Strategy", group)
+ sub(/^Application\/Multimedia$/, "Applications/Multimedia", group)
+ sub(/^Applications\/Compilers$/, "Development/Languages", group)
+ sub(/^Applications\/Daemons$/, "Daemons", group)
+ sub(/^Applications\/Internet$/, "Applications/Networking", group)
+ sub(/^Applications\/Internet\/Peer to Peer/, "Applications/Networking", group)
+ sub(/^Applications\/Productivity$/, "X11/Applications", group)
+ sub(/^Database$/, "Applications/Databases", group)
+ sub(/^Development\/Code Generators$/, "Development", group)
+ sub(/^Development\/Docs$/, "Documentation", group)
+ sub(/^Development\/Documentation$/, "Documentation", group)
+ sub(/^Development\/Java/, "Development/Languages/Java", group)
+ sub(/^Development\/Libraries\/C and C\+\+$/, "Development/Libraries", group)
+ sub(/^Development\/Libraries\/Java$/, "Development/Languages/Java", group)
+ sub(/^Development\/Other/,"Development", group)
+ sub(/^Development\/Testing$/, "Development", group)
+ sub(/^Emulators$/, "Applications/Emulators", group)
+ sub(/^Games/,"Applications/Games", group)
+ sub(/^Library\/Development$/, "Development/Libraries", group)
+ sub(/^Networking\/Deamons$/, "Networking/Daemons", group)
+ sub(/^Shells/,"Applications/Shells", group)
+ sub(/^System Environment\/Base$/, "Base", group)
+ sub(/^System Environment\/Daemons$/, "Daemons", group)
+ sub(/^System Environment\/Kernel$/, "Base/Kernel", group)
+ sub(/^System Environment\/Libraries$/, "Libraries", group)
+ sub(/^System$/, "Base", group)
+ sub(/^System\/Base$/, "Base", group)
+ sub(/^System\/Libraries$/, "Libraries", group)
+ sub(/^System\/Servers$/, "Daemons", group)
+ sub(/^Text Processing\/Markup\/HTML$/, "Applications/Text", group)
+ sub(/^Text Processing\/Markup\/XML$/, "Applications/Text", group)
+ sub(/^Utilities\//,"Applications/", group)
+ sub(/^Web\/Database$/, "Applications/WWW", group)
+ sub(/^X11\/GNOME/,"X11/Applications", group)
+ sub(/^X11\/GNOME\/Applications/,"X11/Applications", group)
+ sub(/^X11\/GNOME\/Development\/Libraries/,"X11/Development/Libraries", group)
+ sub(/^X11\/Games/,"X11/Applications/Games", group)
+ sub(/^X11\/Games\/Strategy/,"X11/Applications/Games/Strategy", group)
+ sub(/^X11\/Library/,"X11/Libraries", group)
+ sub(/^X11\/Utilities/,"X11/Applications", group)
+ sub(/^X11\/XFree86/, "X11", group)
+ sub(/^X11\/Xserver$/, "X11/Servers", group)
+ sub(/^Development\/C$/, "Development/Libraries", group)
+ sub(/^Development\/Python$/, "Development/Languages/Python", group)
+ sub(/^System\/Kernel and hardware$/, "Base/Kernel", group)
+ sub(/^Application\/System$/, "Applications/System", group)
+
+ return group;
+}
+
# vim:ts=4:sw=4
================================================================
---- gitweb:
http://git.pld-linux.org/gitweb.cgi/packages/adapter.git/commitdiff/6ca0126d4d0c8c79feb7db10b0a0fade0f3b8885
More information about the pld-cvs-commit
mailing list