]> git.pld-linux.org Git - packages/adapter.git/blobdiff - adapter.awk
subst docdir, convert requires(hint)
[packages/adapter.git] / adapter.awk
index ab95e4c86689988aa96f7f08de0257b9d8bdde24..901099c65ea22f58d301847b91285ef2e4457447 100644 (file)
@@ -632,6 +632,16 @@ 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);
@@ -1058,6 +1068,7 @@ function use_macros()
        }
 
        sub("%{_defaultdocdir}", "%{_docdir}");
+       sub("%{_datadir}/doc", "%{_docdir}");
        sub("%{_bindir}/perl", "%{__perl}");
        sub("%{_bindir}/python", "%{__python}");
 
@@ -1894,6 +1905,7 @@ function replace_php_virtual_deps(field) {
        }
 }
 
+# {{{ 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");
@@ -1933,6 +1945,7 @@ function replace_groupnames(group) {
        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");
@@ -1963,7 +1976,9 @@ function replace_groupnames(group) {
 
        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++) {
@@ -1980,7 +1995,9 @@ function replace_pkgconfig(pkg,    cmd, path, n, i, line) {
                }
        }
 }
+# }}}
 
+# {{{ 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.
@@ -1994,6 +2011,7 @@ function replace_pythonegg(pkg,    cmd, line) {
                return;
        }
 }
+# }}}
 
 function replace_requires(field,   pkg) {
        # pkg-config -> package names
This page took 0.039533 seconds and 4 git commands to generate.