]> git.pld-linux.org Git - packages/rpm-build-tools.git/blobdiff - adapter.awk
- haskell hackage support
[packages/rpm-build-tools.git] / adapter.awk
index 61ce230d4ae908d37c6a66ca55bb78675581839e..adbe5ae4fe44e7f104b1d12795170621974f10f7 100644 (file)
@@ -2,7 +2,7 @@
 #
 # Adapter adapts .spec files for PLD Linux.
 #
-# Copyright (C) 1999-2010 PLD-Team <feedback@pld-linux.org>
+# Copyright (C) 1999-2013 PLD-Team <feedback@pld-linux.org>
 # Authors:
 #      Michał Kuratczyk <kura@pld.org.pl>
 #      Sebastian Zagrodzki <s.zagrodzki@mimuw.edu.pl>
@@ -12,7 +12,7 @@
 #      Jakub Bogusz <qboosh@pld-linux.org>
 #      Elan Ruusamäe <glen@pld-linux.org>
 #
-# See cvs log adapter{,.awk} for list of contributors
+# See git log adapter{,.awk} for list of contributors
 #
 # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
 
@@ -33,16 +33,14 @@ BEGIN {
        RPM_SECTIONS = "package|build|changelog|clean|description|install|post|posttrans|postun|pre|prep|pretrans|preun|triggerin|triggerpostun|triggerun|verifyscript|check"
        SECTIONS = "^%(" RPM_SECTIONS ")"
 
-       RCSID = "$Id$"
-       rev = RCSID # TODO: parse from RCSID
-       VERSION = "0.35/" rev
+       rev = "1.514"
+       VERSION = "0.36/" 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))"
 
        usedigest = 0   # Enable to switch to rpm 4.4.6+ md5 digests
 
        preamble = 1    # Is it part of preamble? Default - yes
-       boc = 4                 # Beginning of %changelog
        bod = 0                 # Beginning of %description
        tw = 70                 # Descriptions width
 
