]> git.pld-linux.org Git - packages/ocaml-curl.git/blobdiff - ocaml-curl.spec
- updated URL, release 5
[packages/ocaml-curl.git] / ocaml-curl.spec
index 8d201d00371b3494d33c46542916e553abd2ea18..d621301e622f7c7a3d7371df64a4bb8263fdda62 100644 (file)
@@ -1,31 +1,38 @@
 #
 # Conditional build:
 #
 # Conditional build:
-%bcond_without ocaml_opt       # skip building native optimized binaries (bytecode is always built)
+%bcond_without ocaml_opt       # 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
+# not yet available on x32 (ocaml 4.02.1), update when upstream will support it
+%ifnarch %{ix86} %{x8664} %{arm} aarch64 ppc sparc sparcv9
 %undefine      with_ocaml_opt
 %endif
 
 %define debug_package %{nil}
 %undefine      with_ocaml_opt
 %endif
 
 %define debug_package %{nil}
-%define        pkgname curl
+
 Summary:       OCaml Curl library (ocurl)
 Summary:       OCaml Curl library (ocurl)
-Name:          ocaml-%{pkgname}
+Summary(pl.UTF-8):     Biblioteka Curl dla OCamla (ocurl)
+Name:          ocaml-curl
 Version:       0.9.1
 Version:       0.9.1
-Release:       2
+Release:       5
 License:       MIT
 Group:         Libraries
 License:       MIT
 Group:         Libraries
+#Source0Download: https://github.com/ygrek/ocurl/releases
 Source0:       https://github.com/ygrek/ocurl/releases/download/%{version}/ocurl-%{version}.tar.gz
 # Source0-md5: 1ff6b12803fa0c6e9a4358dd29b83910
 Patch0:                ocaml_opt.patch
 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
+Patch1:                %{name}-sh.patch
+URL:           https://ygrek.org/p/ocurl/
+BuildRequires: autoconf >= 2.50
+BuildRequires: curl-devel >= 7.28.0
 BuildRequires: gawk
 BuildRequires: ocaml >= 3.10.0-7
 BuildRequires: ocaml-findlib-devel
 BuildRequires: gawk
 BuildRequires: ocaml >= 3.10.0-7
 BuildRequires: ocaml-findlib-devel
+BuildRequires: ocaml-lwt-devel
+BuildRequires: ocaml-lwt-ppx-devel
+BuildRequires: pkgconfig
 # Explicitly require Curl (fixes RHBZ#711261). Since ocaml-curl uses
 # -custom rather than ocamlmklib, automatic detection is infeasible.
 # 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:      curl-devel >= 7.28.0
 %requires_eq   ocaml-runtime
 ExcludeArch:   sparc64 s390 s390x
 BuildRoot:     %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
 %requires_eq   ocaml-runtime
 ExcludeArch:   sparc64 s390 s390x
 BuildRoot:     %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
@@ -34,45 +41,79 @@ BuildRoot:  %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
 The Ocaml Curl Library (Ocurl) is an interface library for the
 programming language Ocaml to the networking library libcurl.
 
 The Ocaml Curl Library (Ocurl) is an interface library for the
 programming language Ocaml to the networking library libcurl.
 
+%description -l pl.UTF-8
+Biblioteka Ocaml Curl (Ocurl) to biblioteka interfejsu języka
+programowania Ocaml do biblioteki sieciowe libcurl.
+
 %package devel
 %package devel
-Summary:       Development files for %{name}
+Summary:       OCaml Curl library (ocurl) - development part
+Summary(pl.UTF-8):     Biblioteka Curl dla OCamla (ocurl) - część programistyczna
 Group:         Development/Libraries
 Requires:      %{name} = %{version}-%{release}
 
 %description devel
 Group:         Development/Libraries
 Requires:      %{name} = %{version}-%{release}
 
 %description devel
-The %{name}-devel package contains libraries and signature files for
-developing applications that use %{name}.
+This package contains libraries and signature files for developing
+applications that use OCaml Curl library.
+
+%description devel -l pl.UTF-8
+Ten pakiet zawiera biblioteki i pliki sygnatur do tworzenia aplikacji
+z użyciem biblioteki OCamla Curl.
+
+%package lwt
+Summary:       Lwt support for OCaml Curl library
+Summary(pl.UTF-8):     Obsługa Lwt do biblioteki OCamla Curl
+Group:         Libraries
+Requires:      %{name} = %{version}-%{release}
+Requires:      ocaml-lwt
+
+%description lwt
+Lwt support for OCaml Curl library.
+
+%description lwt -l pl.UTF-8
+Obsługa Lwt do biblioteki OCamla Curl.
+
+%package lwt-devel
+Summary:       Lwt support for OCaml Curl library - development part
+Summary(pl.UTF-8):     Obsługa Lwt do biblioteki OCamla Curl - część programistyczna
+Group:         Development/Libraries
+Requires:      %{name}-devel = %{version}-%{release}
+Requires:      %{name}-lwt = %{version}-%{release}
+Requires:      ocaml-lwt-devel
+
+%description lwt-devel
+This package contains libraries and signature files for developing
+applications that use OCaml curl-lwt library.
+
+%description lwt-devel -l pl.UTF-8
+Ten pakiet zawiera biblioteki i pliki sygnatur do tworzenia aplikacji
+z użyciem biblioteki OCamla curl-lwt.
 
 %prep
 %setup -q -n ocurl-%{version}
 %patch0 -p1
 
 %prep
 %setup -q -n ocurl-%{version}
 %patch0 -p1
