]> git.pld-linux.org Git - packages/ocaml-curl.git/blame - ocaml-curl.spec
- updated BRs and opt patch, rel 4
[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)
c81abe36 13Name: ocaml-%{pkgname}
e88cf738 14Version: 0.9.1
0680142d 15Release: 4
26de232b
ER
16License: MIT
17Group: Libraries
e88cf738
JR
18Source0: https://github.com/ygrek/ocurl/releases/download/%{version}/ocurl-%{version}.tar.gz
19# Source0-md5: 1ff6b12803fa0c6e9a4358dd29b83910
9781d077 20Patch0: ocaml_opt.patch
56573ec9 21URL: http://ocurl.forge.ocamlcore.org/
26de232b
ER
22BuildRequires: curl-devel >= 7.12.0
23BuildRequires: gawk
24BuildRequires: ocaml >= 3.10.0-7
25BuildRequires: ocaml-findlib-devel
0680142d
JR
26BuildRequires: ocaml-lwt-devel
27BuildRequires: ocaml-lwt-ppx-devel
c81abe36 28# Explicitly require Curl (fixes RHBZ#711261). Since ocaml-curl uses
26de232b
ER
29# -custom rather than ocamlmklib, automatic detection is infeasible.
30Requires: curl-devel >= 7.12.0
c63f57ee 31%requires_eq ocaml-runtime
c81abe36 32ExcludeArch: sparc64 s390 s390x
26de232b
ER
33BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
34
35%description
36The Ocaml Curl Library (Ocurl) is an interface library for the
37programming language Ocaml to the networking library libcurl.
38
56573ec9 39%package devel
26de232b
ER
40Summary: Development files for %{name}
41Group: Development/Libraries
42Requires: %{name} = %{version}-%{release}
43
56573ec9 44%description devel
26de232b
ER
45The %{name}-devel package contains libraries and signature files for
46developing applications that use %{name}.
47
48%prep
f6f0b5de 49%setup -q -n ocurl-%{version}
9ed04161 50%patch0 -p1
26de232b
ER
51
52%build
56573ec9 53%configure
5750614e 54%{__make} -j1 all
26de232b
ER
55
56%install
57rm -rf $RPM_BUILD_ROOT
58export OCAMLFIND_DESTDIR=$RPM_BUILD_ROOT%{_libdir}/ocaml
59install -d $OCAMLFIND_DESTDIR $OCAMLFIND_DESTDIR/stublibs
9781d077 60
26de232b
ER
61%{__make} install \
62 DESTDIR=$RPM_BUILD_ROOT
63
64# Install curl.mli
65cp -p curl.mli $OCAMLFIND_DESTDIR/curl
66
9ed04161 67cat > $RPM_BUILD_ROOT%{_libdir}/ocaml/curl/META <<EOF
4790749d
ER
68requires = ""
69version = "%{version}"
70directory = "+curl"
71archive(byte) = "curl.cma"
72archive(native) = "curl.cmxa"
73linkopts = ""
74EOF
75
26de232b
ER
76# Make clean in the examples dir so our docs don't contain binaries.
77%{__make} -C examples clean
78
79%clean
80rm -rf $RPM_BUILD_ROOT
81
82%files
83%defattr(644,root,root,755)
84%doc COPYING
a1673ef5
JR
85%dir %{_libdir}/ocaml/curl
86%{_libdir}/ocaml/curl/META
56573ec9
ER
87%attr(755,root,root) %{_libdir}/ocaml/stublibs/dllcurl-helper.so
88%{_libdir}/ocaml/stublibs/dllcurl-helper.so.owner
a1673ef5 89%{_libdir}/ocaml/curl/*.cma
90c843a1 90%if %{with ocaml_opt}
a1673ef5 91%attr(755,root,root) %{_libdir}/ocaml/curl/*.cmxs
26de232b 92%endif
26de232b
ER
93
94%files devel
95%defattr(644,root,root,755)
96%doc examples/*
90c843a1 97%{_libdir}/ocaml/curl/*.a
a1673ef5 98%{_libdir}/ocaml/curl/*.cmi
0680142d 99%{_libdir}/ocaml/curl/*.cmo
a1673ef5
JR
100%{_libdir}/ocaml/curl/*.cmt
101%{_libdir}/ocaml/curl/*.cmti
9781d077 102%if %{with ocaml_opt}
a1673ef5 103%{_libdir}/ocaml/curl/*.cmx
26de232b
ER
104%{_libdir}/ocaml/curl/*.cmxa
105%endif
106%{_libdir}/ocaml/curl/*.mli
This page took 0.213354 seconds and 4 git commands to generate.