fix package name
[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}
c81abe36 6%define pkgname ocurl
26de232b 7Summary: OCaml Curl library (ocurl)
c81abe36 8Name: ocaml-%{pkgname}
26de232b 9Version: 0.5.3
c81abe36 10Release: 1
26de232b
ER
11License: MIT
12Group: Libraries
c81abe36 13Source0: http://downloads.sourceforge.net/ocurl/%{pkgname}-%{version}.tgz
26de232b
ER
14Patch1: ocurl-0.5.3-include-o-cmx.patch
15URL: http://sourceforge.net/projects/ocurl
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
c81abe36 23ExcludeArch: sparc64 s390 s390x
26de232b
ER
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 -qc
41mv ocurl/* .
42%patch1 -p1
43
44# Files in the archive have spurious +x mode.
45find -type f | xargs chmod 0644
46chmod 0755 configure install-sh
47
48%build
49%configure \
50 --with-findlib
51
52%{__make} -j1 all \
53%if %{with opt}
54 OCBYTE="ocamlc.opt -g" \
55 OCOPT="ocamlopt.opt -g"
56%endif
57
58%install
59rm -rf $RPM_BUILD_ROOT
60export OCAMLFIND_DESTDIR=$RPM_BUILD_ROOT%{_libdir}/ocaml
61install -d $OCAMLFIND_DESTDIR $OCAMLFIND_DESTDIR/stublibs
62%{__make} install \
63 DESTDIR=$RPM_BUILD_ROOT
64
65# Install curl.mli
66cp -p curl.mli $OCAMLFIND_DESTDIR/curl
67
68# Make clean in the examples dir so our docs don't contain binaries.
69%{__make} -C examples clean
70
71%clean
72rm -rf $RPM_BUILD_ROOT
73
74%files
75%defattr(644,root,root,755)
76%doc COPYING
77%{_libdir}/ocaml/curl
78%if %{with opt}
79%exclude %{_libdir}/ocaml/curl/*.a
80%exclude %{_libdir}/ocaml/curl/*.o
81%exclude %{_libdir}/ocaml/curl/*.cmx
82%exclude %{_libdir}/ocaml/curl/*.cmxa
83%endif
84%exclude %{_libdir}/ocaml/curl/*.mli
85
86%files devel
87%defattr(644,root,root,755)
88%doc examples/*
89%if %{with opt}
90%{_libdir}/ocaml/curl/*.a
91%{_libdir}/ocaml/curl/*.o
92%{_libdir}/ocaml/curl/*.cmx
93%{_libdir}/ocaml/curl/*.cmxa
94%endif
95%{_libdir}/ocaml/curl/*.mli
This page took 0.042842 seconds and 4 git commands to generate.