fix package name
[packages/ocaml-curl.git] / ocaml-ocurl.spec
1 #
2 # Conditional build:
3 %bcond_without  opt             # build opt
4
5 %define debug_package %{nil}
6 %define pkgname ocurl
7 Summary:        OCaml Curl library (ocurl)
8 Name:           ocaml-%{pkgname}
9 Version:        0.5.3
10 Release:        1
11 License:        MIT
12 Group:          Libraries
13 Source0:        http://downloads.sourceforge.net/ocurl/%{pkgname}-%{version}.tgz
14 Patch1:         ocurl-0.5.3-include-o-cmx.patch
15 URL:            http://sourceforge.net/projects/ocurl
16 BuildRequires:  curl-devel >= 7.12.0
17 BuildRequires:  gawk
18 BuildRequires:  ocaml >= 3.10.0-7
19 BuildRequires:  ocaml-findlib-devel
20 # Explicitly require Curl (fixes RHBZ#711261). Since ocaml-curl uses
21 # -custom rather than ocamlmklib, automatic detection is infeasible.
22 Requires:       curl-devel >= 7.12.0
23 ExcludeArch:    sparc64 s390 s390x
24 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
25
26 %description
27 The Ocaml Curl Library (Ocurl) is an interface library for the
28 programming language Ocaml to the networking library libcurl.
29
30 %package        devel
31 Summary:        Development files for %{name}
32 Group:          Development/Libraries
33 Requires:       %{name} = %{version}-%{release}
34
35 %description    devel
36 The %{name}-devel package contains libraries and signature files for
37 developing applications that use %{name}.
38
39 %prep
40 %setup -qc
41 mv ocurl/* .
42 %patch1 -p1
43
44 # Files in the archive have spurious +x mode.
45 find -type f | xargs chmod 0644
46 chmod 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
59 rm -rf $RPM_BUILD_ROOT
60 export OCAMLFIND_DESTDIR=$RPM_BUILD_ROOT%{_libdir}/ocaml
61 install -d $OCAMLFIND_DESTDIR $OCAMLFIND_DESTDIR/stublibs
62 %{__make} install \
63         DESTDIR=$RPM_BUILD_ROOT
64
65 # Install curl.mli
66 cp -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
72 rm -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.035367 seconds and 3 git commands to generate.