3 %bcond_without opt # build opt
5 %define debug_package %{nil}
7 Summary: OCaml Curl library (ocurl)
13 Source0: http://downloads.sourceforge.net/ocurl/%{pkgname}-%{version}.tgz
14 Patch1: ocurl-0.5.3-include-o-cmx.patch
15 URL: http://sourceforge.net/projects/ocurl
16 BuildRequires: curl-devel >= 7.12.0
18 BuildRequires: ocaml >= 3.10.0-7
19 BuildRequires: ocaml-findlib-devel
20 # Explicitly require Curl (fixes RHBZ#711261). Since ocaml-curl uses
21 # -custom rather than ocamlmklib, automatic detection is infeasible.
22 Requires: curl-devel >= 7.12.0
23 ExcludeArch: sparc64 s390 s390x
24 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
27 The Ocaml Curl Library (Ocurl) is an interface library for the
28 programming language Ocaml to the networking library libcurl.
31 Summary: Development files for %{name}
32 Group: Development/Libraries
33 Requires: %{name} = %{version}-%{release}
36 The %{name}-devel package contains libraries and signature files for
37 developing applications that use %{name}.
44 # Files in the archive have spurious +x mode.
45 find -type f | xargs chmod 0644
46 chmod 0755 configure install-sh
54 OCBYTE="ocamlc.opt -g" \
55 OCOPT="ocamlopt.opt -g"
59 rm -rf $RPM_BUILD_ROOT
60 export OCAMLFIND_DESTDIR=$RPM_BUILD_ROOT%{_libdir}/ocaml
61 install -d $OCAMLFIND_DESTDIR $OCAMLFIND_DESTDIR/stublibs
63 DESTDIR=$RPM_BUILD_ROOT
66 cp -p curl.mli $OCAMLFIND_DESTDIR/curl
68 # Make clean in the examples dir so our docs don't contain binaries.
69 %{__make} -C examples clean
72 rm -rf $RPM_BUILD_ROOT
75 %defattr(644,root,root,755)
79 %exclude %{_libdir}/ocaml/curl/*.a
80 %exclude %{_libdir}/ocaml/curl/*.o
81 %exclude %{_libdir}/ocaml/curl/*.cmx
82 %exclude %{_libdir}/ocaml/curl/*.cmxa
84 %exclude %{_libdir}/ocaml/curl/*.mli
87 %defattr(644,root,root,755)
90 %{_libdir}/ocaml/curl/*.a
91 %{_libdir}/ocaml/curl/*.o
92 %{_libdir}/ocaml/curl/*.cmx
93 %{_libdir}/ocaml/curl/*.cmxa
95 %{_libdir}/ocaml/curl/*.mli