X-Git-Url: http://git.pld-linux.org/?p=packages%2Focaml-curl.git;a=blobdiff_plain;f=ocaml-curl.spec;h=355d4eff29d36ac0891aa8b1d27d4f67ee07889a;hp=7133b8f573e69be06c5329c1c8397c314af66a9c;hb=9ed041617ad24ff2bdda905b637b98b35fc538f4;hpb=d878cf67ed47fdd882a5610de7a426255709476b diff --git a/ocaml-curl.spec b/ocaml-curl.spec index 7133b8f..355d4ef 100644 --- a/ocaml-curl.spec +++ b/ocaml-curl.spec @@ -1,17 +1,23 @@ # # Conditional build: -%bcond_with opt # build opt +%bcond_without ocaml_opt # skip building native optimized binaries (bytecode is always built) + +# not yet available on x32 (ocaml 4.02.1), remove when upstream will support it +%ifnarch %{ix86} %{x8664} arm aarch64 ppc sparc sparcv9 +%undefine with_ocaml_opt +%endif %define debug_package %{nil} %define pkgname curl Summary: OCaml Curl library (ocurl) Name: ocaml-%{pkgname} -Version: 0.6.1 +Version: 0.9.1 Release: 1 License: MIT Group: Libraries -Source0: https://forge.ocamlcore.org/frs/download.php/1374/ocurl-%{version}.tar.gz -# Source0-md5: 637336f41eb047b246e30a4c3caddc94 +Source0: https://github.com/ygrek/ocurl/releases/download/%{version}/ocurl-%{version}.tar.gz +# Source0-md5: 1ff6b12803fa0c6e9a4358dd29b83910 +Patch0: ocaml_opt.patch URL: http://ocurl.forge.ocamlcore.org/ BuildRequires: curl-devel >= 7.12.0 BuildRequires: gawk @@ -20,6 +26,7 @@ BuildRequires: ocaml-findlib-devel # Explicitly require Curl (fixes RHBZ#711261). Since ocaml-curl uses # -custom rather than ocamlmklib, automatic detection is infeasible. Requires: curl-devel >= 7.12.0 +%requires_eq ocaml-runtime ExcludeArch: sparc64 s390 s390x BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) @@ -38,27 +45,24 @@ developing applications that use %{name}. %prep %setup -q -n ocurl-%{version} +%patch0 -p1 %build %configure -%{__make} -j1 all \ -%if %{with opt} - OCBYTE="ocamlc.opt -g" \ - OCOPT="ocamlopt.opt -g" -%endif +%{__make} -j1 all %install rm -rf $RPM_BUILD_ROOT export OCAMLFIND_DESTDIR=$RPM_BUILD_ROOT%{_libdir}/ocaml install -d $OCAMLFIND_DESTDIR $OCAMLFIND_DESTDIR/stublibs + %{__make} install \ DESTDIR=$RPM_BUILD_ROOT # Install curl.mli cp -p curl.mli $OCAMLFIND_DESTDIR/curl -install -d $RPM_BUILD_ROOT%{_libdir}/ocaml/site-lib/curl -cat > $RPM_BUILD_ROOT%{_libdir}/ocaml/site-lib/curl/META < $RPM_BUILD_ROOT%{_libdir}/ocaml/curl/META <