[packages/ocaml-easy-format] use make install
glen
glen at pld-linux.org
Sun Nov 24 02:28:50 CET 2013
commit 9b7f665256756cec241efa73570e7d87f00a4d28
Author: Elan Ruusamäe <glen at delfi.ee>
Date: Sun Nov 24 03:28:37 2013 +0200
use make install
ocaml-easy-format.spec | 25 +++++++++++++++----------
1 file changed, 15 insertions(+), 10 deletions(-)
---
diff --git a/ocaml-easy-format.spec b/ocaml-easy-format.spec
index 6c76014..93f2d05 100644
--- a/ocaml-easy-format.spec
+++ b/ocaml-easy-format.spec
@@ -52,18 +52,18 @@ tej biblioteki.
%install
rm -rf $RPM_BUILD_ROOT
+export OCAMLFIND_DESTDIR=$RPM_BUILD_ROOT%{_libdir}/ocaml
+install -d $OCAMLFIND_DESTDIR $OCAMLFIND_DESTDIR/stublibs
+%{__make} install \
+ DESTDIR=$RPM_BUILD_ROOT
-install -d $RPM_BUILD_ROOT%{_libdir}/ocaml/{%{module},stublibs}
-cp -p *.cm[ixa]* $RPM_BUILD_ROOT%{_libdir}/ocaml/%{module}
-
+# move to dir pld ocamlfind looks
install -d $RPM_BUILD_ROOT%{_libdir}/ocaml/site-lib/%{module}
-cat > $RPM_BUILD_ROOT%{_libdir}/ocaml/site-lib/%{module}/META <<EOF
-requires = ""
+mv $OCAMLFIND_DESTDIR/%{module}/META \
+ $RPM_BUILD_ROOT%{_libdir}/ocaml/site-lib/%{module}
+cat <<EOF >> $RPM_BUILD_ROOT%{_libdir}/ocaml/site-lib/%{module}/META
version = "%{version}"
-directory = "+%{module}"
-archive(byte) = "%{module}.cma"
-archive(native) = "%{module}.cmxa"
-linkopts = ""
+directory="+%{module}"
EOF
%clean
@@ -71,7 +71,12 @@ rm -rf $RPM_BUILD_ROOT
%files devel
%defattr(644,root,root,755)
-%doc README Changes LICENSE *.mli
+%doc README Changes LICENSE
%dir %{_libdir}/ocaml/%{module}
%{_libdir}/ocaml/%{module}/*.cm[xi]
+%{_libdir}/ocaml/%{module}/*.cmo
+%{_libdir}/ocaml/%{module}/*.mli
+%if %{with opt}
+%{_libdir}/ocaml/%{module}/*.o
+%endif
%{_libdir}/ocaml/site-lib/%{module}
================================================================
---- gitweb:
http://git.pld-linux.org/gitweb.cgi/packages/ocaml-easy-format.git/commitdiff/9b7f665256756cec241efa73570e7d87f00a4d28
More information about the pld-cvs-commit
mailing list