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