From e90db78893b7d9aadca0cd651369a661e59b852bb59ebb4c1a6c41f94ab88b7f Mon Sep 17 00:00:00 2001 From: Olaf Hering Date: Sat, 15 Feb 2020 11:16:05 +0000 Subject: [PATCH] fix OBS-URL: https://build.opensuse.org/package/show/devel:languages:ocaml/ocaml-pyml?expand=0&rev=4 --- ocaml-pyml.patch | 20 ++++++++++++++++++++ ocaml-pyml.spec | 10 +++++++++- 2 files changed, 29 insertions(+), 1 deletion(-) create mode 100644 ocaml-pyml.patch diff --git a/ocaml-pyml.patch b/ocaml-pyml.patch new file mode 100644 index 0000000..7137d99 --- /dev/null +++ b/ocaml-pyml.patch @@ -0,0 +1,20 @@ +diff --git a/Makefile b/Makefile +index e78ffa9..4b8555c 100644 +--- a/Makefile ++++ b/Makefile +@@ -207,13 +207,13 @@ install : $(INSTALL_FILES) + ifeq ($(HAVE_OCAMLFIND),no) + $(error ocamlfind is needed for 'make install') + endif +- $(OCAMLFIND) install pyml $(INSTALL_FILES) ++ $(OCAMLFIND) install $(OCAMLFIND_EXTRA_OPTIONS) pyml $(INSTALL_FILES) + [ ! -f pymltop ] || $(INSTALL_PROGRAM) pymltop $(bindir)/pymltop + [ ! -f pymlutop ] || $(INSTALL_PROGRAM) pymlutop $(bindir)/pymlutop + + .PHONY : uninstall + uninstall : +- $(OCAMLFIND) remove pyml ++ $(OCAMLFIND) remove $(OCAMLFIND_EXTRA_OPTIONS) pyml + - rm $(bindir)/pymltop + - rm $(bindir)/pymlutop + diff --git a/ocaml-pyml.spec b/ocaml-pyml.spec index ee8a343..92a89d4 100644 --- a/ocaml-pyml.spec +++ b/ocaml-pyml.spec @@ -24,6 +24,7 @@ License: BSD-2-Clause Group: Development/Languages/OCaml URL: https://opam.ocaml.org/packages/pyml Source0: %{name}-%{version}.tar.xz +Patch0: ocaml-pyml.patch BuildRequires: ocaml BuildRequires: ocaml-dune BuildRequires: ocaml-rpm-macros >= 20191101 @@ -52,6 +53,11 @@ developing applications that use %{name}. %autosetup -p1 %build +sed -i~ ' +s@^\(HAVE_OCAMLFIND := $(shell \).*@\1 set -x ; \\@ +s@2>&1@@g +' Makefile +diff -u "$_"~ "$_" && exit 1 %make_build exit 0 dune_release_pkgs='pyml' @@ -59,7 +65,9 @@ dune_release_pkgs='pyml' %ocaml_dune_build %install -%make_install OCAMLFIND="$(type -p ocamlfind) -destdir %{buildroot}" STDCOMPAT="$(ocamlfind query stdcompat)" +mkdir -vp '%{buildroot}%{_libdir}/ocaml' +%make_install OCAMLFIND_EXTRA_OPTIONS='-destdir %{buildroot}%{_libdir}/ocaml -ldconf ignore' STDCOMPAT="$(ocamlfind query stdcompat)" +%ocaml_create_file_list exit 0 %ocaml_dune_install %ocaml_create_file_list