]> git.pld-linux.org Git - packages/ocaml-curl.git/blobdiff - ocaml-curl.spec
- fix install without ocaml opt build
[packages/ocaml-curl.git] / ocaml-curl.spec
index fe5981b9b8a8918bc62abc57e93fcba9c61ca199..383fa81f7a841022b75a48050af143159afaa054 100644 (file)
@@ -1,17 +1,23 @@
 #
 # Conditional build:
 #
 # 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}
 
 %define debug_package %{nil}
 %define        pkgname curl
 Summary:       OCaml Curl library (ocurl)
 Name:          ocaml-%{pkgname}
-Version:       0.6.0
-Release:       1
+Version:       0.7.1
+Release:       2
 License:       MIT
 Group:         Libraries
 License:       MIT
 Group:         Libraries
-Source0:       https://forge.ocamlcore.org/frs/download.php/1238/ocurl-%{version}.tar.gz
-# Source0-md5: 21575e86b390c6c182a8dee42e8db1f3
+Source0:       https://forge.ocamlcore.org/frs/download.php/1400/ocurl-%{version}.tar.gz
+# Source0-md5: d138fd78538ae3bd008d6e9c2993d240
+Patch0:                ocaml_opt.patch
 URL:           http://ocurl.forge.ocamlcore.org/
 BuildRequires: curl-devel >= 7.12.0
 BuildRequires: gawk
 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
 # 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)
 
 ExcludeArch:   sparc64 s390 s390x
 BuildRoot:     %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
 
@@ -38,11 +45,12 @@ developing applications that use %{name}.
 
 %prep
 %setup -q -n ocurl-%{version}
 
 %prep
 %setup -q -n ocurl-%{version}
+%patch0 -p1
 
 %build
 %configure
 %{__make} -j1 all \
 
 %build
 %configure
 %{__make} -j1 all \
-%if %{with opt}
+%if %{with ocaml_opt}
        OCBYTE="ocamlc.opt -g" \
        OCOPT="ocamlopt.opt -g"
 %endif
        OCBYTE="ocamlc.opt -g" \
        OCOPT="ocamlopt.opt -g"
 %endif
@@ -51,6 +59,7 @@ developing applications that use %{name}.
 rm -rf $RPM_BUILD_ROOT
 export OCAMLFIND_DESTDIR=$RPM_BUILD_ROOT%{_libdir}/ocaml
 install -d $OCAMLFIND_DESTDIR $OCAMLFIND_DESTDIR/stublibs
 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
 
 %{__make} install \
        DESTDIR=$RPM_BUILD_ROOT
 
@@ -79,7 +88,7 @@ rm -rf $RPM_BUILD_ROOT
 %{_libdir}/ocaml/curl
 %attr(755,root,root) %{_libdir}/ocaml/stublibs/dllcurl-helper.so
 %{_libdir}/ocaml/stublibs/dllcurl-helper.so.owner
 %{_libdir}/ocaml/curl
 %attr(755,root,root) %{_libdir}/ocaml/stublibs/dllcurl-helper.so
 %{_libdir}/ocaml/stublibs/dllcurl-helper.so.owner
-%if %{with opt}
+%if %{with ocaml_opt}
 %exclude %{_libdir}/ocaml/curl/*.a
 %exclude %{_libdir}/ocaml/curl/*.o
 %exclude %{_libdir}/ocaml/curl/*.cmx
 %exclude %{_libdir}/ocaml/curl/*.a
 %exclude %{_libdir}/ocaml/curl/*.o
 %exclude %{_libdir}/ocaml/curl/*.cmx
@@ -90,7 +99,7 @@ rm -rf $RPM_BUILD_ROOT
 %files devel
 %defattr(644,root,root,755)
 %doc examples/*
 %files devel
 %defattr(644,root,root,755)
 %doc examples/*
-%if %{with opt}
+%if %{with ocaml_opt}
 %{_libdir}/ocaml/curl/*.a
 %{_libdir}/ocaml/curl/*.o
 %{_libdir}/ocaml/curl/*.cmx
 %{_libdir}/ocaml/curl/*.a
 %{_libdir}/ocaml/curl/*.o
 %{_libdir}/ocaml/curl/*.cmx
This page took 0.0537 seconds and 4 git commands to generate.