]> git.pld-linux.org Git - packages/ocaml-curl.git/blame_incremental - ocaml-curl.spec
- pl
[packages/ocaml-curl.git] / ocaml-curl.spec
... / ...
CommitLineData
1#
2# Conditional build:
3%bcond_without ocaml_opt # skip building native optimized binaries (bytecode is always built)
4
5# not yet available on x32 (ocaml 4.02.1), remove when upstream will support it
6%ifnarch %{ix86} %{x8664} arm aarch64 ppc sparc sparcv9
7%undefine with_ocaml_opt
8%endif
9
10%define debug_package %{nil}
11%define pkgname curl
12Summary: OCaml Curl library (ocurl)
13Summary(pl.UTF-8): Biblioteka Curl dla OCamla (ocurl)
14Name: ocaml-%{pkgname}
15Version: 0.9.1
16Release: 4
17License: MIT
18Group: Libraries
19Source0: https://github.com/ygrek/ocurl/releases/download/%{version}/ocurl-%{version}.tar.gz
20# Source0-md5: 1ff6b12803fa0c6e9a4358dd29b83910
21Patch0: ocaml_opt.patch
22URL: http://ocurl.forge.ocamlcore.org/
23BuildRequires: curl-devel >= 7.12.0
24BuildRequires: gawk
25BuildRequires: ocaml >= 3.10.0-7
26BuildRequires: ocaml-findlib-devel
27BuildRequires: ocaml-lwt-devel
28BuildRequires: ocaml-lwt-ppx-devel
29# Explicitly require Curl (fixes RHBZ#711261). Since ocaml-curl uses
30# -custom rather than ocamlmklib, automatic detection is infeasible.
31Requires: curl-devel >= 7.12.0
32%requires_eq ocaml-runtime
33ExcludeArch: sparc64 s390 s390x
34BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
35
36%description
37The Ocaml Curl Library (Ocurl) is an interface library for the
38programming language Ocaml to the networking library libcurl.
39
40%description -l pl.UTF-8
41Biblioteka Ocaml Curl (Ocurl) to biblioteka interfejsu języka
42programowania Ocaml do biblioteki sieciowe libcurl.
43
44%package devel
45Summary: OCaml Curl library (ocurl) - development part
46Summary(pl.UTF-8): Biblioteka Curl dla OCamla (ocurl) - część programistyczna
47Group: Development/Libraries
48Requires: %{name} = %{version}-%{release}
49
50%description devel
51This package contains libraries and signature files for developing
52applications that use OCaml Curl library.
53
54%description devel -l pl.UTF-8
55Ten pakiet zawiera biblioteki i pliki sygnatur do tworzenia aplikacji
56z użyciem biblioteki OCamla Curl.
57
58%prep
59%setup -q -n ocurl-%{version}
60%patch0 -p1
61
62%build
63%configure
64%{__make} -j1 all
65
66%install
67rm -rf $RPM_BUILD_ROOT
68
69export OCAMLFIND_DESTDIR=$RPM_BUILD_ROOT%{_libdir}/ocaml
70install -d $OCAMLFIND_DESTDIR $OCAMLFIND_DESTDIR/stublibs
71
72%{__make} install \
73 DESTDIR=$RPM_BUILD_ROOT
74
75# Install curl.mli
76cp -p curl.mli $OCAMLFIND_DESTDIR/curl
77
78cat > $RPM_BUILD_ROOT%{_libdir}/ocaml/curl/META <<EOF
79requires = ""
80version = "%{version}"
81directory = "+curl"
82archive(byte) = "curl.cma"
83archive(native) = "curl.cmxa"
84linkopts = ""
85EOF
86
87# Make clean in the examples dir so our docs don't contain binaries.
88%{__make} -C examples clean
89
90%clean
91rm -rf $RPM_BUILD_ROOT
92
93%files
94%defattr(644,root,root,755)
95%doc COPYING
96%dir %{_libdir}/ocaml/curl
97%{_libdir}/ocaml/curl/META
98%attr(755,root,root) %{_libdir}/ocaml/stublibs/dllcurl-helper.so
99%{_libdir}/ocaml/stublibs/dllcurl-helper.so.owner
100%{_libdir}/ocaml/curl/*.cma
101%if %{with ocaml_opt}
102%attr(755,root,root) %{_libdir}/ocaml/curl/*.cmxs
103%endif
104
105%files devel
106%defattr(644,root,root,755)
107%doc examples/*
108%{_libdir}/ocaml/curl/*.a
109%{_libdir}/ocaml/curl/*.cmi
110%{_libdir}/ocaml/curl/*.cmo
111%{_libdir}/ocaml/curl/*.cmt
112%{_libdir}/ocaml/curl/*.cmti
113%if %{with ocaml_opt}
114%{_libdir}/ocaml/curl/*.cmx
115%{_libdir}/ocaml/curl/*.cmxa
116%endif
117%{_libdir}/ocaml/curl/*.mli
This page took 0.064903 seconds and 4 git commands to generate.