]> git.pld-linux.org Git - packages/ocaml-curl.git/blame - ocaml-curl.spec
- pl
[packages/ocaml-curl.git] / ocaml-curl.spec
CommitLineData
26de232b
ER
1#
2# Conditional build:
9781d077
JR
3%bcond_without ocaml_opt # skip building native optimized binaries (bytecode is always built)
4
5# not yet available on x32 (ocaml 4.02.1), remove when upstream will support it
6%ifnarch %{ix86} %{x8664} arm aarch64 ppc sparc sparcv9
7%undefine with_ocaml_opt
8%endif
26de232b
ER
9
10%define debug_package %{nil}
f6f0b5de 11%define pkgname curl
26de232b 12Summary: OCaml Curl library (ocurl)
0acf091f 13Summary(pl.UTF-8): Biblioteka Curl dla OCamla (ocurl)
c81abe36 14Name: ocaml-%{pkgname}
e88cf738 15Version: 0.9.1
0680142d 16Release: 4
26de232b
ER
17License: MIT
18Group: Libraries
e88cf738
JR
19Source0: https://github.com/ygrek/ocurl/releases/download/%{version}/ocurl-%{version}.tar.gz
20# Source0-md5: 1ff6b12803fa0c6e9a4358dd29b83910
9781d077 21Patch0: ocaml_opt.patch
56573ec9 22URL: http://ocurl.forge.ocamlcore.org/
26de232b
ER
23BuildRequires: curl-devel >= 7.12.0
24BuildRequires: gawk
25BuildRequires: ocaml >= 3.10.0-7
26BuildRequires: ocaml-findlib-devel
0680142d
JR
27BuildRequires: ocaml-lwt-devel
28BuildRequires: ocaml-lwt-ppx-devel
c81abe36 29# Explicitly require Curl (fixes RHBZ#711261). Since ocaml-curl uses
26de232b
ER
30# -custom rather than ocamlmklib, automatic detection is infeasible.
31Requires: curl-devel >= 7.12.0
c63f57ee 32%requires_eq ocaml-runtime
c81abe36 33ExcludeArch: sparc64 s390 s390x
26de232b
ER
34BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
35
36%description
37The Ocaml Curl Library (Ocurl) is an interface library for the
38programming language Ocaml to the networking library libcurl.
39
0acf091f
JB
40%description -l pl.UTF-8
41Biblioteka Ocaml Curl (Ocurl) to biblioteka interfejsu języka
42programowania Ocaml do biblioteki sieciowe libcurl.
43
56573ec9 44%package devel
0acf091f
JB
45Summary: OCaml Curl library (ocurl) - development part
46Summary(pl.UTF-8): Biblioteka Curl dla OCamla (ocurl) - część programistyczna
26de232b
ER
47Group: Development/Libraries
48Requires: %{name} = %{version}-%{release}
49
56573ec9 50%description devel
0acf091f
JB
51This package contains libraries and signature files for developing
52applications that use OCaml Curl library.
53
54%description devel -l pl.UTF-8
55Ten pakiet zawiera biblioteki i pliki sygnatur do tworzenia aplikacji
56z użyciem biblioteki OCamla Curl.
26de232b
ER
57
58%prep
f6f0b5de 59%setup -q -n ocurl-%{version}
9ed04161 60%patch0 -p1
26de232b
ER
61
62%build
56573ec9 63%configure
5750614e 64%{__make} -j1 all
26de232b
ER
65
66%install
67rm -rf $RPM_BUILD_ROOT
0acf091f 68
26de232b
ER
69export OCAMLFIND_DESTDIR=$RPM_BUILD_ROOT%{_libdir}/ocaml
70install -d $OCAMLFIND_DESTDIR $OCAMLFIND_DESTDIR/stublibs
9781d077 71
26de232b
ER
72%{__make} install \
73 DESTDIR=$RPM_BUILD_ROOT
74
75# Install curl.mli
76cp -p curl.mli $OCAMLFIND_DESTDIR/curl
77
9ed04161 78cat > $RPM_BUILD_ROOT%{_libdir}/ocaml/curl/META <<EOF
4790749d
ER
79requires = ""
80version = "%{version}"
81directory = "+curl"
82archive(byte) = "curl.cma"
83archive(native) = "curl.cmxa"
84linkopts = ""
85EOF
86
26de232b
ER
87# Make clean in the examples dir so our docs don't contain binaries.
88%{__make} -C examples clean
89
90%clean
91rm -rf $RPM_BUILD_ROOT
92
93%files
94%defattr(644,root,root,755)
95%doc COPYING
a1673ef5
JR
96%dir %{_libdir}/ocaml/curl
97%{_libdir}/ocaml/curl/META
56573ec9
ER
98%attr(755,root,root) %{_libdir}/ocaml/stublibs/dllcurl-helper.so
99%{_libdir}/ocaml/stublibs/dllcurl-helper.so.owner
a1673ef5 100%{_libdir}/ocaml/curl/*.cma
90c843a1 101%if %{with ocaml_opt}
a1673ef5 102%attr(755,root,root) %{_libdir}/ocaml/curl/*.cmxs
26de232b 103%endif
26de232b
ER
104
105%files devel
106%defattr(644,root,root,755)
107%doc examples/*
90c843a1 108%{_libdir}/ocaml/curl/*.a
a1673ef5 109%{_libdir}/ocaml/curl/*.cmi
0680142d 110%{_libdir}/ocaml/curl/*.cmo
a1673ef5
JR
111%{_libdir}/ocaml/curl/*.cmt
112%{_libdir}/ocaml/curl/*.cmti
9781d077 113%if %{with ocaml_opt}
a1673ef5 114%{_libdir}/ocaml/curl/*.cmx
26de232b
ER
115%{_libdir}/ocaml/curl/*.cmxa
116%endif
117%{_libdir}/ocaml/curl/*.mli
This page took 0.102381 seconds and 4 git commands to generate.