]>
Commit | Line | Data |
---|---|---|
26de232b ER |
1 | # |
2 | # Conditional build: | |
6131789c | 3 | %bcond_without ocaml_opt # native optimized binaries (bytecode is always built) |
9781d077 | 4 | |
6131789c JB |
5 | # not yet available on x32 (ocaml 4.02.1), update when upstream will support it |
6 | %ifnarch %{ix86} %{x8664} %{arm} aarch64 ppc sparc sparcv9 | |
9781d077 JR |
7 | %undefine with_ocaml_opt |
8 | %endif | |
26de232b ER |
9 | |
10 | %define debug_package %{nil} | |
6131789c | 11 | |
26de232b | 12 | Summary: OCaml Curl library (ocurl) |
0acf091f | 13 | Summary(pl.UTF-8): Biblioteka Curl dla OCamla (ocurl) |
6131789c | 14 | Name: ocaml-curl |
e88cf738 | 15 | Version: 0.9.1 |
0680142d | 16 | Release: 4 |
26de232b ER |
17 | License: MIT |
18 | Group: Libraries | |
e88cf738 JR |
19 | Source0: https://github.com/ygrek/ocurl/releases/download/%{version}/ocurl-%{version}.tar.gz |
20 | # Source0-md5: 1ff6b12803fa0c6e9a4358dd29b83910 | |
9781d077 | 21 | Patch0: ocaml_opt.patch |
6131789c | 22 | Patch1: %{name}-sh.patch |
56573ec9 | 23 | URL: http://ocurl.forge.ocamlcore.org/ |
6131789c JB |
24 | BuildRequires: autoconf >= 2.50 |
25 | BuildRequires: curl-devel >= 7.28.0 | |
26de232b ER |
26 | BuildRequires: gawk |
27 | BuildRequires: ocaml >= 3.10.0-7 | |
28 | BuildRequires: ocaml-findlib-devel | |
0680142d JR |
29 | BuildRequires: ocaml-lwt-devel |
30 | BuildRequires: ocaml-lwt-ppx-devel | |
6131789c | 31 | BuildRequires: pkgconfig |
c81abe36 | 32 | # Explicitly require Curl (fixes RHBZ#711261). Since ocaml-curl uses |
26de232b | 33 | # -custom rather than ocamlmklib, automatic detection is infeasible. |
6131789c | 34 | Requires: curl-devel >= 7.28.0 |
c63f57ee | 35 | %requires_eq ocaml-runtime |
c81abe36 | 36 | ExcludeArch: sparc64 s390 s390x |
26de232b ER |
37 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) |
38 | ||
39 | %description | |
40 | The Ocaml Curl Library (Ocurl) is an interface library for the | |
41 | programming language Ocaml to the networking library libcurl. | |
42 | ||
0acf091f JB |
43 | %description -l pl.UTF-8 |
44 | Biblioteka Ocaml Curl (Ocurl) to biblioteka interfejsu języka | |
45 | programowania Ocaml do biblioteki sieciowe libcurl. | |
46 | ||
56573ec9 | 47 | %package devel |
0acf091f JB |
48 | Summary: OCaml Curl library (ocurl) - development part |
49 | Summary(pl.UTF-8): Biblioteka Curl dla OCamla (ocurl) - część programistyczna | |
26de232b ER |
50 | Group: Development/Libraries |
51 | Requires: %{name} = %{version}-%{release} | |
52 | ||
56573ec9 | 53 | %description devel |
0acf091f JB |
54 | This package contains libraries and signature files for developing |
55 | applications that use OCaml Curl library. | |
56 | ||
57 | %description devel -l pl.UTF-8 | |
58 | Ten pakiet zawiera biblioteki i pliki sygnatur do tworzenia aplikacji | |
59 | z użyciem biblioteki OCamla Curl. | |
26de232b | 60 | |
2da40ede JB |
61 | %package lwt |
62 | Summary: Lwt support for OCaml Curl library | |
63 | Summary(pl.UTF-8): Obsługa Lwt do biblioteki OCamla Curl | |
64 | Group: Libraries | |
65 | Requires: %{name} = %{version}-%{release} | |
66 | Requires: ocaml-lwt | |
67 | ||
68 | %description lwt | |
69 | Lwt support for OCaml Curl library. | |
70 | ||
71 | %description lwt -l pl.UTF-8 | |
72 | Obsługa Lwt do biblioteki OCamla Curl. | |
73 | ||
74 | %package lwt-devel | |
75 | Summary: Lwt support for OCaml Curl library - development part | |
76 | Summary(pl.UTF-8): Obsługa Lwt do biblioteki OCamla Curl - część programistyczna | |
77 | Group: Development/Libraries | |
78 | Requires: %{name}-devel = %{version}-%{release} | |
79 | Requires: %{name}-lwt = %{version}-%{release} | |
80 | Requires: ocaml-lwt-devel | |
81 | ||
82 | %description lwt-devel | |
83 | This package contains libraries and signature files for developing | |
84 | applications that use OCaml curl-lwt library. | |
85 | ||
86 | %description lwt-devel -l pl.UTF-8 | |
87 | Ten pakiet zawiera biblioteki i pliki sygnatur do tworzenia aplikacji | |
88 | z użyciem biblioteki OCamla curl-lwt. | |
89 | ||
26de232b | 90 | %prep |
f6f0b5de | 91 | %setup -q -n ocurl-%{version} |
9ed04161 | 92 | %patch0 -p1 |
6131789c | 93 | %patch1 -p1 |
26de232b ER |
94 | |
95 | %build | |
6131789c | 96 | %{__autoconf} |
56573ec9 | 97 | %configure |
5750614e | 98 | %{__make} -j1 all |
26de232b ER |
99 | |
100 | %install | |
101 | rm -rf $RPM_BUILD_ROOT | |
0acf091f | 102 | |
26de232b ER |
103 | export OCAMLFIND_DESTDIR=$RPM_BUILD_ROOT%{_libdir}/ocaml |
104 | install -d $OCAMLFIND_DESTDIR $OCAMLFIND_DESTDIR/stublibs | |
9781d077 | 105 | |
26de232b ER |
106 | %{__make} install \ |
107 | DESTDIR=$RPM_BUILD_ROOT | |
108 | ||
6131789c JB |
109 | # useless in rpm |
110 | %{__rm} $RPM_BUILD_ROOT%{_libdir}/ocaml/stublibs/*.so.owner | |
111 | ||
26de232b ER |
112 | # Make clean in the examples dir so our docs don't contain binaries. |
113 | %{__make} -C examples clean | |
aa521893 JB |
114 | install -d $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version} |
115 | cp -p examples/* $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version} | |
26de232b ER |
116 | |
117 | %clean | |
118 | rm -rf $RPM_BUILD_ROOT | |
119 | ||
120 | %files | |
121 | %defattr(644,root,root,755) | |
122 | %doc COPYING | |
a1673ef5 JR |
123 | %dir %{_libdir}/ocaml/curl |
124 | %{_libdir}/ocaml/curl/META | |
2da40ede | 125 | %{_libdir}/ocaml/curl/curl.cma |
90c843a1 | 126 | %if %{with ocaml_opt} |
2da40ede | 127 | %attr(755,root,root) %{_libdir}/ocaml/curl/curl.cmxs |
26de232b | 128 | %endif |
6131789c | 129 | %attr(755,root,root) %{_libdir}/ocaml/stublibs/dllcurl-helper.so |
26de232b ER |
130 | |
131 | %files devel | |
132 | %defattr(644,root,root,755) | |
6131789c | 133 | %{_libdir}/ocaml/curl/libcurl-helper.a |
2da40ede JB |
134 | %{_libdir}/ocaml/curl/curl.cmi |
135 | %{_libdir}/ocaml/curl/curl.cmt | |
136 | %{_libdir}/ocaml/curl/curl.cmti | |
137 | %{_libdir}/ocaml/curl/curl.mli | |
9781d077 | 138 | %if %{with ocaml_opt} |
2da40ede JB |
139 | %{_libdir}/ocaml/curl/curl.a |
140 | %{_libdir}/ocaml/curl/curl.cmx | |
141 | %{_libdir}/ocaml/curl/curl.cmxa | |
26de232b | 142 | %endif |
aa521893 | 143 | %{_examplesdir}/%{name}-%{version} |
2da40ede JB |
144 | |
145 | %files lwt | |
146 | %defattr(644,root,root,755) | |
147 | # without ocaml_opt: just stub package to collect dependencies | |
148 | %if %{with ocaml_opt} | |
149 | %attr(755,root,root) %{_libdir}/ocaml/curl/curl_lwt.cmxs | |
150 | %endif | |
151 | ||
152 | %files lwt-devel | |
153 | %defattr(644,root,root,755) | |
154 | %{_libdir}/ocaml/curl/curl_lwt.cmi | |
155 | %{_libdir}/ocaml/curl/curl_lwt.cmo | |
156 | %{_libdir}/ocaml/curl/curl_lwt.cmt | |
157 | %{_libdir}/ocaml/curl/curl_lwt.cmti | |
158 | %{_libdir}/ocaml/curl/curl_lwt.mli | |
159 | %if %{with ocaml_opt} | |
160 | %{_libdir}/ocaml/curl/curl_lwt.cmx | |
161 | %{_libdir}/ocaml/curl/curl_lwt.o | |
162 | %endif |