From 7dc3603f19e2d1d297e5b985d8a8b73462d9e581cb9b6d9e7728bf0d1e221678 Mon Sep 17 00:00:00 2001 From: Olaf Hering Date: Tue, 8 Jan 2013 14:41:11 +0000 Subject: [PATCH] include *.{a,cmx,cmxa} only in opt builds add support for _ignore_exclusive_arch OBS-URL: https://build.opensuse.org/package/show/devel:languages:ocaml/ocaml-pcre?expand=0&rev=4 --- ocaml-pcre.spec | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/ocaml-pcre.spec b/ocaml-pcre.spec index 958bf54..d9ad606 100644 --- a/ocaml-pcre.spec +++ b/ocaml-pcre.spec @@ -28,6 +28,8 @@ # norootforbuild +%define opt %(test -x %{_bindir}/ocamlopt && echo 1 || echo 0) + Name: ocaml-pcre Version: 7.0.2 Release: 1 @@ -35,10 +37,13 @@ Summary: Perl compatibility regular expressions (PCRE) for OCaml Group: Development/Libraries/Other License: LGPL-2.0 -URL: http://www.ocaml.info/home/ocaml_sources.html#pcre-ocaml +URL: https://bitbucket.org/mmottl/pcre-ocaml Source0: https://bitbucket.org/mmottl/pcre-ocaml/downloads/pcre-ocaml-%{version}.tar.bz2 BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) -ExcludeArch: sparc64 s390 s390x +%if "%{_ignore_exclusive_arch}" != "" +%else +ExclusiveArch: %ix86 x86_64 +%endif BuildRequires: ocaml >= 3.10.2 BuildRequires: ocaml-ocamldoc @@ -86,9 +91,11 @@ rm -rf $RPM_BUILD_ROOT %defattr(-,root,root,-) %doc COPYING.txt README.md %{_libdir}/ocaml/pcre +%if %opt %exclude %{_libdir}/ocaml/pcre/*.a %exclude %{_libdir}/ocaml/pcre/*.cmx %exclude %{_libdir}/ocaml/pcre/*.cmxa +%endif %exclude %{_libdir}/ocaml/pcre/*.mli %{_libdir}/ocaml/stublibs/*.so %{_libdir}/ocaml/stublibs/*.so.owner @@ -96,9 +103,11 @@ rm -rf $RPM_BUILD_ROOT %files devel %defattr(-,root,root,-) +%if %opt %{_libdir}/ocaml/pcre/*.a %{_libdir}/ocaml/pcre/*.cmx %{_libdir}/ocaml/pcre/*.cmxa +%endif %{_libdir}/ocaml/pcre/*.mli