]> git.pld-linux.org Git - packages/ocaml-curl.git/blame_incremental - ocaml-curl.spec
- up to 0.7.1
[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: 1
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
23ExcludeArch: sparc64 s390 s390x
24BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
25
26%description
27The Ocaml Curl Library (Ocurl) is an interface library for the
28programming language Ocaml to the networking library libcurl.
29
30%package devel
31Summary: Development files for %{name}
32Group: Development/Libraries
33Requires: %{name} = %{version}-%{release}
34
35%description devel
36The %{name}-devel package contains libraries and signature files for
37developing applications that use %{name}.
38
39%prep
40%setup -q -n ocurl-%{version}
41
42%build
43%configure
44%{__make} -j1 all \
45%if %{with opt}
46 OCBYTE="ocamlc.opt -g" \
47 OCOPT="ocamlopt.opt -g"
48%endif
49
50%install
51rm -rf $RPM_BUILD_ROOT
52export OCAMLFIND_DESTDIR=$RPM_BUILD_ROOT%{_libdir}/ocaml
53install -d $OCAMLFIND_DESTDIR $OCAMLFIND_DESTDIR/stublibs
54%{__make} install \
55 DESTDIR=$RPM_BUILD_ROOT
56
57# Install curl.mli
58cp -p curl.mli $OCAMLFIND_DESTDIR/curl
59
60install -d $RPM_BUILD_ROOT%{_libdir}/ocaml/site-lib/curl
61cat > $RPM_BUILD_ROOT%{_libdir}/ocaml/site-lib/curl/META <<EOF
62requires = ""
63version = "%{version}"
64directory = "+curl"
65archive(byte) = "curl.cma"
66archive(native) = "curl.cmxa"
67linkopts = ""
68EOF
69
70# Make clean in the examples dir so our docs don't contain binaries.
71%{__make} -C examples clean
72
73%clean
74rm -rf $RPM_BUILD_ROOT
75
76%files
77%defattr(644,root,root,755)
78%doc COPYING
79%{_libdir}/ocaml/curl
80%attr(755,root,root) %{_libdir}/ocaml/stublibs/dllcurl-helper.so
81%{_libdir}/ocaml/stublibs/dllcurl-helper.so.owner
82%if %{with opt}
83%exclude %{_libdir}/ocaml/curl/*.a
84%exclude %{_libdir}/ocaml/curl/*.o
85%exclude %{_libdir}/ocaml/curl/*.cmx
86%exclude %{_libdir}/ocaml/curl/*.cmxa
87%endif
88%exclude %{_libdir}/ocaml/curl/*.mli
89
90%files devel
91%defattr(644,root,root,755)
92%doc examples/*
93%if %{with opt}
94%{_libdir}/ocaml/curl/*.a
95%{_libdir}/ocaml/curl/*.o
96%{_libdir}/ocaml/curl/*.cmx
97%{_libdir}/ocaml/curl/*.cmxa
98%endif
99%{_libdir}/ocaml/curl/*.mli
100%{_libdir}/ocaml/site-lib/curl
This page took 0.073228 seconds and 4 git commands to generate.