]> git.pld-linux.org Git - packages/rpm-build-tools.git/blobdiff - adapter.awk
- separated from rpm.spec
[packages/rpm-build-tools.git] / adapter.awk
index fea90ab224912923051a9795b1b7088c61d590cf..4c97a90d2c08a72f6b03f9c580f70b42bbd37b81 100644 (file)
@@ -3,13 +3,14 @@
 # This is adapter v0.28. Adapter adapts .spec files for PLD Linux.
 # $Id$
 #
-# Copyright (C) 1999-2006 PLD-Team <feedback@pld-linux.org>
+# Copyright (C) 1999-2007 PLD-Team <feedback@pld-linux.org>
 # Authors:
 #      Michał Kuratczyk <kura@pld.org.pl>
 #      Sebastian Zagrodzki <s.zagrodzki@mimuw.edu.pl>
 #      Tomasz Kłoczko <kloczek@rudy.mif.pg.gda.pl>
 #      Artur Frysiak <wiget@pld-linux.org>
 #      Michal Kochanowicz <mkochano@pld.org.pl>
+#      Jakub Bogusz <qboosh@pld-linux.org>
 #      Elan Ruusamäe <glen@pld-linux.org>
 #
 # See cvs log adapter{,.awk} for list of contributors
@@ -651,7 +652,7 @@ preamble == 1 {
 
        field = tolower($1)
        fieldnlower = $1
-       if (field ~ /summary:/ && !/etc\.$/) {
+       if (field ~ /summary:/ && !/etc\.$/ && !/Inc\.$/) {
                sub(/\.$/, "", $0);
        }
        if (field ~ /group(\([^)]+\)):/)
@@ -697,6 +698,8 @@ preamble == 1 {
                sub(/^Applications\/Productivity$/, "X11/Applications", group)
                sub(/^Database$/, "Applications/Databases", group)
                sub(/^Development\/Code Generators$/, "Development", group)
+               sub(/^Emulators$/, "Applications/Emulators", group)
+               sub(/^System\/Libraries$/, "Libraries", group)
 
                $0 = "Group:\t\t" group
 
@@ -921,6 +924,9 @@ preamble == 1 {
                sub("^http://.*\.dl\.sourceforge\.net/", "http://dl.sourceforge.net/", $2)
                sub("^http://dl\.sourceforge\.net/sourceforge/", "http://dl.sourceforge.net/", $2)
                sub("^http://dl\.sf\.net/", "http://dl.sourceforge.net/", $2)
+
+               sub("^ftp://ftp\.gnome\.org/", "http://ftp.gnome.org/", $2)
+               sub("^http://ftp\.gnome\.org/pub/gnome/", "http://ftp.gnome.org/pub/GNOME/", $2)
        }
 
 
@@ -1447,6 +1453,9 @@ function use_files_macros(        i, n, t, a)
                gsub("%attr\\(0", "%attr(")
        }
 
+       # kill leading whitespace
+       gsub(/^ +/, "");
+
        # kill default attrs
        gsub(/%dir %attr\(755,root,root\)/, "%dir");
        gsub(/%attr\(755,root,root\) %dir/, "%dir");
@@ -1649,11 +1658,11 @@ function replace_php_virtual_deps()
 #              return
 #      }
 
-       if (pkg ~ /^php-[a-z]/ && pkg !~ /^php-(pear|common|cli|devel|fcgi|cgi|dirs|program|pecl-)/) {
-               sub(/^php-/, "php(", pkg);
-               sub(/$/, ")", pkg);
-               $2 = pkg
-       }
+#      if (pkg ~ /^php-[a-z]/ && pkg !~ /^php-(pear|common|cli|devel|fcgi|cgi|dirs|program|pecl-)/) {
+#              sub(/^php-/, "php(", pkg);
+#              sub(/$/, ") # verify this correctness -- it may be wanted to use specific not virtual dep", pkg);
+#              $2 = pkg
+#      }
 
        if (pkg ~/^php$/) {
                $2 = "webserver(php)";
This page took 0.036966 seconds and 4 git commands to generate.