[packages/rpm-build-tools] replace opam deps

glen glen at pld-linux.org
Mon Nov 25 23:09:51 CET 2013


commit 16fdc38d0ccfcc3b610a5f5f95c421c1ee653909
Author: Elan Ruusamäe <glen at delfi.ee>
Date:   Tue Nov 26 00:09:46 2013 +0200

    replace opam deps

 adapter.awk | 28 ++++++++++++++++++++++++++++
 1 file changed, 28 insertions(+)
---
diff --git a/adapter.awk b/adapter.awk
index cd6e688..865ce85 100644
--- a/adapter.awk
+++ b/adapter.awk
@@ -1906,6 +1906,32 @@ function import_rpm_macros(  v) {
 	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
@@ -2336,6 +2362,8 @@ function replace_requires(field,   pkg) {
 	# }}}
 
 	replace_php_virtual_deps(field)
+
+	replace_opam_deps(field)
 }
 
 # vim:ts=4:sw=4 fdm=marker
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/rpm-build-tools.git/commitdiff/16fdc38d0ccfcc3b610a5f5f95c421c1ee653909



More information about the pld-cvs-commit mailing list