[packages/ocaml-pcre] - added ocaml_opt bcond - rel 2

baggins baggins at pld-linux.org
Mon Apr 6 10:13:05 CEST 2015


commit 936147975227f9785e5b925e415f16daab8f1966
Author: Jan Rękorajski <baggins at pld-linux.org>
Date:   Mon Apr 6 08:12:49 2015 +0000

    - added ocaml_opt bcond
    - rel 2

 ocaml-pcre.spec | 22 ++++++++++++++++++++--
 1 file changed, 20 insertions(+), 2 deletions(-)
---
diff --git a/ocaml-pcre.spec b/ocaml-pcre.spec
index 5a89a4c..dc97fea 100644
--- a/ocaml-pcre.spec
+++ b/ocaml-pcre.spec
@@ -1,8 +1,23 @@
+#
+# Conditional build:
+%bcond_without	ocaml_opt	# skip building native optimized binaries (bytecode is always built)
+
+%ifarch x32
+# not yet available on x32 (ocaml 4.02.1), remove when upstream will support it
+%undefine	with_ocaml_opt
+%endif
+
+%if %{without ocaml_opt}
+%define		no_install_post_strip	1
+# no opt means no native binary, stripping bytecode breaks such programs
+%define		_enable_debug_packages	0
+%endif
+
 Summary:	PCRE binding for OCaml
 Summary(pl.UTF-8):	Wiązania PCRE dla OCamla
 Name:		ocaml-pcre
 Version:	7.1.2
-Release:	1
+Release:	2
 License:	LGPL v2.1+ with OCaml linking exception
 Group:		Libraries
 Source0:	https://github.com/mmottl/pcre-ocaml/archive/v%{version}/%{name}-%{version}.tar.gz
@@ -98,8 +113,11 @@ rm -rf $RPM_BUILD_ROOT
 %defattr(644,root,root,755)
 %doc lib/*.mli
 %{_libdir}/ocaml/pcre/libpcre_stubs.a
+%if %{with ocaml_opt}
 %{_libdir}/ocaml/pcre/pcre.a
-%{_libdir}/ocaml/pcre/pcre.cm[ixa]*
+%{_libdir}/ocaml/pcre/pcre.cmxa
+%endif
+%{_libdir}/ocaml/pcre/pcre.cm[ia]
 %{_libdir}/ocaml/pcre/pcre_compat.cm[ix]
 %{_libdir}/ocaml/pcre/pcre_compat.ml
 %{_libdir}/ocaml/site-lib/pcre
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/ocaml-pcre.git/commitdiff/936147975227f9785e5b925e415f16daab8f1966



More information about the pld-cvs-commit mailing list