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
This commit is contained in:
Mike Latimer 2014-12-08 21:00:24 +00:00 committed by Git OBS Bridge
parent d6b713a612
commit f284479104
2 changed files with 12 additions and 7 deletions

View File

@ -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 Fri Dec 5 18:17:39 UTC 2014 - mlatimer@suse.com

View File

@ -16,10 +16,9 @@
# #
%global opt %(test -x %{_bindir}/ocamlopt && echo 1 || echo 0)
Name: ocaml-libvirt Name: ocaml-libvirt
Version: 0.6.1.4 Version: 0.6.1.4
%{ocaml_preserve_bytecode}
Release: 0 Release: 0
Summary: OCaml binding for libvirt Summary: OCaml binding for libvirt
License: LGPL-2.0+ License: LGPL-2.0+
@ -32,12 +31,12 @@ BuildRequires: gawk
# 0.9.10-3 contains virDomainGetCPUStats API, but not the qemu driver. # 0.9.10-3 contains virDomainGetCPUStats API, but not the qemu driver.
BuildRequires: libvirt-devel >= 0.9.10-3 BuildRequires: libvirt-devel >= 0.9.10-3
BuildRequires: ocaml >= 3.10.0 BuildRequires: ocaml >= 3.10.0
BuildRequires: ocaml-rpm-macros >= 4.02.1
BuildRequires: ocaml-findlib-devel BuildRequires: ocaml-findlib-devel
BuildRequires: ocaml-ocamldoc BuildRequires: ocaml-ocamldoc
BuildRequires: perl BuildRequires: perl
Requires: libvirt-client >= 0.9.10-3 Requires: libvirt-client >= 0.9.10-3
BuildRoot: %{_tmppath}/%{name}-%{version}-build BuildRoot: %{_tmppath}/%{name}-%{version}-build
ExcludeArch: sparc64 s390 s390x
%description %description
OCaml binding for libvirt. OCaml binding for libvirt.
@ -59,7 +58,7 @@ developing applications that use %{name}.
%build %build
%configure %configure
make %{?_smp_mflags} all doc make %{?_smp_mflags} all doc
%if %{opt} %if %{ocaml_native_compiler}
make %{?_smp_mflags} opt make %{?_smp_mflags} opt
%endif %endif
@ -70,7 +69,7 @@ export DESTDIR=%{buildroot}
export OCAMLFIND_DESTDIR=%{buildroot}%{_libdir}/ocaml export OCAMLFIND_DESTDIR=%{buildroot}%{_libdir}/ocaml
mkdir -p $OCAMLFIND_DESTDIR $OCAMLFIND_DESTDIR/stublibs mkdir -p $OCAMLFIND_DESTDIR $OCAMLFIND_DESTDIR/stublibs
mkdir -p %{buildroot}%{_bindir} mkdir -p %{buildroot}%{_bindir}
%if %{opt} %if %{ocaml_native_compiler}
make install-opt make install-opt
%else %else
make install-byte make install-byte
@ -82,7 +81,7 @@ make install-byte
%defattr(-,root,root,-) %defattr(-,root,root,-)
%doc COPYING.LIB README ChangeLog %doc COPYING.LIB README ChangeLog
%{_libdir}/ocaml/libvirt %{_libdir}/ocaml/libvirt
%if %{opt} %if %{ocaml_native_compiler}
%exclude %{_libdir}/ocaml/libvirt/*.a %exclude %{_libdir}/ocaml/libvirt/*.a
%exclude %{_libdir}/ocaml/libvirt/*.cmxa %exclude %{_libdir}/ocaml/libvirt/*.cmxa
%exclude %{_libdir}/ocaml/libvirt/*.cmx %exclude %{_libdir}/ocaml/libvirt/*.cmx
@ -94,7 +93,7 @@ make install-byte
%files devel %files devel
%defattr(-,root,root,-) %defattr(-,root,root,-)
%doc COPYING.LIB README TODO.libvirt ChangeLog html/* %doc COPYING.LIB README TODO.libvirt ChangeLog html/*
%if %{opt} %if %{ocaml_native_compiler}
%{_libdir}/ocaml/libvirt/*.a %{_libdir}/ocaml/libvirt/*.a
%{_libdir}/ocaml/libvirt/*.cmxa %{_libdir}/ocaml/libvirt/*.cmxa
%{_libdir}/ocaml/libvirt/*.cmx %{_libdir}/ocaml/libvirt/*.cmx