]> git.pld-linux.org Git - packages/rpm-build-tools.git/blobdiff - adapter.awk
cleanup GIT_ vars before invoking build
[packages/rpm-build-tools.git] / adapter.awk
index c0586ff4904b1c95aaab69fceeacb5cebb4fa3d9..f84aed4b5bb475dc05af12e357ed7b8ad72fdb8a 100644 (file)
@@ -373,7 +373,7 @@ function b_makekey(a, b,    s) {
 ##########
 # %build #
 ##########
-/^%build/, (!/^%build/ && $0 ~ SECTIONS) {
+/^%build([^A-Za-z0-9_]|$)/, (!/^%build/ && $0 ~ SECTIONS) {
        preamble = 0
 
        if (did_prep == 0) {
@@ -1160,6 +1160,10 @@ function use_macros()
        sub("%{_datadir}/doc", "%{_docdir}")
        sub("%{_bindir}/perl", "%{__perl}")
        sub("%{_bindir}/python", "%{__python}")
+       sub("%{__python2}", "%{__python}")
+
+       sub("%py2_build", "%py_build")
+       sub("%py2_install", "%py_install")
 
        gsub(infodir, "%{_infodir}")
 
@@ -1329,6 +1333,7 @@ function use_macros()
        gsub(php_pear_dir, "%{php_pear_dir}")
        gsub(php_data_dir, "%{php_data_dir}")
        gsub("%{_datadir}/php", "%{php_data_dir}")
+       gsub("%{php_home}", "%{php_data_dir}")
 
        # change to %{_datadir}, with some exceptions
        for (c = 1; c <= NF; c++) {
@@ -1530,6 +1535,7 @@ function use_files_macros(        i, n, t, a, l)
        }
 
        sub("^%doc %{_mandir}", "%{_mandir}")
+       sub("^%license", "%doc")
 
        gsub("^%{_sbindir}", "%attr(755,root,root) %{_sbindir}")
        gsub("^%{_bindir}", "%attr(755,root,root) %{_bindir}")
@@ -1776,6 +1782,7 @@ function unify_url(url)
        if (url ~ /sourceforge.net/) {
                sub("[?&]big_mirror=.*$", "", url)
                sub("[?&]modtime=.*$", "", url)
+               sub("[?&]r=.*$", "", url)
                sub("[?]use_mirror=.*$", "", url)
                sub("[?]download$", "", url)
                sub("/download$", "", url)
@@ -2052,6 +2059,10 @@ function replace_php_virtual_deps(field) {
                }
        }
 
+       if (pkg == "php(language)") {
+               $2 = "php(core)"
+       }
+
        if (pkg == "php4") {
                $2 = "webserver(php)"
                if ($4 ~ /^[0-9]:/) {
@@ -2413,6 +2424,7 @@ function replace_requires(field,   pkg) {
        sub(/^python-enchant$/, "python-pyenchant", $2)
        sub(/^python-imaging$/, "python-PIL", $2)
        sub(/^python-imaging-tk$/, "python-PIL-tk", $2)
+       sub(/^python-ndg_httpsclient$/, "python-ndg-httpsclient", $2)
        sub(/^python-newt$/, "python-snack", $2)
        sub(/^python-pygtk$/, "python-pygtk-gtk", $2)
        sub(/^python-recaptcha-client$/, "python-recaptcha", $2)
@@ -2426,6 +2438,8 @@ function replace_requires(field,   pkg) {
        sub(/^python-uuid$/, "python-modules", $2)
        sub(/^python-xlib$/, "python-Xlib", $2)
        sub(/^python-zope-interface$/, "Zope-Interface", $2)
+       sub(/^python-zope.component$/, "Zope-Component", $2)
+       sub(/^python-zope.interface$/, "Zope-Interface", $2)
        sub(/^python2-devel$/, "python-devel", $2)
        sub(/^pytz$/, "python-pytz", $2)
        sub(/^pyxdg$/, "python-pyxdg", $2)
This page took 0.034656 seconds and 4 git commands to generate.