@@ -60,23 +58,9 @@ BEGIN {
        import_rpm_macros()
 
        packages_dir = topdir
-       groups_file = packages_dir "/rpm.groups"
+       groups_file = packages_dir "/../rpm-build-tools/rpm.groups"
 
-       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
-       changelog_file = ENVIRON["HOME"] "/tmp/adapter.changelog"
-}
-
-# There should be a comment with CVS keywords on the first line of file.
-FNR == 1 {
-       if (!/# \$Revision:/)   # If this line is already OK?
-               print "# $" "Revision:$, " "$" "Date:$" # No
-       else {
-               print $0                                # Yes
-               next            # It is enough for first line
-       }
 }
 
 # If the latest line matched /%files/
@@ -91,6 +75,12 @@ defattr == 1 {
        defattr = 0
 }
 
+# call mktemp(1) and return the value
+function mktemp(template, tmp) {
+   "mktemp " template | getline tmp
+   return tmp
+}
+
 function b_makekey(a, b,       s) {
        s = a "" b;
        # kill bcond
@@ -158,8 +148,9 @@ function b_makekey(a, b,    s) {
        if ($2 == "_applnkdir") {
                next
        }
+
+       # FIXME: this section will likely never match after cvs->git migration
        if ($2 == "date") {
-               date = 1
                if (did_files == 0) {
                        print "%files"
                        print ""
@@ -238,6 +229,20 @@ function b_makekey(a, b,   s) {
                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
@@ -338,6 +343,11 @@ function b_makekey(a, b,   s) {
        }
        sub("^%patch ", "%patch0 ");
 
+       # fedora extras
+       if (/^%apply/) {
+               sub("^%apply -n", "%patch");
+       }
+
        # invalid in %prep
        sub("^rm -rf \$RPM_BUILD_ROOT.*", "");
 }
@@ -400,7 +410,7 @@ function b_makekey(a, b,    s) {
        if (/CC=%{__cc} /) {
                sub("CC=%{__cc}", "CC=\"%{__cc}\"")
        }
-       
+
        # use PLD Linux macros
        $0 = fixedsub("glib-gettextize --copy --force","%{__glib_gettextize}", $0);
        $0 = fixedsub("intltoolize --copy --force", "%{__intltoolize}", $0);
@@ -512,65 +522,6 @@ function b_makekey(a, b,   s) {
        }
 }
 
-##############
-# %changelog #
-##############
-/^%changelog/, (!/^%changelog/ && $0 ~ SECTIONS) {
-       preamble = 0
-       has_changelog = 1
-       skip = 0
-       # There should be some CVS keywords on the first line of %changelog.
-       if (boc == 3) {
-               if ($0 !~ _cvsmailfeedback) {
-                       print "* %{date} " _cvsmailfeedback > changelog_file
-               } else {
-                       skip = 1
-               }
-               boc = 2
-       }
-       if (boc == 2 && !skip) {
-               if (!/All persons listed below/) {
-                       printf "All persons listed below can be reached at " > changelog_file
-                       print "<cvs_login>" _cvsmaildomain "\n" > changelog_file
-               } else {
-                       skip = 1
-               }
-               boc = 1
-       }
-       if (boc == 1 && !skip) {
-               if (!/^$/) {
-                       if (!/\$.*Log:.*\$/) {
-                               print "$" "Log:$" > changelog_file
-                       }
-                       boc = 0
-               }
-       }
-       # Define date macro.
-       if (boc == 4) {
-               if (date == 0) {
-                       printf "%%define date\t%%(echo `LC_ALL=\"C\"" > changelog_file
-                       print " date +\"%a %b %d %Y\"`)" > changelog_file
-                       date = 1
-               }
-               boc = 3
-       }
-
-       sub(/[ \t]+$/, "");
-       if (!/^%[a-z]+$/ || /changelog/) {
-               # stop changelog if "real" changelog starts
-               if (boc == 0 && /^\* /) {
-                       boc = -1
-               }
-               if (boc == -1) {
-                       next;
-               }
-               print > changelog_file
-       } else {
-               print
-       }
-       next
-}
-
 ###########
 # SCRIPTS #
 ###########
@@ -582,6 +533,19 @@ function b_makekey(a, b,   s) {
                sub(" >/dev/null 2>&1 \|\|:", "");
        }
 
+       # fedora extras macros
+       if (/%__fe_useradd/) {
+               sub("%__fe_useradd", "%useradd -u ");
+               sub(" 2> /dev/null \|\| :", "");
+               sub(" >/dev/null 2>&1 \|\|:", "");
+               sub(" &>/dev/null \\|\\| :", "");
+       }
+
+       if (/%__fe_groupadd/) {
+               sub("%__fe_groupadd", "%groupadd -g ");
+               sub(" &>/dev/null \\|\\| :", "");
+       }
+
        # %useradd and %groupadd may not be wrapped
        if (/%(useradd|groupadd).*\\$/) {
                a = $0; getline;
@@ -593,6 +557,20 @@ function b_makekey(a, b,   s) {
 
 /^%post/, (!/^%post/ && $0 ~ SECTIONS) {
        preamble = 0
+
+       # fedora extras macros
+       sub("%__chkconfig", "/sbin/chkconfig");
+
+       sub("update-desktop-database &> /dev/null \\|\\| :", "%update_desktop_database");
+       sub("touch --no-create %{_datadir}/icons/hicolor", "%update_icon_cache_post hicolor");
+       sub("if \\[ -x %{_bindir}/gtk-update-icon-cache \\]; then\n\t%{_bindir}/gtk-update-icon-cache -q %{_datadir}/icons/hicolor \|\| :\nfi", "");
+
+       sub("export GCONF_CONFIG_SOURCE=`gconftool-2 --get-default-source`", "")
+       if (/gconftool-2 --makefile-install-rule/) {
+               sub("gconftool-2 --makefile-install-rule %{_sysconfdir}/gconf/schemas/", "%gconf_schema_install ")
+               sub("> /dev/null", "");
+       }
+
        use_macros()
 }
 /^%preun/, (!/^%preun/ && $0 ~ SECTIONS) {
@@ -601,6 +579,14 @@ function b_makekey(a, b,   s) {
 }
 /^%postun/, (!/^%postun/ && $0 ~ SECTIONS) {
        preamble = 0
+
+       # fedora extras macros
+       if (/%__fe_userdel|%__fe_groupdel/) {
+               sub("%__fe_groupdel", "%groupremove");
+               sub("%__fe_userdel", "%userremove");
+               sub(" &>/dev/null \\|\\| :", "");
+       }
+
        use_script_macros()
 }
 /^%triggerin/, (!/^%triggerin/ && $0 ~ SECTIONS) {
@@ -646,22 +632,31 @@ preamble == 1 {
                release = "0." fixedsub(".%{disttag}.at", "", $4)
        }
 
+       # deprecated. currently just resolves to name in $2
+       if (/^%pyrequires_eq.+/) {
+               $1 = "Requires:";
+       }
+
+       # F<16 had requires(hint)
+       if (/^Requires\(hint\):/) {
+               $1 = "Suggests:";
+       }
+
        field = tolower($1)
        if (field ~ /summary:/ && !/etc\.$/ && !/Inc\.$/) {
                sub(/\.$/, "", $0);
        }
-       if (field ~ /group(\([^)]+\)):/)
+       if (field ~ /group(\([^)]+\)):/) {
                next
-       if (field ~ /group:/) {
+       }
+
+       if (field == "group:") {
                format_preamble()
                group = $0;
                sub(/^[^ \t]*[ \t]*/, "", group);
                group = replace_groupnames(group);
                $0 = "Group:\t\t" group
 
-               if (group ~ /^X11/ && x11 == 0) # Is it X11 application?
-                       x11 = 1
-
                byl_plik_z_groupmi = 0
                byl_opis_grupy = 0
                while ((getline linia_grup < groups_file) > 0) {
@@ -681,7 +676,7 @@ preamble == 1 {
                did_groups = 1
        }
 
-       if (field ~ /prereq:/) {
+       if (field == "prereq:") {
                sub(/Pre[Rr]eq:/, "Requires:", $1);
        }
 
@@ -692,7 +687,7 @@ preamble == 1 {
        }
 
        # BR: tar (and others) is to common (rpm-build requires it)
-       if (field ~ /^buildrequires:/) {
+       if (field == "buildrequires:") {
                l = substr($0, index($0, $2));
                if (l == "awk" ||
                        l == "binutils" ||
@@ -714,11 +709,11 @@ preamble == 1 {
                        next
                }
 
-               replace_requires();
+               replace_requires(field);
        }
 
-       if (field ~ /^requires:/ || field ~ /^requires\(/) {
-               replace_requires();
+       if (field == "requires:" || field ~ /^requires\(/) {
+               replace_requires(field);
        }
 
 
@@ -756,7 +751,13 @@ preamble == 1 {
                if (l == "Python Software Foundation License") {
                        l = "PSF"
                }
-               if (l == "Apache License 2.0" || l == "Apache 2.0" || l == "Apache License Version 2.0" || l == "Apache License, Version 2.0" || l == "Apache Software License v2") {
+               if (l == "Apache License 2.0" || \
+                          l == "Apache 2.0" || \
+                          l == "Apache License Version 2.0" || \
+                          l == "Apache License, Version 2.0" || \
+                          l == "Apache Software License v2" || \
+                          l == "ASL 2.0" \
+                       ) {
                        l = "Apache v2.0"
                }
                if (l == "Apache Group License" || l == "Apache Software License" || l == "Apache License") {
@@ -1020,36 +1021,11 @@ END {
                }
        }
 
-       close(changelog_file)
-       while ((getline < changelog_file) > 0)
-               print
-       system("rm -f " changelog_file)
-
        if (did_clean == 0) {
                print ""
                print "%clean"
                print "rm -rf $RPM_BUILD_ROOT"
        }
-
-       if (date == 0) {
-               print ""
-               print "%define date\t%(echo `LC_ALL=\"C\" date +\"%a %b %d %Y\"`)"
-       }
-
-       if (has_changelog == 0) {
-               print "%changelog"
-       }
-
-       if (boc > 2) {
-               print "* %{date} PLD Team <feedback@pld-linux.org>"
-       }
-       if (boc > 1) {
-               printf "All persons listed below can be reached at "
-               print "<cvs_login>@pld-linux.org\n"
-       }
-       if (boc > 0) {
-               print "$" "Log:$"
-       }
 }
 
 # substitutes fixed strings (not regexps)
@@ -1098,6 +1074,7 @@ function use_macros()
        }
 
        sub("%{_defaultdocdir}", "%{_docdir}");
+       sub("%{_datadir}/doc", "%{_docdir}");
        sub("%{_bindir}/perl", "%{__perl}");
        sub("%{_bindir}/python", "%{__python}");
 
@@ -1109,18 +1086,33 @@ function use_macros()
        gsub(perl_vendorlib, "%{perl_vendorlib}")
        gsub(perl_vendorarch, "%{perl_vendorarch}")
        gsub(perl_sitelib, "%{perl_sitelib}")
-       
+
        gsub(py_sitescriptdir, "%{py_sitescriptdir}")
        gsub(py_sitedir, "%{py_sitedir}")
        gsub(py_scriptdir, "%{py_scriptdir}")
-       gsub("%{_libdir}/python2.4/site-packages", "%{py_sitedir}")
+
+       gsub(py3_sitescriptdir, "%{py3_sitescriptdir}")
+       gsub(py3_sitedir, "%{py3_sitedir}")
+       gsub(py3_scriptdir, "%{py3_scriptdir}")
+       gsub("%{python3_sitelib}", "%{py3_sitescriptdir}")
+       gsub("%{python3_version}", "%{py3_ver}")
 
        gsub(ruby_archdir, "%{ruby_archdir}")
-       gsub(ruby_ridir, "%{ruby_ridir}")
-       gsub(ruby_rubylibdir, "%{ruby_rubylibdir}")
+       gsub(ruby_libdir, "%{ruby_libdir}")
+
        gsub(ruby_sitearchdir, "%{ruby_sitearchdir}")
        gsub(ruby_sitelibdir, "%{ruby_sitelibdir}")
+       gsub(ruby_sitedir, "%{ruby_sitedir}")
+       gsub(ruby_vendorarchdir, "%{ruby_vendorarchdir}")
+       gsub(ruby_vendorlibdir, "%{ruby_vendorlibdir}")
+       gsub(ruby_vendordir, "%{ruby_vendordir}")
+       gsub(ruby_rubylibdir, "%{ruby_rubylibdir}") # deprecated
        gsub(ruby_rdocdir, "%{ruby_rdocdir}")
+       gsub(ruby_ridir, "%{ruby_ridir}")
+
+       gsub("%{_unitdir}", "%{systemdunitdir}")
+       gsub(systemdunitdir, "%{systemdunitdir}")
+       gsub(systemdtmpfilesdir, "%{systemdtmpfilesdir}")
 
        gsub("%{_datadir}/applications", "%{_desktopdir}")
        gsub("%{_datadir}/pixmaps", "%{_pixmapsdir}")
@@ -1132,6 +1124,9 @@ function use_macros()
        gsub("%{_datadir}/pkgconfig", "%{_npkgconfigdir}")
        gsub(npkgconfigdir, "%{_npkgconfigdir}")
 
+       gsub("%{_datadir}/locale", "%{_localedir}")
+       gsub(localedir, "%{_localedir}")
+
        gsub(libdir, "%{_libdir}")
        gsub(javadir, "%{_javadir}")
 
@@ -1204,8 +1199,14 @@ function use_macros()
                        continue;
                if ($c ~ sysconfdir "/{?samba")
                        continue;
+               if ($c ~ sysconfdir "/{?xdg")
+                       continue;
                if ($c ~ sysconfdir "/shells")
                        continue;
+               if ($c ~ sysconfdir "/inittab")
+                       continue;
+               if ($c ~ sysconfdir "/init")
+                       continue;
                if ($c ~ sysconfdir "/ppp")
                        continue;
                if ($c ~ sysconfdir "/dbus-1")
@@ -1216,6 +1217,8 @@ function use_macros()
                        continue;
                if ($c ~ sysconfdir "/apm")
                        continue;
+               if ($c ~ sysconfdir "/modules-load\.d")
+                       continue;
                gsub(sysconfdir, "%{_sysconfdir}", $c)
        }
 
@@ -1347,7 +1350,9 @@ function use_macros()
        $0 = fixedsub("%__install", "install", $0);
 
        # split configure line to multiple lines
-       if (/%configure / && !/\\$/) {
+       if (/%configure +$/) {
+               sub( / +$/, "" );
+       } else if (/%configure / && !/\\$/) {
                $0 = format_configure($0);
        }
 
@@ -1377,6 +1382,14 @@ 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) {
@@ -1547,13 +1560,10 @@ function use_files_macros(      i, n, t, a, l)
                t = substr($0, 0, l);
                s = substr($0, l + 1, RLENGTH - l - length("-py"py_ver".egg-info"));
                if (match(s, "[^-]+$")) {
-#printf("s[%s]; start[%d]; length[%d]\n", s, RSTART, RLENGTH);
                        if (RSTART > 1) {
                                s = substr(s, 0, RSTART - 1);
                        }
-#printf("s2[%s]\n", s);
                        print "%if \"%{py_ver}\" > \"2.4\""
-#print t "/.+.egg-info"
                        gsub(t "/.+.egg-info", t "/" s "-*.egg-info");
                        print
                        print "%endif"
@@ -1636,11 +1646,20 @@ function cflags(var)
        return 1
 }
 
+# return whole matched pattern
+function matchstr(str, pat)
+{
+       match(str, "[^/]+$");
+       return substr(str, RSTART, RLENGTH);
+}
+
 function unify_url(url)
 {
 
        # sourceforge urls
        # Docs about sourceforge mirror system: http://sourceforge.net/apps/trac/sourceforge/wiki/Mirrors
+
+       # 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)
@@ -1648,11 +1667,8 @@ function unify_url(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)
-       # 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);
@@ -1661,6 +1677,18 @@ function unify_url(url)
                sub("/download$", "", url);
        }
 
+       # SF: 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);
+       }
+
+       # SF unify: http://downloads.sourceforge.net/PROJECT/TARBALL
+       # http://downloads.sourceforge.net/project/PROJECT/FILE/VERSION/%{name}-%{version}.zip
+       if (match(url, "^http://downloads.sourceforge.net/project/[^/]+")) {
+               url = sprintf("http://downloads.sourceforge.net/%s/%s", substr(url, 42, RLENGTH - 41), matchstr(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)
 
@@ -1725,6 +1753,16 @@ function kill_preamble_macros()
                $2 = demacroize($2);
                $2 = unify_url($2)
        }
+
+       # fedora extras
+       if (/%{\?FE_USERADD_REQ}/) {
+               $0 = "";
+               print "BuildRequires:   rpmbuild(macros) >= 1.202"
+               print "Provides:        user(xxx)"
+               print "Requires(postun):        /usr/sbin/userdel"
+               print "Requires(pre):  /bin/id"
+               print "Requires(pre):  /usr/sbin/useradd"
+       }
 }
 
 function get_epoch(pkg, ver,   epoch)
@@ -1778,10 +1816,9 @@ function add_br(br)
        BR[BR_count++] = br
 }
 
-
 # Load rpm macros
 # you should update the list also in adapter when making changes here
-function import_rpm_macros() {
+function import_rpm_macros(  v) {
        # File with rpm groups
        topdir = ENVIRON["_topdir"]
 
@@ -1791,17 +1828,14 @@ function import_rpm_macros() {
                exit(rc = 1);
        }
 
-       if (!ENVIRON["ADAPTER_REVISION"] || ENVIRON["ADAPTER_REVISION"] < 1.46) {
-               print "adapter shell script is outdated, please cvs up it" > "/dev/stderr"
+       # update this version dep each time some new macro export is added
+       v = 1.49
+       if (!ENVIRON["ADAPTER_REVISION"] || ENVIRON["ADAPTER_REVISION"] < v) {
+               printf("adapter shell script is outdated: Need %s, got %s. Please update it.\n", v, ENVIRON["ADAPTER_REVISION"]) > "/dev/stderr"
                do_not_touch_anything = 1
                exit(rc = 1);
        }
 
-       # get cvsaddress for changelog section
-       # using rpm macros as too lazy to add ~/.adapterrc parsing support.
-       _cvsmaildomain = ENVIRON["_cvsmaildomain"]
-       _cvsmailfeedback = ENVIRON["_cvsmailfeedback"]
-
        prefix = ENVIRON["_prefix"]
        bindir = ENVIRON["_bindir"]
        sbindir = ENVIRON["_sbindir"]
@@ -1820,6 +1854,7 @@ function import_rpm_macros() {
        javadir = ENVIRON["_javadir"]
        pkgconfigdir = ENVIRON["_pkgconfigdir"]
        npkgconfigdir = ENVIRON["_npkgconfigdir"]
+       localedir = ENVIRON["_localedir"]
 
        perl_sitearch = ENVIRON["perl_sitearch"]
        perl_archlib = ENVIRON["perl_archlib"]
@@ -1833,41 +1868,55 @@ function import_rpm_macros() {
        py_scriptdir = ENVIRON["py_scriptdir"]
        py_ver = ENVIRON["py_ver"]
 
+       py3_sitescriptdir = ENVIRON["py3_sitescriptdir"]
+       py3_sitedir = ENVIRON["py3_sitedir"]
+       py3_scriptdir = ENVIRON["py3_scriptdir"]
+       py3_ver = ENVIRON["py3_ver"]
+
        ruby_archdir = ENVIRON["ruby_archdir"]
-       ruby_ridir = ENVIRON["ruby_ridir"]
-       ruby_rubylibdir = ENVIRON["ruby_rubylibdir"]
+       ruby_libdir = ENVIRON["ruby_libdir"]
+       ruby_sitedir = ENVIRON["ruby_sitedir"]
        ruby_sitearchdir = ENVIRON["ruby_sitearchdir"]
        ruby_sitelibdir = ENVIRON["ruby_sitelibdir"]
+       ruby_vendordir = ENVIRON["ruby_vendordir"]
+       ruby_vendorarchdir = ENVIRON["ruby_vendorarchdir"]
+       ruby_vendorlibdir = ENVIRON["ruby_vendorlibdir"]
+       ruby_rubylibdir = ENVIRON["ruby_rubylibdir"] # deprecated
        ruby_rdocdir = ENVIRON["ruby_rdocdir"]
+       ruby_ridir = ENVIRON["ruby_ridir"]
 
        php_pear_dir = ENVIRON["php_pear_dir"]
        php_data_dir = ENVIRON["php_data_dir"]
        tmpdir = ENVIRON["tmpdir"]
-}
 
+       systemdunitdir = ENVIRON["systemdunitdir"]
+       systemdtmpfilesdir = ENVIRON["systemdtmpfilesdir"]
+}
 
 # php virtual deps as discussed in devel-en
-function replace_php_virtual_deps() {
+function replace_php_virtual_deps(field) {
        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 (field == "requires:") {
+               if (pkg ~ /^php-(bcmath|bz2|calendar|ctype|curl|dba|date|dom|enchant|exif|fileinfo|filter|fpm|ftp|gd|gettext|gmp|hash|iconv|imap|interbase|intl|json|ldap|mbstring|mcrypt|mssql|mysql|mysqli|odbc|openssl|pcntl|pcre|pdo|pdo-dblib|pdo-firebird|pdo-mysql|pdo-odbc|pdo-pgsql|pdo-sqlite|pgsql|phar|posix|pspell|readline|recode|session|shmop|simplexml|snmp|soap|sockets|spl|sqlite|sqlite3|sybase-ct|sysvmsg|sysvsem|sysvshm|tidy|tokenizer|wddx|xml|xmlreader|xmlrpc|xmlwriter|xsl|zip|zlib)/) {
+                       sub(/^php-/, "php(", pkg);
+                       sub(/$/, ")", pkg);
+                       $2 = pkg
+               }
+       }
 
-       if (pkg ~/^php$/) {
-               $2 = "webserver(php)";
+       if (pkg == "php" || pkg == "php-common") {
+               $2 = "php(core)";
                if ($4 ~ /^[0-9]:/) {
                        $4 = substr($4, 3);
                }
        }
 
-       if (pkg ~/^php4$/) {
+       if (pkg == "php4") {
                $2 = "webserver(php)";
                if ($4 ~ /^[0-9]:/) {
                        $4 = substr($4, 3);
@@ -1875,9 +1924,129 @@ function replace_php_virtual_deps() {
        }
 }
 
-function replace_requires() {
+# {{{ replace_groupnames(group)
+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");
+       group = replace(group, "Applications/Compilers", "Development/Languages");
+       group = replace(group, "Applications/Daemons", "Daemons");
+       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");
+       group = replace(group, "Development/Libraries/Java", "Development/Languages/Java");
+       group = replace(group, "Development/Libraries/Python", "Development/Languages/Python");
+       group = replace(group, "Development/Libraries/TCL", "Development/Languages/Tcl");;
+       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/Mail", "Applications/Mail");
+       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, "Python/Libraries", "Libraries/Python");
+       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");
+       group = replace(group, "System/Libraries", "Libraries");
+       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, "User Interface/X", "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");
+       group = replace(group, "X11/GNOME/Development/Libraries", "X11/Development/Libraries");
+       group = replace(group, "X11/Games", "X11/Applications/Games");
+       group = replace(group, "X11/Games/Strategy", "X11/Applications/Games/Strategy");
+       group = replace(group, "X11/Library", "X11/Libraries");
+       group = replace(group, "X11/Utilities", "X11/Applications");
+       group = replace(group, "X11/XFree86", "X11");
+       group = replace(group, "X11/Xserver", "X11/Servers");
+
+       return group;
+}
+# }}}
+
+# {{{ replace_pkgconfig(pkg)
+function replace_pkgconfig(pkg,    cmd, path, n, i, line) {
+       n = split("/usr/lib64/pkgconfig /usr/lib/pkgconfig /usr/share/pkgconfig", path, / /);
+       for (i = 1; i <= n; i++) {
+               cmd = "rpm -qf --qf '%{N}' " path[i] "/" pkg ".pc";
+               # Getline returns 0 on end-of-file, -1 on error, otherwise 1.
+               if ((cmd | getline line) <= 0) {
+                       continue;
+               }
+
+               if (line !~ /No such file or directory/) {
+                       # @modifies global $2
+                       $2 = line;
+                       return
+               }
+       }
+}
+# }}}
+
+# {{{ replace_pythonegg(pkg)
+function replace_pythonegg(pkg,    cmd, line) {
+       cmd = "rpm -q --qf '%{N}' --whatprovides 'pythonegg(" pkg ")'";
+       # Getline returns 0 on end-of-file, -1 on error, otherwise 1.
+       if ((cmd | getline line) <= 0) {
+               return;
+       }
+
+       if (line !~ /no package provides/) {
+               # @modifies global $2
+               $2 = line;
+               return;
+       }
+}
+# }}}
+
+function replace_requires(field,   pkg) {
+       # pkg-config -> package names
+       if (match($2, /pkgconfig\(([^)]+)\)/)) {
+               pkg = substr($2, RSTART + 10, RLENGTH - 11);
+               replace_pkgconfig(pkg);
+       }
+
+       # pythonegg -> package names
+       if (match($2, /pythonegg\(([^)]+)\)/)) {
+               pkg = substr($2, RSTART + 10, RLENGTH - 11);
+               replace_pythonegg(pkg);
+       }
 
        sub(/^python-setuptools-devel$/, "python-distribute", $2);
+       sub(/^gcc-g77/, "gcc-fortran", $2);
 
        # use virtual, not package name
        sub(/^rpm-build-macros$/, "rpmbuild(macros)", $2);
@@ -1885,19 +2054,29 @@ function replace_requires() {
        # bad package.xml, see http://pear.php.net/bugs/bug.php?id=17779
        sub(/^php-php-gtk/, "php-gtk2", $2);
 
-       # jpackages
+       # {{{ jpackages / fedora java packages
        sub(/^antlr3$/, "java-antlr3", $2);
+       sub(/^aqute-bnd$/, "java-bnd", $2);
        sub(/^avalon-framework$/, "java-avalon-framework", $2);
        sub(/^avalon-logkit$/, "java-avalon-logkit", $2);
        sub(/^axis$/, "java-axis", $2);
+       sub(/^bouncycastle$/, "java-bcprov", $2);
+       sub(/^bouncycastle-mail$/, "java-bcmail", $2);
+       sub(/^bouncycastle-pg$/, "java-bcpg", $2);
+       sub(/^bouncycastle-tsp$/, "java-bctsp", $2);
        sub(/^bsf$/, "java-bsf", $2);
+       sub(/^dom4j$/, "java-dom4j", $2);
+       sub(/^flute$/, "java-flute", $2);
        sub(/^gnu-regexp$/, "java-gnu-regexp", $2);
        sub(/^gnu.regexp$/, "java-gnu-regexp", $2);
        sub(/^hamcrest$/, "java-hamcrest", $2);
+       sub(/^itext$/, "java-itext", $2);
        sub(/^jaas$/, "java(jaas)", $2);
        sub(/^jaf$/, "java(jaf)", $2);
        sub(/^jakarta-ant$/, "ant", $2);
+       sub(/^jakarta-commons-codec$/, "java-commons-codec", $2);
        sub(/^jakarta-commons-httpclient$/, "java-commons-httpclient", $2);
+       sub(/^jakarta-commons-logging$/, "java-commons-logging", $2);
        sub(/^jakarta-log4j$/, "java-log4j", $2);
        sub(/^jakarta-oro$/, "java-oro", $2);
        sub(/^jakarta-servletapi$/, "java(servlet)", $2);
@@ -1921,62 +2100,161 @@ function replace_requires() {
        sub(/^jsse$/, "java(jsse)", $2);
        sub(/^jta$/, "java(jta)", $2);
        sub(/^junit$/, "java-junit", $2);
+       sub(/^junit4$/, "java-junit", $2);
        sub(/^ldapjdk$/, "ldapsdk", $2);
+       sub(/^libbase$/, "java-libbase", $2);
+       sub(/^libfonts$/, "java-libfonts", $2);
+       sub(/^libformula$/, "java-libformula", $2);
+       sub(/^liblayout$/, "java-liblayout", $2);
+       sub(/^libloader$/, "java-libloader", $2);
+       sub(/^librepository$/, "java-librepository", $2);
+       sub(/^libserializer$/, "java-libserializer", $2);
        sub(/^log4j$/, "java-log4j", $2);
        sub(/^logging-log4j$/, "java-log4j", $2);
        sub(/^oro$/, "java-oro", $2);
+       sub(/^pdf-renderer$/, "java-pdf-renderer", $2);
+       sub(/^pentaho-libxml$/, "java-libxml", $2);
        sub(/^rhino$/, "java-rhino", $2);
+       sub(/^sac$/, "java-sac", $2);
        sub(/^saxon-scripts$/, "saxon", $2);
        sub(/^servlet$/, "java(servlet)", $2);
        sub(/^uddi4j$/, "java-uddi4j", $2);
+       sub(/^ws-jaxme$/, "java-jaxme", $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-apis$/, "java-xml-commons", $2);
        sub(/^xml-commons-resolver$/, "java-xml-commons-resolver", $2);
+       sub(/^xmldb-api$/, "java-xmldb", $2);
+       sub(/^xmldb-api-sdk$/, "java-xmldb-sdk", $2);
+       # }}}
 
-       # fedora / redhat
+       # {{{ fedora / redhat
        sub(/^Django$/, "python-django", $2);
        sub(/^GitPython$/, "python-git", $2);
+       sub(/^MySQL-python$/, "python-MySQLdb", $2);
+       sub(/^NetworkManager-glib-devel$/, "NetworkManager-devel", $2);
+       sub(/^PyQt4-devel$/, "python-PyQt4-devel", $2);
+       sub(/^PyQwt-devel$/, "python-PyQwt-devel", $2);
+       sub(/^PyYAML$/, "python-PyYAML", $2);
+       sub(/^ccid$/, "pcsc-driver-ccid", $2);
        sub(/^chkconfig$/, "/sbin/chkconfig", $2);
        sub(/^db4-devel$/, "db-devel", $2);
        sub(/^dbus-python$/, "python-dbus", $2);
+       sub(/^desktop-notification-daemon$/, "dbus(org.freedesktop.Notifications)", $2);
+       sub(/^device-mapper-multipath$/, "multipath-tools", $2);
+       sub(/^django-tagging$/, "python-django_tagging", $2);
+       sub(/^elfutils-libelf-devel$/, "elfutils-devel", $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-desktop3-devel$/, "gnome-desktop-devel", $2);
        sub(/^gnome-python2-extras$/, "python-gnome-extras", $2);
+       sub(/^gnome-python2-gconf$/, "python-gnome-gconf", $2);
+       sub(/^gnome-python2-gnomekeyring$/, "python-gnome-desktop-keyring", $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(/^gtk3$/, "gtk+3", $2);
+       sub(/^gtk3-devel$/, "gtk+3-devel", $2);
        sub(/^initscripts$/, "rc-scripts", $2);
        sub(/^iproute$/, "iproute2", $2);
        sub(/^iscsi-initiator-utils$/, "open-iscsi", $2);
+       sub(/^keyutils-libs-devel$/, "keyutils-devel", $2);
+       sub(/^libSM-devel$/, "xorg-lib-libSM-devel", $2);
+       sub(/^libX11-devel$/, "xorg-lib-libX11-devel", $2);
+       sub(/^libXScrnSaver-devel$/, "xorg-lib-libXScrnSaver-devel", $2);
+       sub(/^libXau-devel$/, "xorg-lib-libXau-devel", $2);
+       sub(/^libXcomposite-devel$/, "xorg-lib-libXcomposite-devel", $2);
+       sub(/^libXcursor-devel$/, "xorg-lib-libXcursor-devel", $2);
+       sub(/^libXdamage-devel$/, "xorg-lib-libXdamage-devel", $2);
+       sub(/^libXext-devel$/, "xorg-lib-libXext-devel", $2);
        sub(/^libXft-devel$/, "xorg-lib-libXft-devel", $2);
+       sub(/^libXinerama-devel$/, "xorg-lib-libXinerama-devel", $2);
        sub(/^libXrandr-devel$/, "xorg-lib-libXrandr-devel", $2);
+       sub(/^libXrender-devel$/, "xorg-lib-libXrender-devel", $2);
+       sub(/^libXt-devel$/, "xorg-lib-libXt-devel", $2);
+       sub(/^libXtst-devel$/, "xorg-lib-libXtst-devel", $2);
+       sub(/^libXv-devel$/, "xorg-lib-libXv-devel", $2);
+       sub(/^libXxf86misc-devel$/, "xorg-lib-libXxf86misc-devel", $2);
+       sub(/^libXxf86vm-devel$/, "xorg-lib-libXxf86vm-devel", $2);
+       sub(/^libacl-devel$/, "acl-devel", $2);
        sub(/^libcurl-devel$/, "curl-devel", $2);
+       sub(/^libgudev1-devel$/, "udev-glib-devel", $2);
+       sub(/^libmx-devel$/, "mx-devel", $2);
+       sub(/^libselinux-python$/, "python-selinux", $2);
+       sub(/^libsrtp-devel$/, "srtp-devel", $2);
+       sub(/^libtdb$/, "tdb", $2);
+       sub(/^libtdb-devel$/, "tdb-devel", $2);
+       sub(/^libtevent$/, "tevent", $2);
+       sub(/^libtevent-devel$/, "tevent-devel", $2);
+       sub(/^libusb1-devel$/, "libusb-devel", $2);
+       sub(/^libuser-python$/, "python-libuser", $2);
+       sub(/^libxkbfile-devel$/, "xorg-lib-libxkbfile", $2);
        sub(/^mod_wsgi$/, "apache-mod_wsgi", $2);
+       sub(/^newt-python$/, "python-snack", $2);
        sub(/^notify-python$/, "python-pynotify", $2);
+       sub(/^pcsc-lite-ccid$/, "pcsc-driver-ccid", $2);
+       sub(/^pulseaudio-libs-devel$/, "pulseaudio-devel", $2);
        sub(/^pyOpenSSL$/, "python-pyOpenSSL", $2);
+       sub(/^pycairo$/, "python-pycairo", $2);
+       sub(/^pyflakes$/, "python-pyflakes", $2);
        sub(/^pygobject2$/, "python-pygobject", $2);
+       sub(/^pygobject3$/, "python-pygobject3", $2);
+       sub(/^pygobject3-devel$/, "python-pygobject3-common-devel", $2);
        sub(/^pygtk2$/, "python-pygtk", $2);
        sub(/^pygtk2-devel$/, "python-pygtk-devel", $2);
+       sub(/^pygtk2-libglade$/, "python-pygtk-glade", $2);
+       sub(/^pykickstart$/, "python-pykickstart", $2);
+       sub(/^pyparsing$/, "python-pyparsing", $2);
+       sub(/^pyparted$/, "python-parted", $2);
+       sub(/^pysvn$/, "python-pysvn", $2);
+       sub(/^pytalloc$/, "python-talloc", $2);
+       sub(/^pytalloc-devel$/, "python-talloc-devel", $2);
+       sub(/^pytest$/, "python-pytest", $2);
+       sub(/^python-cups$/, "python-pycups", $2);
        sub(/^python-enchant$/, "python-pyenchant", $2);
        sub(/^python-imaging$/, "python-PIL", $2);
        sub(/^python-imaging-tk$/, "python-PIL-tk", $2);
+       sub(/^python-newt$/, "python-snack", $2);
        sub(/^python-pygtk$/, "python-pygtk-gtk", $2);
+       sub(/^python-recaptcha-client$/, "python-recaptcha", $2);
+       sub(/^python-twisted-core$/, "python-TwistedCore", $2);
+       sub(/^python-twisted-core$/, "python-TwistedCore", $2);
+       sub(/^python-twisted-names$/, "python-TwistedNames", $2);
        sub(/^python2-devel$/, "python-devel", $2);
+       sub(/^pytz$/, "python-pytz", $2);
+       sub(/^pyxdg$/, "python-pyxdg", $2);
        sub(/^qt4-devel$/, "qt4-build", $2);
+       sub(/^qt4-webkit-devel$/, "QtWebKit-devel", $2);
        sub(/^qtlockedfile-devel$/, "QtLockedFile-devel", $2);
+       sub(/^qtsingleapplication-devel$/, "QtSingleApplication-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(/^urw-fonts$/, "fonts-Type1-urw", $2);
+       sub(/^webkitgtk3-devel$/, "gtk-webkit3-devel", $2);
        sub(/^xapian-bindings-python$/, "python-xapian", $2);
-
-       # debian / ubuntu
+       sub(/^xorg-x11-server-sdk$/, "xorg-xserver-server-devel", $2);
+       # }}}
+
+       # {{{ mandriva
+       sub(/^python-gobject-devel$/, "python-pygobject-devel", $2);
+       sub(/^python-pyrex$/, "python-Pyrex", $2);
+       sub(/^webkitgtk-devel$/, "gtk-webkit-devel", $2);
+       sub(/^python-curl$/, "python-pycurl", $2);
+       sub(/^python-webkitgtk$/, "python-pywebkitgtk", $2);
+       sub(/^pygtk2.0$/, "python-pygtk-gtk", $2);
+       sub(/^gnome-python-gconf$/, "python-gnome-gconf", $2);
+       # }}}
+
+       # {{{ debian / ubuntu
        sub(/^blkid-dev$/, "libblkid-devel", $2);
        sub(/^ext2fs-dev$/, "e2fsprogs-devel", $2);
        sub(/^libao-dev$/, "libao-devel", $2);
@@ -2009,87 +2287,41 @@ function replace_requires() {
        sub(/^libxslt1-dev$/, "libxslt-devel", $2);
        sub(/^libxss-dev$/, "xorg-lib-libXScrnSaver-devel", $2);
        sub(/^mesa-common-dev$/, "OpenGL-devel", $2);
-
-       # altlinux
+       sub(/^libudev$/, "udev-libs", $2);
+       sub(/^tcp_wrappers-devel$/, "libwrap-devel", $2);
+       sub(/^vala-tools$/, "vala", $2);
+       sub(/^vala-devel$/, "vala", $2);
+       # }}}
+
+       # {{{ altlinux
+       sub(/^libatk-devel$/, "atk-devel", $2);
+       sub(/^libgit-devel$/, "git-core-devel", $2);
+       sub(/^libgtk\+2-devel$/, "gtk+2-devel", $2);
        sub(/^libncurses-devel$/, "ncurses-devel", $2);
        sub(/^libncursesxx-devel$/, "ncurses-c++-devel", $2);
+       sub(/^libpango-devel$/, "pango-devel", $2);
        sub(/^libpcre-devel$/, "pcre-devel", $2);
+       sub(/^libpopt-devel$/, "popt-devel", $2);
+       sub(/^libssl-devel$/, "openssl-devel", $2);
+       # }}}
 
-       # suse
-       sub(/^libffmpeg-devel$/, "ffmpeg-devel", $2);
-       sub(/^libexpat-devel$/, "expat-devel", $2);
+       # {{{ suse/opensuse
        sub(/^alsa-devel$/, "alsa-lib-devel", $2);
-       sub(/^libpulse-devel$/, "pulseaudio-devel", $2);
        sub(/^gtk-sharp2$/, "dotnet-gtk-sharp2", $2);
+       sub(/^gtkmm2-devel$/, "gtkmm-devel", $2);
+       sub(/^libexpat-devel$/, "expat-devel", $2);
+       sub(/^libffmpeg-devel$/, "ffmpeg-devel", $2);
+       sub(/^libopenssl-devel$/, "openssl-devel", $2);
+       sub(/^libpulse-devel$/, "pulseaudio-devel", $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");
-       group = replace(group, "Applications/Compilers", "Development/Languages");
-       group = replace(group, "Applications/Daemons", "Daemons");
-       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/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");
-       group = replace(group, "Development/Libraries/Java", "Development/Languages/Java");
-       group = replace(group, "Development/Libraries/Python", "Development/Languages/Python");
-       group = replace(group, "Development/Libraries/TCL", "Development/Languages/Tcl");;
-       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, "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");
-       group = replace(group, "System/Libraries", "Libraries");
-       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");
-       group = replace(group, "X11/GNOME/Development/Libraries", "X11/Development/Libraries");
-       group = replace(group, "X11/Games", "X11/Applications/Games");
-       group = replace(group, "X11/Games/Strategy", "X11/Applications/Games/Strategy");
-       group = replace(group, "X11/Library", "X11/Libraries");
-       group = replace(group, "X11/Utilities", "X11/Applications");
-       group = replace(group, "X11/XFree86", "X11");
-       group = replace(group, "X11/Xserver", "X11/Servers");
-
-       return group;
+       sub(/^python-cairo$/, "python-pycairo", $2);
+       sub(/^python-gobject$/, "python-pygobject", $2);
+       sub(/^python-gstreamer-0_10$/, "python-gstreamer", $2);
+       sub(/^python-gtk$/, "python-pygtk-gtk", $2);
+       sub(/^python-xdg$/, "python-pyxdg", $2);
+       # }}}
+
+       replace_php_virtual_deps(field)
 }
 
-# vim:ts=4:sw=4
+# vim:ts=4:sw=4 fdm=marker
This page took 0.07325 seconds and 4 git commands to generate.