From c2c82a50497fbce486350deb0418b6a13365f3907222198ada20a34d0eb98d30 Mon Sep 17 00:00:00 2001 From: Olaf Hering Date: Fri, 1 Nov 2019 22:56:56 +0000 Subject: [PATCH] - Require current dune macros OBS-URL: https://build.opensuse.org/package/show/devel:languages:ocaml/ocaml-dune?expand=0&rev=39 --- ocaml-dune.changes | 5 +++++ ocaml-dune.spec | 24 +++++++++++------------- 2 files changed, 16 insertions(+), 13 deletions(-) diff --git a/ocaml-dune.changes b/ocaml-dune.changes index d925041..7553a74 100644 --- a/ocaml-dune.changes +++ b/ocaml-dune.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Fri Nov 1 12:34:56 UTC 2019 - ohering@suse.de + +- Require current dune macros + ------------------------------------------------------------------- Tue Oct 15 18:14:03 UTC 2019 - ohering@suse.de diff --git a/ocaml-dune.spec b/ocaml-dune.spec index 1e8fba7..f344571 100644 --- a/ocaml-dune.spec +++ b/ocaml-dune.spec @@ -28,10 +28,8 @@ Conflicts: ocaml-jbuilder Conflicts: ocaml-jbuilder-debuginfo Conflicts: ocaml-jbuilder-debugsource Source: %{name}-%{version}.tar.xz -Requires: ocaml-findlib -BuildRequires: ocaml -BuildRequires: ocaml-rpm-macros >= 20191004 -BuildRoot: %{_tmppath}/%{name}-%{version}-build +BuildRequires: ocaml(ocaml_base_version) < 4.06 +BuildRequires: ocaml-rpm-macros >= 20191101 %description A composable build system for OCaml @@ -49,19 +47,19 @@ developing applications that use %{name}. %autosetup -p1 %build +ocaml configure.ml --libdir=$(ocamlc -where) %make_build %install #make_install PREFIX='%{_prefix}' LIBDIR="$(ocamlc -where)" -./_boot/default/bin/main/main_dune.exe install \ - --prefix '%{_prefix}' \ - --destdir '%{buildroot}' \ - --libdir "$(ocamlc -where)" \ - dune --build-dir _boot -find '%{buildroot}' -ls -rm -rfv %{buildroot}%{_prefix}/doc -mkdir -vp %{buildroot}%{_mandir} -mv %{buildroot}%{_prefix}/man %{buildroot}%{_datadir} +if pushd _boot/default/bin/main +then + ln -svb main_dune.exe dune + export PATH="`readlink -f \"$PWD\"`:$PATH" + popd +fi +OCAML_DUNE_INSTALL_ARGS='dune --build-dir _boot' +%ocaml_dune_install %ocaml_create_file_list %files -f %{name}.files