]> git.pld-linux.org Git - packages/ocaml-curl.git/blame - ocaml-curl.spec
- strict ocaml deps
[packages/ocaml-curl.git] / ocaml-curl.spec
CommitLineData
26de232b
ER
1#
2# Conditional build:
56573ec9 3%bcond_with opt # build opt
26de232b
ER
4
5%define debug_package %{nil}
f6f0b5de 6%define pkgname curl
26de232b 7Summary: OCaml Curl library (ocurl)
c81abe36 8Name: ocaml-%{pkgname}
8fd8b94e 9Version: 0.7.1
c63f57ee 10Release: 2
26de232b
ER
11License: MIT
12Group: Libraries
8fd8b94e
JR
13Source0: https://forge.ocamlcore.org/frs/download.php/1400/ocurl-%{version}.tar.gz
14# Source0-md5: d138fd78538ae3bd008d6e9c2993d240
56573ec9 15URL: http://ocurl.forge.ocamlcore.org/
26de232b
ER
16BuildRequires: curl-devel >= 7.12.0
17BuildRequires: gawk
18BuildRequires: ocaml >= 3.10.0-7
19BuildRequires: ocaml-findlib-devel
c81abe36 20# Explicitly require Curl (fixes RHBZ#711261). Since ocaml-curl uses
26de232b
ER
21# -custom rather than ocamlmklib, automatic detection is infeasible.
22Requires: curl-devel >= 7.12.0
c63f57ee 23%requires_eq ocaml-runtime
c81abe36 24ExcludeArch: sparc64 s390 s390x
26de232b
ER
25BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
26
27%description
28The Ocaml Curl Library (Ocurl) is an interface library for the
29programming language Ocaml to the networking library libcurl.
30
56573ec9 31%package devel
26de232b
ER
32Summary: Development files for %{name}
33Group: Development/Libraries
34Requires: %{name} = %{version}-%{release}
35
56573ec9 36%description devel
26de232b
ER
37The %{name}-devel package contains libraries and signature files for
38developing applications that use %{name}.
39
40%prep
f6f0b5de 41%setup -q -n ocurl-%{version}
26de232b
ER
42
43%build
56573ec9 44%configure
26de232b
ER
45%{__make} -j1 all \
46%if %{with opt}
47 OCBYTE="ocamlc.opt -g" \
48 OCOPT="ocamlopt.opt -g"
49%endif
50
51%install
52rm -rf $RPM_BUILD_ROOT
53export OCAMLFIND_DESTDIR=$RPM_BUILD_ROOT%{_libdir}/ocaml
54install -d $OCAMLFIND_DESTDIR $OCAMLFIND_DESTDIR/stublibs
55%{__make} install \
56 DESTDIR=$RPM_BUILD_ROOT
57
58# Install curl.mli
59cp -p curl.mli $OCAMLFIND_DESTDIR/curl
60
4790749d
ER
61install -d $RPM_BUILD_ROOT%{_libdir}/ocaml/site-lib/curl
62cat > $RPM_BUILD_ROOT%{_libdir}/ocaml/site-lib/curl/META <<EOF
63requires = ""
64version = "%{version}"
65directory = "+curl"
66archive(byte) = "curl.cma"
67archive(native) = "curl.cmxa"
68linkopts = ""
69EOF
70
26de232b
ER
71# Make clean in the examples dir so our docs don't contain binaries.
72%{__make} -C examples clean
73
74%clean
75rm -rf $RPM_BUILD_ROOT
76
77%files
78%defattr(644,root,root,755)
79%doc COPYING
80%{_libdir}/ocaml/curl
56573ec9
ER
81%attr(755,root,root) %{_libdir}/ocaml/stublibs/dllcurl-helper.so
82%{_libdir}/ocaml/stublibs/dllcurl-helper.so.owner
26de232b
ER
83%if %{with opt}
84%exclude %{_libdir}/ocaml/curl/*.a
85%exclude %{_libdir}/ocaml/curl/*.o
86%exclude %{_libdir}/ocaml/curl/*.cmx
87%exclude %{_libdir}/ocaml/curl/*.cmxa
88%endif
89%exclude %{_libdir}/ocaml/curl/*.mli
90
91%files devel
92%defattr(644,root,root,755)
93%doc examples/*
94%if %{with opt}
95%{_libdir}/ocaml/curl/*.a
96%{_libdir}/ocaml/curl/*.o
97%{_libdir}/ocaml/curl/*.cmx
98%{_libdir}/ocaml/curl/*.cmxa
99%endif
100%{_libdir}/ocaml/curl/*.mli
4790749d 101%{_libdir}/ocaml/site-lib/curl
This page took 0.065141 seconds and 4 git commands to generate.