[packages/ocaml-stew] - cleaned up opt bcond - rel 2

baggins baggins at pld-linux.org
Sat Jul 25 19:40:04 CEST 2015


commit b334d0024c156c89721e9b795c5cbdbeae758a37
Author: Jan Rękorajski <baggins at pld-linux.org>
Date:   Sat Jul 25 19:39:49 2015 +0200

    - cleaned up opt bcond
    - rel 2

 ocaml-stew.spec | 25 ++++++++++++++++++++-----
 1 file changed, 20 insertions(+), 5 deletions(-)
---
diff --git a/ocaml-stew.spec b/ocaml-stew.spec
index f226522..1034b8f 100644
--- a/ocaml-stew.spec
+++ b/ocaml-stew.spec
@@ -1,16 +1,24 @@
-%define		ocaml_ver	1:3.09.2
+#
+# Conditional build:
+%bcond_without	ocaml_opt	# skip building native optimized binaries (bytecode is always built)
+
+# not yet available on x32 (ocaml 4.02.1), remove when upstream will support it
+%ifnarch %{ix86} %{x8664} arm aarch64 ppc sparc sparcv9
+%undefine	with_ocaml_opt
+%endif
+
 Summary:	A stew of OCaml utility function
 Summary(pl.UTF-8):	Zbiór funkcji narzędziowych dla OCamla
 Name:		ocaml-stew
 Version:	0.12.0
-Release:	19
+Release:	20
 License:	LGPL
 Group:		Libraries
 Source0:	http://raevnos.pennmush.org/code/stew-%{version}.tar.gz
 # Source0-md5:	7e822ca90a5265a2f1b94e81add6eb4c
 URL:		http://raevnos.pennmush.org/code/ocaml.html
 BuildRequires:	autoconf
-BuildRequires:	ocaml >= %{ocaml_ver}
+BuildRequires:	ocaml >= 1:3.09.2
 BuildRequires:	ocaml-findlib >= 0.7.2
 BuildRequires:	ocaml-pcre-devel
 %requires_eq	ocaml-pcre
@@ -66,7 +74,7 @@ tej biblioteki.
 %build
 %{__autoconf}
 %configure
-%{__make} all opt
+%{__make} all %{?with_ocaml_opt:opt}
 rm -f *.cma
 %{__make} DLL='-cclib -lstew'
 
@@ -93,9 +101,16 @@ rm -rf $RPM_BUILD_ROOT
 %defattr(644,root,root,755)
 %doc AUTHORS README
 %attr(755,root,root) %{_libdir}/ocaml/stublibs/*.so
+%{_libdir}/ocaml/stublibs/*.so.owner
 
 %files devel
 %defattr(644,root,root,755)
 %doc html/*
-%{_libdir}/ocaml/stew
+%dir %{_libdir}/ocaml/stew
+%{_libdir}/ocaml/stew/*.cma
+%{_libdir}/ocaml/stew/*.cm[xi]
+%if %{with ocaml_opt}
+%{_libdir}/ocaml/stew/*.[ao]
+%{_libdir}/ocaml/stew/*.cmxa
+%endif
 %{_libdir}/ocaml/site-lib/stew
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/ocaml-stew.git/commitdiff/b334d0024c156c89721e9b795c5cbdbeae758a37



More information about the pld-cvs-commit mailing list