]> git.pld-linux.org Git - packages/adapter.git/blobdiff - adapter.awk
replace _tmpfilesdir
[packages/adapter.git] / adapter.awk
index 57f1e632df75bd3d2051c9398091c89afb63250f..d10b4ba13d6dc9fab54dd7a01c5fd4168d1b0735 100644 (file)
@@ -255,6 +255,11 @@ function b_makekey(a, b,   s) {
        next
 }
 
+# %package part
+/^%package/, (!/^%package/ && $0 ~ SECTIONS) {
+       gsub(/\t/, " ");
+}
+
 ################
 # %description #
 ################
@@ -492,6 +497,10 @@ function b_makekey(a, b,   s) {
        if (/^install/ && /-m[ \t]*[0-9]+/)
                gsub(/-m[ \t]*[0-9]+ /, "")
 
+       # install without options -> cp -p
+       if (/^install [^-]/)
+               gsub(/^install/, "cp -p")
+
        # No lines contain 'chown' or 'chgrp' if owner/group is 'root'
        if (($1 ~ /chown/ && $2 ~ /root\.root/) || ($1 ~ /chgrp/ && $2 ~ /root/))
                next
@@ -1114,10 +1123,14 @@ function use_macros()
        gsub(ruby_rubylibdir, "%{ruby_rubylibdir}") # deprecated
        gsub(ruby_rdocdir, "%{ruby_rdocdir}")
        gsub(ruby_ridir, "%{ruby_ridir}")
+       gsub(ruby_specdir, "%{ruby_specdir}")
 
        gsub("%{_unitdir}", "%{systemdunitdir}")
        gsub(systemdunitdir, "%{systemdunitdir}")
+       gsub("%{_userunitdir}", "%{systemduserunitdir}")
+       gsub(systemduserunitdir, "%{systemduserunitdir}")
        gsub(systemdtmpfilesdir, "%{systemdtmpfilesdir}")
+       gsub("%{_tmpfilesdir}", "%{systemdtmpfilesdir}")
 
        gsub("%{_datadir}/applications", "%{_desktopdir}")
        gsub("%{_datadir}/pixmaps", "%{_pixmapsdir}")
@@ -1180,6 +1193,8 @@ function use_macros()
                        continue;
                if ($c ~ sysconfdir "/{?pam.d")
                        continue;
+               if ($c ~ sysconfdir "/{?apparmor.d")
+                       continue;
                if ($c ~ sysconfdir "/{?profile.d")
                        continue;
                if ($c ~ sysconfdir "/{?rc.d")
@@ -1840,7 +1855,7 @@ function import_rpm_macros(  v) {
        }
 
        # update this version dep each time some new macro export is added
-       v = 1.49
+       v = 1.52
        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
@@ -1895,15 +1910,43 @@ function import_rpm_macros(  v) {
        ruby_rubylibdir = ENVIRON["ruby_rubylibdir"] # deprecated
        ruby_rdocdir = ENVIRON["ruby_rdocdir"]
        ruby_ridir = ENVIRON["ruby_ridir"]
+       ruby_specdir = ENVIRON["ruby_specdir"]
 
        php_pear_dir = ENVIRON["php_pear_dir"]
        php_data_dir = ENVIRON["php_data_dir"]
        tmpdir = ENVIRON["tmpdir"]
 
        systemdunitdir = ENVIRON["systemdunitdir"]
+       systemduserunitdir = ENVIRON["systemduserunitdir"]
        systemdtmpfilesdir = ENVIRON["systemdtmpfilesdir"]
 }
 
+# replace opam names (caml)
+function replace_opam_deps(field,     name) {
+       name = $2
+       if (name ~ "^(cryptokit|extlib|xmlm)$") {
+               name = "ocaml-" name;
+       } else if (name ~ "^(biniou|easy-format|yojson|gapi-ocaml)$") {
+               name = "ocaml-" name "-devel";
+       } else if (name == "ocamlfind") {
+               name = "ocaml-findlib"
+       } else if (name == "sqlite3-ocaml") {
+               name = "ocaml-sqlite"
+       } else if (name == "ocamlnet") {
+               name = "ocaml-net"
+       } else if (name == "ocurl") {
+               name = "ocaml-curl-devel"
+       } else if (name == "ocamlfuse") {
+               name = "ocaml-fuse-devel"
+       } else if (name == "camlidl") {
+               name = "ocaml-idl-devel"
+       }
+
+       if (name != $2) {
+               $2 = name;
+       }
+}
+
 # php virtual deps as discussed in devel-en
 function replace_php_virtual_deps(field) {
        pkg = $2
@@ -2087,11 +2130,14 @@ function replace_requires(field,   pkg) {
        sub(/^jakarta-ant$/, "ant", $2);
        sub(/^jakarta-commons-codec$/, "java-commons-codec", $2);
        sub(/^jakarta-commons-httpclient$/, "java-commons-httpclient", $2);
+       sub(/^jakarta-commons-lang24$/, "java-commons-lang", $2);
        sub(/^jakarta-commons-logging$/, "java-commons-logging", $2);
+       sub(/^jakarta-commons-net$/, "java-commons-net", $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-dom$/, "java-dom4j", $2);
        sub(/^java\(JSP\)$/, "java(jsp)", $2);
        sub(/^java\(JavaServerFaces\)$/, "java(javaserverfaces)", $2);
        sub(/^java\(Portlet\)$/, "java(portlet)", $2);
@@ -2175,6 +2221,7 @@ function replace_requires(field,   pkg) {
        sub(/^gtk3-devel$/, "gtk+3-devel", $2);
        sub(/^initscripts$/, "rc-scripts", $2);
        sub(/^iproute$/, "iproute2", $2);
+       sub(/^iptables-ipv6$/, "iptables", $2);
        sub(/^iscsi-initiator-utils$/, "open-iscsi", $2);
        sub(/^keyutils-libs-devel$/, "keyutils-devel", $2);
        sub(/^libSM-devel$/, "xorg-lib-libSM-devel", $2);
@@ -2195,6 +2242,7 @@ function replace_requires(field,   pkg) {
        sub(/^libXxf86misc-devel$/, "xorg-lib-libXxf86misc-devel", $2);
        sub(/^libXxf86vm-devel$/, "xorg-lib-libXxf86vm-devel", $2);
        sub(/^libacl-devel$/, "acl-devel", $2);
+       sub(/^libattr-devel$/, "attr-devel", $2);
        sub(/^libcurl-devel$/, "curl-devel", $2);
        sub(/^libgudev1-devel$/, "udev-glib-devel", $2);
        sub(/^libmx-devel$/, "mx-devel", $2);
@@ -2236,7 +2284,8 @@ function replace_requires(field,   pkg) {
        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-sphinx$/, "python-Sphinx", $2);
+       sub(/^python-twisted$/, "python-TwistedCore", $2);
        sub(/^python-twisted-core$/, "python-TwistedCore", $2);
        sub(/^python-twisted-names$/, "python-TwistedNames", $2);
        sub(/^python2-devel$/, "python-devel", $2);
@@ -2334,6 +2383,8 @@ function replace_requires(field,   pkg) {
        # }}}
 
        replace_php_virtual_deps(field)
+
+       replace_opam_deps(field)
 }
 
 # vim:ts=4:sw=4 fdm=marker
This page took 0.036665 seconds and 4 git commands to generate.