# # spec file for package ocaml-libvirt # # Copyright (c) 2014 SUSE LINUX Products GmbH, Nuernberg, Germany. # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed # upon. The license for this file, and modifications and additions to the # file, is the same license as for the pristine package itself (unless the # license for the pristine package is not an Open Source License, in which # case the license is the MIT License). An "Open Source License" is a # license that conforms to the Open Source Definition (Version 1.9) # published by the Open Source Initiative. # Please submit bugfixes or comments via http://bugs.opensuse.org/ # Name: ocaml-libvirt Version: 0.6.1.4 %{ocaml_preserve_bytecode} Release: 0 Summary: OCaml binding for libvirt License: LGPL-2.0+ Group: Development/Libraries/Other Url: http://libvirt.org/ocaml/ Source0: http://libvirt.org/sources/ocaml/%{name}-%{version}.tar.gz # Upstream patch to fix int types. Patch1: 0001-Use-C99-standard-int64_t-instead-of-OCaml-defined-an.patch 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 BuildRequires: ocaml-ocamldoc BuildRequires: perl Requires: libvirt-client >= 0.9.10-3 BuildRoot: %{_tmppath}/%{name}-%{version}-build # ocaml autodep start for pkg: ocaml-libvirt # hardcoded rpm dependency for pre 12.1 to compensate for lack of ocaml() provides/requires %if 0%{?suse_version} < 1210 Requires: ocaml-runtime %endif # ocaml autodep end for pkg: ocaml-libvirt %description OCaml binding for libvirt. %package devel Summary: Development files for %{name} Group: Development/Libraries Requires: %{name} = %{version}-%{release} %description devel The %{name}-devel package contains libraries and signature files for developing applications that use %{name}. %prep %setup -q %patch1 -p1 %build %configure make %{?_smp_mflags} all doc %if %{ocaml_native_compiler} make %{?_smp_mflags} opt %endif %install # These rules work if the library uses 'ocamlfind install' to install itself. export DESTDIR=%{buildroot} export OCAMLFIND_DESTDIR=%{buildroot}%{_libdir}/ocaml mkdir -p $OCAMLFIND_DESTDIR $OCAMLFIND_DESTDIR/stublibs mkdir -p %{buildroot}%{_bindir} %if %{ocaml_native_compiler} make install-opt %else make install-byte %endif # mkdir -vp %{buildroot}/etc/ld.so.conf.d/ tee %{buildroot}/etc/ld.so.conf.d/%{name}.conf <<_EOF_ %{_libdir}/ocaml/stublibs _EOF_ # %post -p /sbin/ldconfig %postun -p /sbin/ldconfig %files %defattr(-,root,root,-) %doc COPYING.LIB README ChangeLog /etc/ld.so.conf.d/*.conf %dir %{_libdir}/ocaml %dir %{_libdir}/ocaml/* %{_libdir}/ocaml/*/*.so %{_libdir}/ocaml/*/*.so.owner %files devel %defattr(-,root,root,-) %doc COPYING.LIB README TODO.libvirt ChangeLog html/* %dir %{_libdir}/ocaml %dir %{_libdir}/ocaml/* %{_libdir}/ocaml/*/*.a %if %{ocaml_native_compiler} %{_libdir}/ocaml/*/*.cmx %{_libdir}/ocaml/*/*.cmxa %endif %{_libdir}/ocaml/*/*.cma %{_libdir}/ocaml/*/*.cmi %{_libdir}/ocaml/*/*.mli %{_libdir}/ocaml/*/META %changelog