Olaf Hering 2020-02-15 11:16:05 +00:00 committed by Git OBS Bridge
parent c8e0f421d5
commit e90db78893
2 changed files with 29 additions and 1 deletions

20
ocaml-pyml.patch Normal file
View File

@ -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

View File

@ -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