]> git.pld-linux.org Git - packages/rpm-build-tools.git/blobdiff - adapter.awk
- updated
[packages/rpm-build-tools.git] / adapter.awk
index b8294f8d1d0af4cc063f0269c8e1e3cd28368e35..bbcac32abe84d3e2a8dd9b675a1ba2d9bab0a33e 100644 (file)
@@ -2,7 +2,7 @@
 #
 # Adapter adapts .spec files for PLD Linux.
 #
-# Copyright (C) 1999-2007 PLD-Team <feedback@pld-linux.org>
+# Copyright (C) 1999-2010 PLD-Team <feedback@pld-linux.org>
 # Authors:
 #      MichaƂ Kuratczyk <kura@pld.org.pl>
 #      Sebastian Zagrodzki <s.zagrodzki@mimuw.edu.pl>
 # - sort Requires, BuildRequires
 # - check if %description (lang=C) contains 8bit
 # - desc wrapping is totally fucked up on global.spec,1.25, dosemu.spec,1.115-
+# - it should change: /%source([0-9]+)/i to %{SOURCE\1}
+# - extra quote on LDFLAGS line: https://bugs.launchpad.net/pld-linux/+bug/385836
+# - %{with_foo:%attr()...} gets converted to %attr() %{with_foo:...} [vlc.spec]
+# - 'R: foo ' (with traliling space) gets coverted to "R: foo\nR: " [vlc.spec @ 1.199 ]
 
 BEGIN {
        RPM_SECTIONS = "package|build|changelog|clean|description|install|post|posttrans|postun|pre|prep|pretrans|preun|triggerin|triggerpostun|triggerun|verifyscript|check"
@@ -31,7 +35,7 @@ BEGIN {
 
        RCSID = "$Id$"
        rev = RCSID # TODO: parse from RCSID
-       VERSION = "0.31/" rev
+       VERSION = "0.35/" rev
 
        PREAMBLE_TAGS = "(R|BR|Summary|Name|Version|Release|Epoch|License|Group|URL|BuildArch|BuildRoot|Obsoletes|Conflicts|Provides|ExclusiveArch|ExcludeArch|Pre[Rr]eq|(Build)?Requires|Suggests|Auto(Req|Prov))"
 
@@ -55,9 +59,10 @@ BEGIN {
 
        import_rpm_macros()
 
-       groups_file = sourcedir "/rpm.groups"
+       packages_dir = topdir
+       groups_file = packages_dir "/rpm.groups"
 
-       system("cd `rpm --eval %_sourcedir`; [ -f rpm.groups ] || cvs up rpm.groups >/dev/null")
+       system("cd "packages_dir"; [ -f rpm.groups ] || cvs up rpm.groups > /dev/null")
        system("[ -d ../PLD-doc ] && cd ../PLD-doc && ([ -f BuildRequires.txt ] || cvs up BuildRequires.txt >/dev/null)");
 
        # Temporary file for changelog section
@@ -132,7 +137,7 @@ function b_makekey(a, b,    s) {
                while (getline)         # print the rest of spec as it is
                        print
                do_not_touch_anything = 1 # do not touch anything in END()
-               exit 0
+               exit(rc = 0)
        }
 
        # Generally, comments are printed without touching
@@ -231,6 +236,22 @@ function b_makekey(a, b,   s) {
 
        if ($2 ~ /^mod_name$/)
                mod_name = $3
+       if ($2 ~ /^_?pearname$/)
+               pearname = $3
+       if ($2 ~ /^_class$/)
+               pear_class = $3
+       if ($2 ~ /^_subclass$/)
+               pear_subclass = $3
+
+       # kill the _class and _subclass pear macros
+       if ($2 == "_pearname" || $2 == "pearname") {
+               if (pear_class) {
+                       gsub("%{_class}", pear_class, $3);
+               }
+               if (pear_subclass) {
+                       gsub("%{_subclass}", pear_subclass, $3);
+               }
+       }
 
        sub(/[ \t]+$/, "");
        # do nothing further, otherwise adapter thinks we're at preamble
@@ -413,6 +434,9 @@ function b_makekey(a, b,    s) {
        # atrpms
        $0 = fixedsub("%perl_configure", "%{__perl} Makefile.PL \\\n\tINSTALLDIRS=vendor", $0);
        $0 = fixedsub("%perl_makecheck", "%{?with_tests:%{__make} test}", $0);
+
+       # alt linux
+       $0 = fixedsub("%make_build", "%{__make}", $0);
 }
 
 ##########
@@ -482,6 +506,9 @@ function b_makekey(a, b,    s) {
 
        # atrpms
        $0 = fixedsub("%perl_makeinstall", "%{__make} pure_install \\\n\tDESTDIR=$RPM_BUILD_ROOT", $0);
+
+       # alt linux
+       $0 = fixedsub("%make_install DESTDIR=$RPM_BUILD_ROOT install", "%{__make} install \\\n\tDESTDIR=$RPM_BUILD_ROOT", $0);
 }
 
 ##########
@@ -634,7 +661,6 @@ preamble == 1 {
        }
 
        field = tolower($1)
-       fieldnlower = $1
        if (field ~ /summary:/ && !/etc\.$/ && !/Inc\.$/) {
                sub(/\.$/, "", $0);
        }
@@ -674,7 +700,7 @@ preamble == 1 {
        }
 
        # split (build)requires, obsoletes on commas
-       if (field ~ /(obsoletes|requires|provides|conflicts):/ && NF > 2) {
+       if (field ~ /(obsoletes|requires|provides|conflicts|suggests):/ && NF > 2) {
                value = substr($0, index($0, $2));
                $0 = format_requires($1, value);
        }
@@ -705,7 +731,7 @@ preamble == 1 {
                replace_requires();
        }
 
-       if (field ~ /^requires:/) {
+       if (field ~ /^requires:/ || field ~ /^requires\(/) {
                replace_requires();
        }
 
@@ -725,6 +751,20 @@ preamble == 1 {
                $1 = "License:"
        }
 
+       # ease updating from debian .dsc
+       if (field ~ /homepage:/) {
+               $1 = "URL:"
+       }
+
+       # suse
+       if (field ~ /recommends:/) {
+               $1 = "Suggests:"
+       }
+
+       if ($3 == "==" && $1 !~ /%/) {
+               $3 = "="
+       }
+
        if (field ~ /license:/) {
                l = substr($0, index($0, $2));
                if (l == "Python Software Foundation License") {
@@ -748,6 +788,24 @@ preamble == 1 {
                if (l == "GPLv2+") {
                        l = "GPL v2+"
                }
+               if (l == "GPL v2 or later") {
+                       l = "GPL v2+"
+               }
+               if (l == "LGPL v2.0 only") {
+                       l = "LGPL v2"
+               }
+               if (l == "LGPLv2+") {
+                       l = "LGPL v2+"
+               }
+               if (l == "GPLv3") {
+                       l = "GPL v3"
+               }
+               if (l == "GPLv3+") {
+                       l = "GPL v3+"
+               }
+               if (l == "MPLv1.1") {
+                       l = "MPL v1.1"
+               }
                $0 = "License:\t" l;
        }
 
@@ -788,6 +846,9 @@ preamble == 1 {
        if (field ~ /^url:$/)
                $1 = "URL:"
 
+       if (field ~ /^patch/)
+               $1 = "Patch" substr(field, 6);
+
        if (field ~ /^description:$/)
                $1 = "\n%description\n"
 
@@ -894,7 +955,7 @@ preamble == 1 {
 #      so don't do that.
 # - comments leading the BR/R can not be associated,
 #      so don't adapterize when the BR/R are mixed with comments
-ENVIRON["SKIP_SORTBR"] != 1 && preamble == 1 && $0 ~ PREAMBLE_TAGS, $0 ~ PREAMBLE_TAGS {
+ENVIRON["SKIP_SORTBR"] != 1 && preamble == 1 && $0 ~ PREAMBLE_TAGS ":", $0 ~ PREAMBLE_TAGS ":"{
        if ($1 ~ /Pre[Rr]eq:/) {
                sub(/Pre[Rr]eq:/, "Requires:", $1);
        }
@@ -962,8 +1023,9 @@ preamble == 1 {
 
 
 END {
-       if (do_not_touch_anything)
-               exit 0
+       if (do_not_touch_anything) {
+               exit(rc)
+       }
 
        # TODO: need to output these in proper place
        if (BR_count > 0) {
@@ -1066,7 +1128,6 @@ function use_macros()
        gsub(py_sitedir, "%{py_sitedir}")
        gsub(py_scriptdir, "%{py_scriptdir}")
        gsub("%{_libdir}/python2.4/site-packages", "%{py_sitedir}")
-       gsub("%{python_sitelib}", "%{py_sitedir}")
 
        gsub(ruby_archdir, "%{ruby_archdir}")
        gsub(ruby_ridir, "%{ruby_ridir}")
@@ -1079,6 +1140,12 @@ function use_macros()
        gsub("%{_datadir}/pixmaps", "%{_pixmapsdir}")
        gsub("%{_datadir}/java", "%{_javadir}")
 
+       gsub("%{_libdir}/pkgconfig", "%{_pkgconfigdir}")
+       gsub(pkgconfigdir, "%{_pkgconfigdir}")
+
+       gsub("%{_datadir}/pkgconfig", "%{_npkgconfigdir}")
+       gsub(npkgconfigdir, "%{_npkgconfigdir}")
+
        gsub(libdir, "%{_libdir}")
        gsub(javadir, "%{_javadir}")
 
@@ -1159,6 +1226,10 @@ function use_macros()
                        continue;
                if ($c ~ sysconfdir "/tmpwatch")
                        continue;
+               if ($c ~ sysconfdir "/acpi")
+                       continue;
+               if ($c ~ sysconfdir "/apm")
+                       continue;
                gsub(sysconfdir, "%{_sysconfdir}", $c)
        }
 
@@ -1263,6 +1334,14 @@ function use_macros()
        gsub("^gcc ", "%{__cc} ")
        gsub("^rm --interactive=never ", "%{__rm} ")
 
+       # fedora
+       gsub("%{ruby_sitearch}", "%{ruby_sitearchdir}")
+       gsub("%{python_sitearch}", "%{py_sitedir}")
+       gsub("%{python_sitelib}", "%{py_sitescriptdir}")
+
+       # alt linux
+       gsub("%_man1dir", "%{_mandir}/man1")
+
        # mandrake specs
        gsub("^%make$", "%{__make}")
        gsub("^%make ", "%{__make} ")
@@ -1312,6 +1391,15 @@ function use_macros()
 
        $0 = fixedsub("%(%{__cc} -dumpversion)", "%{cc_version}", $0);
        $0 = fixedsub("%(%{__cxx} -dumpversion)", "%{cxx_version}", $0);
+
+       # kill the _class and _subclass pear macros
+       if (pear_class) {
+               gsub("%{_class}", pear_class);
+       }
+       if (pear_subclass) {
+               gsub("%{_subclass}", pear_subclass);
+       }
+
 }
 
 function format_configure(line,                n, a, s) {
@@ -1392,7 +1480,7 @@ function use_files_macros(        i, n, t, a, l)
                }
        }
 
-       if (/lib.+\.so/ && !/\.so$/ && !/^%attr.*/ && !/%exclude/) {
+       if (/lib.+\.so\b/ && !/\.so$/ && !/^%attr.*/ && !/%exclude/) {
                $0 = "%attr(755,root,root) " $0
        }
 
@@ -1400,6 +1488,11 @@ function use_files_macros(       i, n, t, a, l)
                $0 = "%attr(755,root,root) " $0
        }
 
+       # remove attrs from man pages
+       if (/%{_mandir}/ && /^%attr/) {
+               sub("^%attr\\(.*\\) *", "");
+       }
+
        # /etc/sysconfig files
        # %attr(640,root,root) %config(noreplace) %verify(not size mtime md5) /etc/sysconfig/*
        # attr not required, allow default 644 attr
@@ -1457,6 +1550,7 @@ function use_files_macros(        i, n, t, a, l)
 
        if (/%{_mandir}/) {
                gsub("\.gz$", "*")
+               gsub("%ext_man$", "*")
        }
 
        # locale dir and no %lang -> bad
@@ -1569,20 +1663,33 @@ function unify_url(url)
 {
 
        # sourceforge urls
-       # Docs about sourceforge mirror system: http://sourceforge.net/docs/B05/
-       sub("[?&]big_mirror=.*$", "", url);
-       sub("[?&]modtime=.*$", "", url);
-       sub("[?]use_mirror=.*$", "", url);
-       sub("[?]download$", "", url);
-
-       sub("^http://prdownloads\.sourceforge\.net/", "http://dl.sourceforge.net/", url)
-       sub("^http://download\.sf\.net/", "http://dl.sourceforge.net/", url)
-       sub("^http://download\.sourceforge\.net/", "http://dl.sourceforge.net/", url)
-       sub("^http://downloads\.sourceforge\.net/", "http://dl.sourceforge.net/", url)
-
-       sub("^http://.*\.dl\.sourceforge\.net/", "http://dl.sourceforge.net/", url)
-       sub("^http://dl\.sourceforge\.net/sourceforge/", "http://dl.sourceforge.net/", url)
-       sub("^http://dl\.sf\.net/", "http://dl.sourceforge.net/", url)
+       # Docs about sourceforge mirror system: http://sourceforge.net/apps/trac/sourceforge/wiki/Mirrors
+       # TODO: SF unify: http://downloads.sourceforge.net/PROJECT/TARBALL
+
+       # 1. unify domains
+       sub("^http://prdownloads\.sourceforge\.net/", "http://downloads.sourceforge.net/", url)
+       sub("^http://download\.sf\.net/", "http://downloads.sourceforge.net/", url)
+       sub("^http://download\.sourceforge\.net/", "http://downloads.sourceforge.net/", url)
+       sub("^http://dl\.sourceforge\.net/", "http://downloads.sourceforge.net/", url)
+       sub("^http://.*\.dl\.sourceforge\.net/", "http://downloads.sourceforge.net/", url)
+       sub("^http://dl\.sf\.net/", "http://downloads.sourceforge.net/", url)
+       sub("^http://downloads\.sourceforge\.net/sourceforge/", "http://downloads.sourceforge.net/", url)
+
+       # 2. special hacks
+       # new style urls, strip "files/" between and prepend dl.
+       if (match(url, "^http://sourceforge.net/projects/[^/]+/files/")) {
+               url = substr(url, 1, RLENGTH - length("files/")) substr(url, RSTART + RLENGTH);
+               sub("^http://sourceforge.net/projects/", "http://downloads.sourceforge.net/project/", url);
+       }
+
+       # 3. unify urls
+       if (url ~ /sourceforge.net/) {
+               sub("[?&]big_mirror=.*$", "", url);
+               sub("[?&]modtime=.*$", "", url);
+               sub("[?]use_mirror=.*$", "", url);
+               sub("[?]download$", "", url);
+               sub("/download$", "", url);
+       }
 
        sub("^ftp://ftp\.gnome\.org/", "http://ftp.gnome.org/", url)
        sub("^http://ftp\.gnome\.org/pub/gnome/", "http://ftp.gnome.org/pub/GNOME/", url)
@@ -1591,8 +1698,13 @@ function unify_url(url)
        sub("^http://apache.zone-h.org/", "http://www.apache.org/dist/", url)
 
        # gnu.org
-       sub("^ftp://ftp.gnu.org/", "http://ftp.gnu.org/", url)
-       sub("^http://ftp.gnu.org/pub/gnu/", "http://ftp.gnu.org/gnu/", url)
+       sub("^ftp://ftp\.gnu\.org/", "http://ftp.gnu.org/", url)
+       sub("^http://ftp\.gnu\.org/pub/gnu/", "http://ftp.gnu.org/gnu/", url)
+
+       # debian.org
+       sub("^ftp://ftp\.[^.]+\.debian\.org/", "ftp://ftp.debian.org/", url)
+       sub("^http://ftp\.[^.]+\.debian\.org/", "ftp://ftp.debian.org/", url)
+       sub("^ftp://ftp\.debian\.org/pub/debian/", "ftp://ftp.debian.org/debian/", url)
 
        return url
 }
@@ -1602,6 +1714,12 @@ function demacroize(str)
        if (mod_name) {
                sub("%{mod_name}", mod_name, str);
        }
+       if (pearname) {
+               sub("%{_pearname}", pearname, str);
+       }
+       if (pearname) {
+               sub("%{pearname}", pearname, str);
+       }
        if (name) {
                sub("%{name}", name, str);
        }
@@ -1690,74 +1808,23 @@ function add_br(br)
        BR[BR_count++] = br
 }
 
-function replace_requires()
-{
-
-       # jpackages
-       sub(/^java-devel$/, "jdk", $2);
-       sub(/^log4j$/, "logging-log4j", $2);
-       sub(/^jakarta-log4j$/, "logging-log4j", $2);
-       sub(/^oro$/, "jakarta-oro", $2);
-       sub(/^jakarta-ant$/, "ant", $2);
-       sub(/^xerces-j2$/, "xerces-j", $2);
-       sub(/^ldapjdk$/, "ldapsdk", $2);
-       sub(/^saxon-scripts$/, "saxon", $2);
-       sub(/^xalan-j2$/, "xalan-j", $2);
-       sub(/^xerces-j2$/, "xerces-j", $2);
-       sub(/^gnu-regexp$/, "gnu.regexp", $2);
-
-       # redhat virtual
-       sub(/^tftp-server$/, "tftpdaemon", $2);
-
-       sub(/^gcc-c\+\+$/, "libstdc++-devel", $2);
-       sub(/^chkconfig$/, "/sbin/chkconfig", $2);
-
-       # fedora
-       sub(/^iscsi-initiator-utils$/, "open-iscsi", $2);
-
-       replace_php_virtual_deps()
-}
-
-# php virtual deps as discussed in devel-en
-function replace_php_virtual_deps()
-{
-       pkg = $2
-#      if (pkg == "php-program") {
-#              $0 = $1 "\t/usr/bin/php"
-#              return
-#      }
-
-#      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)";
-               if ($4 ~ /^[0-9]:/) {
-                       $4 = substr($4, 3);
-               }
-       }
-
-       if (pkg ~/^php4$/) {
-               $2 = "webserver(php)";
-               if ($4 ~ /^[0-9]:/) {
-                       $4 = substr($4, 3);
-               }
-       }
-}
 
 # Load rpm macros
 # you should update the list also in adapter when making changes here
 function import_rpm_macros() {
        # File with rpm groups
-       sourcedir = ENVIRON["_sourcedir"]
+       topdir = ENVIRON["_topdir"]
 
-       if (!sourcedir) {
+       if (!topdir) {
                print "adapter.awk should not not be invoked directly, but via adapter script" > "/dev/stderr"
                do_not_touch_anything = 1
-               exit(1);
+               exit(rc = 1);
+       }
+
+       if (!ENVIRON["ADAPTER_REVISION"] || ENVIRON["ADAPTER_REVISION"] < 1.46) {
+               print "adapter shell script is outdated, please cvs up it" > "/dev/stderr"
+               do_not_touch_anything = 1
+               exit(rc = 1);
        }
 
        # get cvsaddress for changelog section
@@ -1781,6 +1848,8 @@ function import_rpm_macros() {
        desktopdir = ENVIRON["_desktopdir"]
        pixmapsdir = ENVIRON["_pixmapsdir"]
        javadir = ENVIRON["_javadir"]
+       pkgconfigdir = ENVIRON["_pkgconfigdir"]
+       npkgconfigdir = ENVIRON["_npkgconfigdir"]
 
        perl_sitearch = ENVIRON["perl_sitearch"]
        perl_archlib = ENVIRON["perl_archlib"]
@@ -1806,7 +1875,197 @@ function import_rpm_macros() {
        tmpdir = ENVIRON["tmpdir"]
 }
 
+
+# php virtual deps as discussed in devel-en
+function replace_php_virtual_deps() {
+       pkg = $2
+#      if (pkg == "php-program") {
+#              $0 = $1 "\t/usr/bin/php"
+#              return
+#      }
+
+#      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)";
+               if ($4 ~ /^[0-9]:/) {
+                       $4 = substr($4, 3);
+               }
+       }
+
+       if (pkg ~/^php4$/) {
+               $2 = "webserver(php)";
+               if ($4 ~ /^[0-9]:/) {
+                       $4 = substr($4, 3);
+               }
+       }
+}
+
+function replace_requires() {
+
+       sub(/^python-setuptools-devel$/, "python-distribute", $2);
+
+       # use virtual, not package name
+       sub(/^rpm-build-macros$/, "rpmbuild(macros)", $2);
+
+       # bad package.xml, see http://pear.php.net/bugs/bug.php?id=17779
+       sub(/^php-php-gtk/, "php-gtk2", $2);
+
+       # jpackages
+       sub(/^antlr3$/, "java-antlr3", $2);
+       sub(/^avalon-framework$/, "java-avalon-framework", $2);
+       sub(/^avalon-logkit$/, "java-avalon-logkit", $2);
+       sub(/^axis$/, "java-axis", $2);
+       sub(/^bsf$/, "java-bsf", $2);
+       sub(/^gnu-regexp$/, "java-gnu-regexp", $2);
+       sub(/^gnu.regexp$/, "java-gnu-regexp", $2);
+       sub(/^hamcrest$/, "java-hamcrest", $2);
+       sub(/^jaas$/, "java(jaas)", $2);
+       sub(/^jaf$/, "java(jaf)", $2);
+       sub(/^jakarta-ant$/, "ant", $2);
+       sub(/^jakarta-commons-httpclient$/, "java-commons-httpclient", $2);
+       sub(/^jakarta-log4j$/, "java-log4j", $2);
+       sub(/^jakarta-oro$/, "java-oro", $2);
+       sub(/^jakarta-servletapi$/, "java(servlet)", $2);
+       sub(/^java-devel$/, "jdk", $2);
+       sub(/^java\(JSP\)$/, "java(jsp)", $2);
+       sub(/^java\(JavaServerFaces\)$/, "java(javaserverfaces)", $2);
+       sub(/^java\(Portlet\)$/, "java(portlet)", $2);
+       sub(/^java\(Servlet\)$/, "java(servlet)", $2);
+       sub(/^javamail$/, "java(javamail)", $2);
+       sub(/^jaxp$/, "java(jaxp)", $2);
+       sub(/^jaxp_parser_impl$/, "java(jaxp_parser_impl)", $2);
+       sub(/^jaxp_transform_impl$/, "java(jaxp_transform_impl)", $2);
+       sub(/^jce$/, "java(jce)", $2);
+       sub(/^jcommon$/, "java-jcommon", $2);
+       sub(/^jdbc-stdext$/, "java(jdbc-stdext)", $2);
+       sub(/^jdepend$/, "java-jdepend", $2);
+       sub(/^jfreechart$/, "java-jfreechart", $2);
+       sub(/^jmx$/, "java(jmx)", $2);
+       sub(/^jndi$/, "java(jndi)", $2);
+       sub(/^jsch$/, "java-jsch", $2);
+       sub(/^jsse$/, "java(jsse)", $2);
+       sub(/^jta$/, "java(jta)", $2);
+       sub(/^junit$/, "java-junit", $2);
+       sub(/^ldapjdk$/, "ldapsdk", $2);
+       sub(/^log4j$/, "java-log4j", $2);
+       sub(/^logging-log4j$/, "java-log4j", $2);
+       sub(/^oro$/, "java-oro", $2);
+       sub(/^rhino$/, "java-rhino", $2);
+       sub(/^saxon-scripts$/, "saxon", $2);
+       sub(/^servlet$/, "java(servlet)", $2);
+       sub(/^uddi4j$/, "java-uddi4j", $2);
+       sub(/^wsdl4j$/, "java-wsdl4j", $2);
+       sub(/^xalan-j$/, "java-xalan", $2);
+       sub(/^xalan-j2$/, "java-xalan", $2);
+       sub(/^xerces-j$/, "java-xerces", $2);
+       sub(/^xerces-j2$/, "java-xerces", $2);
+       sub(/^xml-commons-apis$/, "java-xml-commons-apis", $2);
+       sub(/^xml-commons-resolver$/, "java-xml-commons-resolver", $2);
+
+       # fedora / redhat
+       sub(/^Django$/, "python-django", $2);
+       sub(/^GitPython$/, "python-git", $2);
+       sub(/^PyQt4-devel$/, "python-PyQt4-devel", $2);
+       sub(/^PyQwt-devel$/, "python-PyQwt-devel", $2);
+       sub(/^chkconfig$/, "/sbin/chkconfig", $2);
+       sub(/^db4-devel$/, "db-devel", $2);
+       sub(/^dbus-python$/, "python-dbus", $2);
+       sub(/^file-devel$/, "libmagic-devel", $2);
+       sub(/^freetype2-devel$/, "freetype-devel", $2);
+       sub(/^fuse-devel$/, "libfuse-devel", $2);
+       sub(/^gamin-python$/, "python-gamin", $2);
+       sub(/^gcc-c\+\+$/, "libstdc++-devel", $2);
+       sub(/^gnome-python2-extras$/, "python-gnome-extras", $2);
+       sub(/^gnome-python2-gtkspell$/, "python-gnome-extras-gtkspell", $2);
+       sub(/^gtk-sharp2-devel$/, "dotnet-gtk-sharp2-devel", $2);
+       sub(/^gtk2$/, "gtk+2", $2);
+       sub(/^gtk2-devel$/, "gtk+2-devel", $2);
+       sub(/^initscripts$/, "rc-scripts", $2);
+       sub(/^iproute$/, "iproute2", $2);
+       sub(/^iscsi-initiator-utils$/, "open-iscsi", $2);
+       sub(/^libXft-devel$/, "xorg-lib-libXft-devel", $2);
+       sub(/^libXrandr-devel$/, "xorg-lib-libXrandr-devel", $2);
+       sub(/^libcurl-devel$/, "curl-devel", $2);
+       sub(/^mod_wsgi$/, "apache-mod_wsgi", $2);
+       sub(/^notify-python$/, "python-pynotify", $2);
+       sub(/^pulseaudio-libs-devel$/, "pulseaudio-devel", $2);
+       sub(/^pyOpenSSL$/, "python-pyOpenSSL", $2);
+       sub(/^pygobject2$/, "python-pygobject", $2);
+       sub(/^pygtk2$/, "python-pygtk", $2);
+       sub(/^pygtk2-devel$/, "python-pygtk-devel", $2);
+       sub(/^python-enchant$/, "python-pyenchant", $2);
+       sub(/^python-imaging$/, "python-PIL", $2);
+       sub(/^python-imaging-tk$/, "python-PIL-tk", $2);
+       sub(/^python-pygtk$/, "python-pygtk-gtk", $2);
+       sub(/^python-twisted-core$/, "python-TwistedCore", $2);
+       sub(/^python-twisted-names$/, "python-TwistedNames", $2);
+       sub(/^python2-devel$/, "python-devel", $2);
+       sub(/^qt4-devel$/, "qt4-build", $2);
+       sub(/^qt4-webkit-devel$/, "QtWebKit-devel", $2);
+       sub(/^qtlockedfile-devel$/, "QtLockedFile-devel", $2);
+       sub(/^rpm-python$/, "python-rpm", $2);
+       sub(/^sip-devel$/, "python-sip-devel", $2);
+       sub(/^tftp-server$/, "tftpdaemon", $2);
+       sub(/^tkinter$/, "python-tkinter", $2);
+       sub(/^xapian-bindings-python$/, "python-xapian", $2);
+
+       # debian / ubuntu
+       sub(/^blkid-dev$/, "libblkid-devel", $2);
+       sub(/^ext2fs-dev$/, "e2fsprogs-devel", $2);
+       sub(/^libao-dev$/, "libao-devel", $2);
+       sub(/^libboost-filesystem[0-9.]+-dev$/, "boost-devel", $2);
+       sub(/^libboost-program-options[0-9.]+-dev$/, "boost-devel", $2);
+       sub(/^libboost-regex[0-9.]+-dev$/, "boost-devel", $2);
+       sub(/^libboost-thread[0-9.]+-dev$/, "boost-devel", $2);
+       sub(/^libcurl4-openssl-dev$/, "curl-devel", $2);
+       sub(/^libdnet-dev$/, "libdnet-devel", $2);
+       sub(/^libesd0-dev$/, "esound-devel", $2);
+       sub(/^libfishsound1-dev$/, "libfishsound-devel", $2);
+       sub(/^libgconf2-dev$/, "GConf2-devel", $2);
+       sub(/^libgl1-mesa-dev$/, "OpenGL-devel", $2);
+       sub(/^libgl1-mesa-dri$/, "OpenGL", $2);
+       sub(/^libglib2.0-dev$/, "glib2-devel", $2);
+       sub(/^libglu1-mesa-dev$/, "OpenGL-GLU-devel", $2);
+       sub(/^libgtk2.0-dev$/, "gtk+2-devel", $2);
+       sub(/^libhunspell-dev$/, "hunspell-devel", $2);
+       sub(/^libmcrypt-dev$/, "libmcrypt-devel", $2);
+       sub(/^libmhash-dev$/, "mhash-devel", $2);
+       sub(/^liboggz1-dev$/, "libggz-devel", $2);
+       sub(/^libpango1.0-dev$/, "pango-devel", $2);
+       sub(/^libqt4-dev$/, "qt4-build", $2);
+       sub(/^libshout3-dev$/, "libshout-devel", $2);
+       sub(/^libslp-dev$/, "openslp-devel", $2);
+       sub(/^libsndfile1-dev$/, "libsndfile-devel", $2);
+       sub(/^libspeex-dev$/, "speex-devel", $2);
+       sub(/^libssl-dev$/, "openssl-devel", $2);
+       sub(/^libvorbis-dev$/, "libvorbis-devel", $2);
+       sub(/^libxslt1-dev$/, "libxslt-devel", $2);
+       sub(/^libxss-dev$/, "xorg-lib-libXScrnSaver-devel", $2);
+       sub(/^mesa-common-dev$/, "OpenGL-devel", $2);
+
+       # altlinux
+       sub(/^libncurses-devel$/, "ncurses-devel", $2);
+       sub(/^libncursesxx-devel$/, "ncurses-c++-devel", $2);
+       sub(/^libpcre-devel$/, "pcre-devel", $2);
+
+       # suse
+       sub(/^libffmpeg-devel$/, "ffmpeg-devel", $2);
+       sub(/^libexpat-devel$/, "expat-devel", $2);
+       sub(/^alsa-devel$/, "alsa-lib-devel", $2);
+       sub(/^libpulse-devel$/, "pulseaudio-devel", $2);
+       sub(/^gtk-sharp2$/, "dotnet-gtk-sharp2", $2);
+       sub(/^monodoc-core$/, "mono-monodoc", $2);
+
+       replace_php_virtual_deps()
+}
+
 function replace_groupnames(group) {
+       group = replace(group, "Amusements/Games", "Applications/Games");
        group = replace(group, "Amusements/Games/Strategy/Real Time", "X11/Applications/Games/Strategy");
        group = replace(group, "Application/Multimedia", "Applications/Multimedia");
        group = replace(group, "Application/System", "Applications/System");
@@ -1815,12 +2074,15 @@ function replace_groupnames(group) {
        group = replace(group, "Applications/Internet", "Applications/Networking");
        group = replace(group, "Applications/Internet/Peer to Peer", "Applications/Networking");
        group = replace(group, "Applications/Productivity", "X11/Applications");
+       group = replace(group, "Applications/Security", "Applications/System");
+       group = replace(group, "Applications/Web", "Applications/WWW");
        group = replace(group, "Database", "Applications/Databases");
        group = replace(group, "Development/C", "Development/Libraries");
        group = replace(group, "Development/Code Generators", "Development");
        group = replace(group, "Development/Docs", "Documentation");
        group = replace(group, "Development/Documentation", "Documentation");
        group = replace(group, "Development/Java", "Development/Languages/Java");
+       group = replace(group, "Development/Languages/C and C++", "Libraries");
        group = replace(group, "Development/Languages/Other", "Development/Languages");;
        group = replace(group, "Development/Languages/Ruby", "Development/Languages");
        group = replace(group, "Development/Libraries/C and C++", "Development/Libraries");
@@ -1830,17 +2092,22 @@ function replace_groupnames(group) {
        group = replace(group, "Development/Other", "Development");
        group = replace(group, "Development/Python", "Development/Languages/Python");
        group = replace(group, "Development/Testing", "Development");
+       group = replace(group, "Editors", "Applications/Text");
        group = replace(group, "Emulators", "Applications/Emulators");
+       group = replace(group, "File tools", "Applications/File");
        group = replace(group, "Games", "Applications/Games");
        group = replace(group, "Library/Development", "Development/Libraries");
        group = replace(group, "Networking/Deamons", "Networking/Daemons");
+       group = replace(group, "Networking/Other", "Networking");
        group = replace(group, "Productivity/Databases/Servers", "Applications/Databases");
+       group = replace(group, "Productivity/Multimedia/Other", "X11/Applications/Multimedia");
        group = replace(group, "Productivity/Networking/Web/Servers", "Networking/Daemons/HTTP");;
        group = replace(group, "Shells", "Applications/Shells");
        group = replace(group, "System Environment/Base", "Base");
        group = replace(group, "System Environment/Daemons", "Daemons");
        group = replace(group, "System Environment/Kernel", "Base/Kernel");
        group = replace(group, "System Environment/Libraries", "Libraries");
+       group = replace(group, "System Tools", "Applications/System");
        group = replace(group, "System", "Base");
        group = replace(group, "System/Base", "Base");
        group = replace(group, "System/Kernel and hardware", "Base/Kernel");
@@ -1848,6 +2115,9 @@ function replace_groupnames(group) {
        group = replace(group, "System/Servers", "Daemons");
        group = replace(group, "Text Processing/Markup/HTML", "Applications/Text");
        group = replace(group, "Text Processing/Markup/XML", "Applications/Text");
+       group = replace(group, "Text tools", "Applications/Text");
+       group = replace(group, "User Interface/Desktops", "X11/Applications");
+       group = replace(group, "Utilities/System", "Applications/System");
        group = replace(group, "Web/Database", "Applications/WWW");
        group = replace(group, "X11/GNOME", "X11/Applications");
        group = replace(group, "X11/GNOME/Applications", "X11/Applications");
This page took 0.074207 seconds and 4 git commands to generate.