3 %bcond_with opt # build opt
5 %define debug_package %{nil}
7 Summary: OCaml Curl library (ocurl)
13 Source0: https://forge.ocamlcore.org/frs/download.php/1238/ocurl-%{version}.tar.gz
14 # Source0-md5: 21575e86b390c6c182a8dee42e8db1f3
15 URL: http://ocurl.forge.ocamlcore.org/
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}.
40 %setup -q -n ocurl-%{version}
46 OCBYTE="ocamlc.opt -g" \
47 OCOPT="ocamlopt.opt -g"
51 rm -rf $RPM_BUILD_ROOT
52 export OCAMLFIND_DESTDIR=$RPM_BUILD_ROOT%{_libdir}/ocaml
53 install -d $OCAMLFIND_DESTDIR $OCAMLFIND_DESTDIR/stublibs
55 DESTDIR=$RPM_BUILD_ROOT
58 cp -p curl.mli $OCAMLFIND_DESTDIR/curl
60 install -d $RPM_BUILD_ROOT%{_libdir}/ocaml/site-lib/curl
61 cat > $RPM_BUILD_ROOT%{_libdir}/ocaml/site-lib/curl/META <<EOF
63 version = "%{version}"
65 archive(byte) = "curl.cma"
66 archive(native) = "curl.cmxa"
70 # Make clean in the examples dir so our docs don't contain binaries.
71 %{__make} -C examples clean
74 rm -rf $RPM_BUILD_ROOT
77 %defattr(644,root,root,755)
80 %attr(755,root,root) %{_libdir}/ocaml/stublibs/dllcurl-helper.so
81 %{_libdir}/ocaml/stublibs/dllcurl-helper.so.owner
83 %exclude %{_libdir}/ocaml/curl/*.a
84 %exclude %{_libdir}/ocaml/curl/*.o
85 %exclude %{_libdir}/ocaml/curl/*.cmx
86 %exclude %{_libdir}/ocaml/curl/*.cmxa
88 %exclude %{_libdir}/ocaml/curl/*.mli
91 %defattr(644,root,root,755)
94 %{_libdir}/ocaml/curl/*.a
95 %{_libdir}/ocaml/curl/*.o
96 %{_libdir}/ocaml/curl/*.cmx
97 %{_libdir}/ocaml/curl/*.cmxa
99 %{_libdir}/ocaml/curl/*.mli
100 %{_libdir}/ocaml/site-lib/curl