new, version 0.5.3
[packages/ocaml-curl.git] / ocaml-ocurl.spec
CommitLineData
26de232b
ER
1#
2# Conditional build:
3%bcond_without opt # build opt
4
5%define debug_package %{nil}
6Summary: OCaml Curl library (ocurl)
7Name: ocaml-curl
8Version: 0.5.3
9Release: 0.1
10License: MIT
11Group: Libraries
12Source0: http://downloads.sourceforge.net/ocurl/ocurl-%{version}.tgz
13Patch1: ocurl-0.5.3-include-o-cmx.patch
14URL: http://sourceforge.net/projects/ocurl
15BuildRequires: curl-devel >= 7.12.0
16BuildRequires: gawk
17BuildRequires: ocaml >= 3.10.0-7
18BuildRequires: ocaml-findlib-devel
19ExcludeArch: sparc64 s390 s390x
20# Explicitly require Curl (fixes #711261). Since ocaml-curl uses
21# -custom rather than ocamlmklib, automatic detection is infeasible.
22Requires: curl-devel >= 7.12.0
23BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
24
25%description
26The Ocaml Curl Library (Ocurl) is an interface library for the
27programming language Ocaml to the networking library libcurl.
28
29%package devel
30Summary: Development files for %{name}
31Group: Development/Libraries
32Requires: %{name} = %{version}-%{release}
33
34%description devel
35The %{name}-devel package contains libraries and signature files for
36developing applications that use %{name}.
37
38%prep
39%setup -qc
40mv ocurl/* .
41%patch1 -p1
42
43# Files in the archive have spurious +x mode.
44find -type f | xargs chmod 0644
45chmod 0755 configure install-sh
46
47%build
48%configure \
49 --with-findlib
50
51%{__make} -j1 all \
52%if %{with opt}
53 OCBYTE="ocamlc.opt -g" \
54 OCOPT="ocamlopt.opt -g"
55%endif
56
57%install
58rm -rf $RPM_BUILD_ROOT
59export OCAMLFIND_DESTDIR=$RPM_BUILD_ROOT%{_libdir}/ocaml
60install -d $OCAMLFIND_DESTDIR $OCAMLFIND_DESTDIR/stublibs
61%{__make} install \
62 DESTDIR=$RPM_BUILD_ROOT
63
64# Install curl.mli
65cp -p curl.mli $OCAMLFIND_DESTDIR/curl
66
67# Make clean in the examples dir so our docs don't contain binaries.
68%{__make} -C examples clean
69
70%clean
71rm -rf $RPM_BUILD_ROOT
72
73%files
74%defattr(644,root,root,755)
75%doc COPYING
76%{_libdir}/ocaml/curl
77%if %{with opt}
78%exclude %{_libdir}/ocaml/curl/*.a
79%exclude %{_libdir}/ocaml/curl/*.o
80%exclude %{_libdir}/ocaml/curl/*.cmx
81%exclude %{_libdir}/ocaml/curl/*.cmxa
82%endif
83%exclude %{_libdir}/ocaml/curl/*.mli
84
85%files devel
86%defattr(644,root,root,755)
87%doc examples/*
88%if %{with opt}
89%{_libdir}/ocaml/curl/*.a
90%{_libdir}/ocaml/curl/*.o
91%{_libdir}/ocaml/curl/*.cmx
92%{_libdir}/ocaml/curl/*.cmxa
93%endif
94%{_libdir}/ocaml/curl/*.mli
This page took 0.045337 seconds and 4 git commands to generate.