From be243efbd6e9730c4cd4ce689199d196368923c8 Mon Sep 17 00:00:00 2001 From: Christophe Troestler Date: Tue, 21 Jul 2015 21:40:46 +0200 Subject: [PATCH] =?UTF-8?q?Update=20ocamlmod=200.0.7=20=E2=80=94=20using?= =?UTF-8?q?=20oasis=20to=20uninstall?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit See https://github.com/ocaml/opam/issues/2253 for the motivation --- .../ocamlmod.0.0.7/files/_oasis_remove_.ml | 7 +++++++ .../ocamlmod.0.0.7/files/ocamlmod.install | 7 ++++++- packages/ocamlmod/ocamlmod.0.0.7/opam | 19 +++++++++++++++---- 3 files changed, 28 insertions(+), 5 deletions(-) create mode 100644 packages/ocamlmod/ocamlmod.0.0.7/files/_oasis_remove_.ml diff --git a/packages/ocamlmod/ocamlmod.0.0.7/files/_oasis_remove_.ml b/packages/ocamlmod/ocamlmod.0.0.7/files/_oasis_remove_.ml new file mode 100644 index 000000000000..0d23853fc003 --- /dev/null +++ b/packages/ocamlmod/ocamlmod.0.0.7/files/_oasis_remove_.ml @@ -0,0 +1,7 @@ +open Printf + +let () = + let dir = Sys.argv.(1) in + (try Sys.chdir dir + with _ -> eprintf "Cannot change directory to %s\n%!" dir); + exit (Sys.command "ocaml setup.ml -uninstall") diff --git a/packages/ocamlmod/ocamlmod.0.0.7/files/ocamlmod.install b/packages/ocamlmod/ocamlmod.0.0.7/files/ocamlmod.install index 4f10ffaeba59..c6cfc2de587a 100644 --- a/packages/ocamlmod/ocamlmod.0.0.7/files/ocamlmod.install +++ b/packages/ocamlmod/ocamlmod.0.0.7/files/ocamlmod.install @@ -1 +1,6 @@ -bin: ["_build/src/ocamlmod.byte" {"ocamlmod"}] +etc: [ + "setup.ml" + "setup.data" + "setup.log" + "_oasis_remove_.ml" +] diff --git a/packages/ocamlmod/ocamlmod.0.0.7/opam b/packages/ocamlmod/ocamlmod.0.0.7/opam index acccc9db8b24..ceb6613f0df8 100644 --- a/packages/ocamlmod/ocamlmod.0.0.7/opam +++ b/packages/ocamlmod/ocamlmod.0.0.7/opam @@ -1,10 +1,21 @@ -opam-version: "1" -maintainer: "jp.deplaix@gmail.com" +opam-version: "1.2" +maintainer: "opam-devel@lists.ocaml.org" +authors: [ "Sylvain Le Gall" ] +license: "LGPL-2.1 with OCaml linking exception" build: [ ["ocaml" "setup.ml" "-configure" "--prefix" prefix] ["ocaml" "setup.ml" "-build"] - ["ocaml" "setup.ml" "-install"] +] +install: ["ocaml" "setup.ml" "-install"] +remove: [ + ["ocaml" "%{etc}%/ocamlmod/_oasis_remove_.ml" "%{etc}%/ocamlmod"] +] +build-test: [ + ["ocaml" "setup.ml" "-configure" "--enable-tests"] + ["ocaml" "setup.ml" "-build"] + ["ocaml" "setup.ml" "-test"] ] depends: [ - "ocamlfind" + "ocamlfind" {build} + "ounit" {test & >= "2.0.0"} ]