]> git.pld-linux.org Git - packages/ocaml-curl.git/blame_incremental - ocaml-curl.spec
- strict ocaml deps
[packages/ocaml-curl.git] / ocaml-curl.spec
... / ...
CommitLineData
1#
2# Conditional build:
3%bcond_with opt # build opt
4
5%define debug_package %{nil}
6%define pkgname curl
7Summary: OCaml Curl library (ocurl)
8Name: ocaml-%{pkgname}
9Version: 0.7.1
10Release: 2
11License: MIT
12Group: Libraries
13Source0: https://forge.ocamlcore.org/frs/download.php/1400/ocurl-%{version}.tar.gz
14# Source0-md5: d138fd78538ae3bd008d6e9c2993d240
15URL: http://ocurl.forge.ocamlcore.org/
16BuildRequires: curl-devel >= 7.12.0
17BuildRequires: gawk
18BuildRequires: ocaml >= 3.10.0-7
19BuildRequires: ocaml-findlib-devel
20# Explicitly require Curl (fixes RHBZ#711261). Since ocaml-curl uses
21# -custom rather than ocamlmklib, automatic detection is infeasible.
22Requires: curl-devel >= 7.12.0
23%requires_eq ocaml-runtime
24ExcludeArch: sparc64 s390 s390x
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
31%package devel
32Summary: Development files for %{name}
33Group: Development/Libraries
34Requires: %{name} = %{version}-%{release}
35
36%description devel
37The %{name}-devel package contains libraries and signature files for
38developing applications that use %{name}.
39
40%prep
41%setup -q -n ocurl-%{version}
42
43%build
44%configure
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
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
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
81%attr(755,root,root) %{_libdir}/ocaml/stublibs/dllcurl-helper.so
82%{_libdir}/ocaml/stublibs/dllcurl-helper.so.owner
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
101%{_libdir}/ocaml/site-lib/curl
This page took 0.046525 seconds and 4 git commands to generate.