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
This commit is contained in:
parent
f6a4e9dd00
commit
7dc3603f19
@ -28,6 +28,8 @@
|
|||||||
|
|
||||||
# norootforbuild
|
# norootforbuild
|
||||||
|
|
||||||
|
%define opt %(test -x %{_bindir}/ocamlopt && echo 1 || echo 0)
|
||||||
|
|
||||||
Name: ocaml-pcre
|
Name: ocaml-pcre
|
||||||
Version: 7.0.2
|
Version: 7.0.2
|
||||||
Release: 1
|
Release: 1
|
||||||
@ -35,10 +37,13 @@ Summary: Perl compatibility regular expressions (PCRE) for OCaml
|
|||||||
|
|
||||||
Group: Development/Libraries/Other
|
Group: Development/Libraries/Other
|
||||||
License: LGPL-2.0
|
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
|
Source0: https://bitbucket.org/mmottl/pcre-ocaml/downloads/pcre-ocaml-%{version}.tar.bz2
|
||||||
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
|
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 >= 3.10.2
|
||||||
BuildRequires: ocaml-ocamldoc
|
BuildRequires: ocaml-ocamldoc
|
||||||
@ -86,9 +91,11 @@ rm -rf $RPM_BUILD_ROOT
|
|||||||
%defattr(-,root,root,-)
|
%defattr(-,root,root,-)
|
||||||
%doc COPYING.txt README.md
|
%doc COPYING.txt README.md
|
||||||
%{_libdir}/ocaml/pcre
|
%{_libdir}/ocaml/pcre
|
||||||
|
%if %opt
|
||||||
%exclude %{_libdir}/ocaml/pcre/*.a
|
%exclude %{_libdir}/ocaml/pcre/*.a
|
||||||
%exclude %{_libdir}/ocaml/pcre/*.cmx
|
%exclude %{_libdir}/ocaml/pcre/*.cmx
|
||||||
%exclude %{_libdir}/ocaml/pcre/*.cmxa
|
%exclude %{_libdir}/ocaml/pcre/*.cmxa
|
||||||
|
%endif
|
||||||
%exclude %{_libdir}/ocaml/pcre/*.mli
|
%exclude %{_libdir}/ocaml/pcre/*.mli
|
||||||
%{_libdir}/ocaml/stublibs/*.so
|
%{_libdir}/ocaml/stublibs/*.so
|
||||||
%{_libdir}/ocaml/stublibs/*.so.owner
|
%{_libdir}/ocaml/stublibs/*.so.owner
|
||||||
@ -96,9 +103,11 @@ rm -rf $RPM_BUILD_ROOT
|
|||||||
|
|
||||||
%files devel
|
%files devel
|
||||||
%defattr(-,root,root,-)
|
%defattr(-,root,root,-)
|
||||||
|
%if %opt
|
||||||
%{_libdir}/ocaml/pcre/*.a
|
%{_libdir}/ocaml/pcre/*.a
|
||||||
%{_libdir}/ocaml/pcre/*.cmx
|
%{_libdir}/ocaml/pcre/*.cmx
|
||||||
%{_libdir}/ocaml/pcre/*.cmxa
|
%{_libdir}/ocaml/pcre/*.cmxa
|
||||||
|
%endif
|
||||||
%{_libdir}/ocaml/pcre/*.mli
|
%{_libdir}/ocaml/pcre/*.mli
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user