From f284479104de17c59ffce3d466f9c4161fe31f157d248542cb36b94410e2d4f5 Mon Sep 17 00:00:00 2001 From: Mike Latimer Date: Mon, 8 Dec 2014 21:00:24 +0000 Subject: [PATCH] Accepting request 264469 from home:mlatimer:td Update spec file as per recommendations OBS-URL: https://build.opensuse.org/request/show/264469 OBS-URL: https://build.opensuse.org/package/show/devel:languages:ocaml/ocaml-libvirt?expand=0&rev=2 --- ocaml-libvirt.changes | 6 ++++++ ocaml-libvirt.spec | 13 ++++++------- 2 files changed, 12 insertions(+), 7 deletions(-) diff --git a/ocaml-libvirt.changes b/ocaml-libvirt.changes index 661bf3e..a16dcab 100644 --- a/ocaml-libvirt.changes +++ b/ocaml-libvirt.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Mon Dec 8 20:48:52 UTC 2014 - mlatimer@suse.com + +- Update spec file to use ocaml-rpm-macros, remove + ExclusiveArch, and ensure bytecode is built + ------------------------------------------------------------------- Fri Dec 5 18:17:39 UTC 2014 - mlatimer@suse.com diff --git a/ocaml-libvirt.spec b/ocaml-libvirt.spec index f42e35e..6067a7e 100644 --- a/ocaml-libvirt.spec +++ b/ocaml-libvirt.spec @@ -16,10 +16,9 @@ # -%global opt %(test -x %{_bindir}/ocamlopt && echo 1 || echo 0) - Name: ocaml-libvirt Version: 0.6.1.4 +%{ocaml_preserve_bytecode} Release: 0 Summary: OCaml binding for libvirt License: LGPL-2.0+ @@ -32,12 +31,12 @@ BuildRequires: gawk # 0.9.10-3 contains virDomainGetCPUStats API, but not the qemu driver. BuildRequires: libvirt-devel >= 0.9.10-3 BuildRequires: ocaml >= 3.10.0 +BuildRequires: ocaml-rpm-macros >= 4.02.1 BuildRequires: ocaml-findlib-devel BuildRequires: ocaml-ocamldoc BuildRequires: perl Requires: libvirt-client >= 0.9.10-3 BuildRoot: %{_tmppath}/%{name}-%{version}-build -ExcludeArch: sparc64 s390 s390x %description OCaml binding for libvirt. @@ -59,7 +58,7 @@ developing applications that use %{name}. %build %configure make %{?_smp_mflags} all doc -%if %{opt} +%if %{ocaml_native_compiler} make %{?_smp_mflags} opt %endif @@ -70,7 +69,7 @@ export DESTDIR=%{buildroot} export OCAMLFIND_DESTDIR=%{buildroot}%{_libdir}/ocaml mkdir -p $OCAMLFIND_DESTDIR $OCAMLFIND_DESTDIR/stublibs mkdir -p %{buildroot}%{_bindir} -%if %{opt} +%if %{ocaml_native_compiler} make install-opt %else make install-byte @@ -82,7 +81,7 @@ make install-byte %defattr(-,root,root,-) %doc COPYING.LIB README ChangeLog %{_libdir}/ocaml/libvirt -%if %{opt} +%if %{ocaml_native_compiler} %exclude %{_libdir}/ocaml/libvirt/*.a %exclude %{_libdir}/ocaml/libvirt/*.cmxa %exclude %{_libdir}/ocaml/libvirt/*.cmx @@ -94,7 +93,7 @@ make install-byte %files devel %defattr(-,root,root,-) %doc COPYING.LIB README TODO.libvirt ChangeLog html/* -%if %{opt} +%if %{ocaml_native_compiler} %{_libdir}/ocaml/libvirt/*.a %{_libdir}/ocaml/libvirt/*.cmxa %{_libdir}/ocaml/libvirt/*.cmx