]> git.pld-linux.org Git - packages/ocaml-curl.git/blob - ocaml-curl.spec
- updated URL, release 5
[packages/ocaml-curl.git] / ocaml-curl.spec
1 #
2 # Conditional build:
3 %bcond_without  ocaml_opt       # native optimized binaries (bytecode is always built)
4
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
7 %undefine       with_ocaml_opt
8 %endif
9
10 %define debug_package %{nil}
11
12 Summary:        OCaml Curl library (ocurl)
13 Summary(pl.UTF-8):      Biblioteka Curl dla OCamla (ocurl)
14 Name:           ocaml-curl
15 Version:        0.9.1
16 Release:        5
17 License:        MIT
18 Group:          Libraries
19 #Source0Download: https://github.com/ygrek/ocurl/releases
20 Source0:        https://github.com/ygrek/ocurl/releases/download/%{version}/ocurl-%{version}.tar.gz
21 # Source0-md5:  1ff6b12803fa0c6e9a4358dd29b83910
22 Patch0:         ocaml_opt.patch
23 Patch1:         %{name}-sh.patch
24 URL:            https://ygrek.org/p/ocurl/
25 BuildRequires:  autoconf >= 2.50
26 BuildRequires:  curl-devel >= 7.28.0
27 BuildRequires:  gawk
28 BuildRequires:  ocaml >= 3.10.0-7
29 BuildRequires:  ocaml-findlib-devel
30 BuildRequires:  ocaml-lwt-devel
31 BuildRequires:  ocaml-lwt-ppx-devel
32 BuildRequires:  pkgconfig
33 # Explicitly require Curl (fixes RHBZ#711261). Since ocaml-curl uses
34 # -custom rather than ocamlmklib, automatic detection is infeasible.
35 Requires:       curl-devel >= 7.28.0
36 %requires_eq    ocaml-runtime
37 ExcludeArch:    sparc64 s390 s390x
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
44 %description -l pl.UTF-8
45 Biblioteka Ocaml Curl (Ocurl) to biblioteka interfejsu języka
46 programowania Ocaml do biblioteki sieciowe libcurl.
47
48 %package devel
49 Summary:        OCaml Curl library (ocurl) - development part
50 Summary(pl.UTF-8):      Biblioteka Curl dla OCamla (ocurl) - część programistyczna
51 Group:          Development/Libraries
52 Requires:       %{name} = %{version}-%{release}
53
54 %description devel
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.
61
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
91 %prep
92 %setup -q -n ocurl-%{version}
93 %patch0 -p1
94 %patch1 -p1
95
96 %build
97 %{__autoconf}
98 %configure
99 %{__make} -j1 all
100
101 %install
102 rm -rf $RPM_BUILD_ROOT
103
104 export OCAMLFIND_DESTDIR=$RPM_BUILD_ROOT%{_libdir}/ocaml
105 install -d $OCAMLFIND_DESTDIR $OCAMLFIND_DESTDIR/stublibs
106
107 %{__make} install \
108         DESTDIR=$RPM_BUILD_ROOT
109
110 # useless in rpm
111 %{__rm} $RPM_BUILD_ROOT%{_libdir}/ocaml/stublibs/*.so.owner
112
113 # Make clean in the examples dir so our docs don't contain binaries.
114 %{__make} -C examples clean
115 install -d $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version}
116 cp -p examples/* $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version}
117
118 %clean
119 rm -rf $RPM_BUILD_ROOT
120
121 %files
122 %defattr(644,root,root,755)
123 %doc COPYING
124 %dir %{_libdir}/ocaml/curl
125 %{_libdir}/ocaml/curl/META
126 %{_libdir}/ocaml/curl/curl.cma
127 %if %{with ocaml_opt}
128 %attr(755,root,root) %{_libdir}/ocaml/curl/curl.cmxs
129 %endif
130 %attr(755,root,root) %{_libdir}/ocaml/stublibs/dllcurl-helper.so
131
132 %files devel
133 %defattr(644,root,root,755)
134 %{_libdir}/ocaml/curl/libcurl-helper.a
135 %{_libdir}/ocaml/curl/curl.cmi
136 %{_libdir}/ocaml/curl/curl.cmt
137 %{_libdir}/ocaml/curl/curl.cmti
138 %{_libdir}/ocaml/curl/curl.mli
139 %if %{with ocaml_opt}
140 %{_libdir}/ocaml/curl/curl.a
141 %{_libdir}/ocaml/curl/curl.cmx
142 %{_libdir}/ocaml/curl/curl.cmxa
143 %endif
144 %{_examplesdir}/%{name}-%{version}
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
This page took 0.094783 seconds and 4 git commands to generate.