]> git.pld-linux.org Git - packages/rpm-build-tools.git/commitdiff
- adapter for new php extension virtuals
authorElan Ruusamäe <glen@pld-linux.org>
Wed, 8 Nov 2006 23:56:41 +0000 (23:56 +0000)
committercvs2git <feedback@pld-linux.org>
Sun, 24 Jun 2012 12:13:13 +0000 (12:13 +0000)
Changed files:
    adapter.awk -> 1.330

adapter.awk

index 993c1e9a7c562a430d5ae7af9cb846c51fea5bf6..c8503f45b4119a81c2a6557b44b684704792bcc5 100644 (file)
@@ -713,7 +713,7 @@ preamble == 1 {
                value = substr($0, index($0, $2));
                $0 = format_requires($1, value);
        }
-
+    
        # BR: tar (and others) is to common (rpm-build requires it)
        if (field ~ /^buildrequires:/) {
                l = substr($0, index($0, $2));
@@ -747,8 +747,15 @@ preamble == 1 {
                sub(/^ant-junit$/, "jakarta-ant", $2);
                sub(/^ldapjdk$/, "ldapsdk", $2);
                sub(/^saxon-scripts$/, "saxon", $2);
+
+        replace_php_virtual_deps();
        }
 
+       if (field ~ /^requires:/) {
+        replace_php_virtual_deps();
+    }
+
+
        # obsolete/unwanted tags
        if (field ~ /vendor:|packager:|distribution:|docdir:|prefix:|icon:|author:|author-email:|metadata-version:/) {
                next
@@ -1601,4 +1608,22 @@ function add_br(br)
     BR[BR_count++] = br
 }
 
+# php virtual deps as discussed in devel-en
+function replace_php_virtual_deps()
+{
+    pkg = $2
+    if (pkg ~ /^php-/ && pkg !~ /^php-(pear|common|cli|devel|fcgi|cgi|dirs)/) {
+        sub(/^php-/, "php(", pkg);
+        sub(/$/, ")", pkg);
+        $2 = pkg
+    }
+
+    if (pkg ~/^php$/) {
+        $2 = "webserver(php)";
+        if ($4 ~ /^[0-9]:/) {
+            $4 = substr($4, 3);
+        }
+    }
+}
+
 # vim:ts=4:sw=4:et
This page took 0.053557 seconds and 4 git commands to generate.