+%patch1 -p1
 
 %build
 
 %build
+%{__autoconf}
 %configure
 %{__make} -j1 all
 
 %install
 rm -rf $RPM_BUILD_ROOT
 %configure
 %{__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
 
 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
-
-cat > $RPM_BUILD_ROOT%{_libdir}/ocaml/curl/META <<EOF
-requires = ""
-version = "%{version}"
-directory = "+curl"
-archive(byte) = "curl.cma"
-archive(native) = "curl.cmxa"
-linkopts = ""
-EOF
+# useless in rpm
+%{__rm} $RPM_BUILD_ROOT%{_libdir}/ocaml/stublibs/*.so.owner
 
 # Make clean in the examples dir so our docs don't contain binaries.
 %{__make} -C examples clean
 
 # Make clean in the examples dir so our docs don't contain binaries.
 %{__make} -C examples clean
+install -d $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version}
+cp -p examples/* $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version}
 
 %clean
 rm -rf $RPM_BUILD_ROOT
 
 %clean
 rm -rf $RPM_BUILD_ROOT
@@ -82,22 +123,41 @@ rm -rf $RPM_BUILD_ROOT
 %doc COPYING
 %dir %{_libdir}/ocaml/curl
 %{_libdir}/ocaml/curl/META
 %doc COPYING
 %dir %{_libdir}/ocaml/curl
 %{_libdir}/ocaml/curl/META
-%attr(755,root,root) %{_libdir}/ocaml/stublibs/dllcurl-helper.so
-%{_libdir}/ocaml/stublibs/dllcurl-helper.so.owner
+%{_libdir}/ocaml/curl/curl.cma
 %if %{with ocaml_opt}
 %if %{with ocaml_opt}
-%{_libdir}/ocaml/curl/*.cma
-%attr(755,root,root) %{_libdir}/ocaml/curl/*.cmxs
+%attr(755,root,root) %{_libdir}/ocaml/curl/curl.cmxs
 %endif
 %endif
+%attr(755,root,root) %{_libdir}/ocaml/stublibs/dllcurl-helper.so
 
 %files devel
 %defattr(644,root,root,755)
 
 %files devel
 %defattr(644,root,root,755)
-%doc examples/*
-%{_libdir}/ocaml/curl/*.cmi
-%{_libdir}/ocaml/curl/*.cmt
-%{_libdir}/ocaml/curl/*.cmti
+%{_libdir}/ocaml/curl/libcurl-helper.a
+%{_libdir}/ocaml/curl/curl.cmi
+%{_libdir}/ocaml/curl/curl.cmt
+%{_libdir}/ocaml/curl/curl.cmti
+%{_libdir}/ocaml/curl/curl.mli
+%if %{with ocaml_opt}
+%{_libdir}/ocaml/curl/curl.a
+%{_libdir}/ocaml/curl/curl.cmx
+%{_libdir}/ocaml/curl/curl.cmxa
+%endif
+%{_examplesdir}/%{name}-%{version}
+
+%files lwt
+%defattr(644,root,root,755)
+# without ocaml_opt: just stub package to collect dependencies
+%if %{with ocaml_opt}
+%attr(755,root,root) %{_libdir}/ocaml/curl/curl_lwt.cmxs
+%endif
+
+%files lwt-devel
+%defattr(644,root,root,755)
+%{_libdir}/ocaml/curl/curl_lwt.cmi
+%{_libdir}/ocaml/curl/curl_lwt.cmo
+%{_libdir}/ocaml/curl/curl_lwt.cmt
+%{_libdir}/ocaml/curl/curl_lwt.cmti
+%{_libdir}/ocaml/curl/curl_lwt.mli
 %if %{with ocaml_opt}
 %if %{with ocaml_opt}
-%{_libdir}/ocaml/curl/*.a
-%{_libdir}/ocaml/curl/*.cmx
-%{_libdir}/ocaml/curl/*.cmxa
+%{_libdir}/ocaml/curl/curl_lwt.cmx
+%{_libdir}/ocaml/curl/curl_lwt.o
 %endif
 %endif
-%{_libdir}/ocaml/curl/*.mli
This page took 0.080471 seconds and 4 git commands to generate.