]> git.pld-linux.org Git - packages/ocaml-curl.git/blame - ocaml-curl.spec
- updated URL, release 5
[packages/ocaml-curl.git] / ocaml-curl.spec
CommitLineData
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 12Summary: OCaml Curl library (ocurl)
0acf091f 13Summary(pl.UTF-8): Biblioteka Curl dla OCamla (ocurl)
6131789c 14Name: ocaml-curl
e88cf738 15Version: 0.9.1
44adc8ba 16Release: 5
26de232b
ER
17License: MIT
18Group: Libraries
44adc8ba 19#Source0Download: https://github.com/ygrek/ocurl/releases
e88cf738
JR
20Source0: https://github.com/ygrek/ocurl/releases/download/%{version}/ocurl-%{version}.tar.gz
21# Source0-md5: 1ff6b12803fa0c6e9a4358dd29b83910
9781d077 22Patch0: ocaml_opt.patch
6131789c 23Patch1: %{name}-sh.patch
44adc8ba 24URL: https://ygrek.org/p/ocurl/
6131789c
JB
25BuildRequires: autoconf >= 2.50
26BuildRequires: curl-devel >= 7.28.0
26de232b
ER
27BuildRequires: gawk
28BuildRequires: ocaml >= 3.10.0-7
29BuildRequires: ocaml-findlib-devel
0680142d
JR
30BuildRequires: ocaml-lwt-devel
31BuildRequires: ocaml-lwt-ppx-devel
6131789c 32BuildRequires: pkgconfig
c81abe36 33# Explicitly require Curl (fixes RHBZ#711261). Since ocaml-curl uses
26de232b 34# -custom rather than ocamlmklib, automatic detection is infeasible.
6131789c 35Requires: curl-devel >= 7.28.0
c63f57ee 36%requires_eq ocaml-runtime
c81abe36 37ExcludeArch: sparc64 s390 s390x
26de232b
ER
38BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
39
40%description
41The Ocaml Curl Library (Ocurl) is an interface library for the
42programming language Ocaml to the networking library libcurl.
43
0acf091f
JB
44%description -l pl.UTF-8
45Biblioteka Ocaml Curl (Ocurl) to biblioteka interfejsu języka
46programowania Ocaml do biblioteki sieciowe libcurl.
47
56573ec9 48%package devel
0acf091f
JB
49Summary: OCaml Curl library (ocurl) - development part
50Summary(pl.UTF-8): Biblioteka Curl dla OCamla (ocurl) - część programistyczna
26de232b
ER
51Group: Development/Libraries
52Requires: %{name} = %{version}-%{release}
53
56573ec9 54%description devel
0acf091f
JB
55This package contains libraries and signature files for developing
56applications that use OCaml Curl library.
57
58%description devel -l pl.UTF-8
59Ten pakiet zawiera biblioteki i pliki sygnatur do tworzenia aplikacji
60z użyciem biblioteki OCamla Curl.
26de232b 61
2da40ede
JB
62%package lwt
63Summary: Lwt support for OCaml Curl library
64Summary(pl.UTF-8): Obsługa Lwt do biblioteki OCamla Curl
65Group: Libraries
66Requires: %{name} = %{version}-%{release}
67Requires: ocaml-lwt
68
69%description lwt
70Lwt support for OCaml Curl library.
71
72%description lwt -l pl.UTF-8
73Obsługa Lwt do biblioteki OCamla Curl.
74
75%package lwt-devel
76Summary: Lwt support for OCaml Curl library - development part
77Summary(pl.UTF-8): Obsługa Lwt do biblioteki OCamla Curl - część programistyczna
78Group: Development/Libraries
79Requires: %{name}-devel = %{version}-%{release}
80Requires: %{name}-lwt = %{version}-%{release}
81Requires: ocaml-lwt-devel
82
83%description lwt-devel
84This package contains libraries and signature files for developing
85applications that use OCaml curl-lwt library.
86
87%description lwt-devel -l pl.UTF-8
88Ten pakiet zawiera biblioteki i pliki sygnatur do tworzenia aplikacji
89z 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
102rm -rf $RPM_BUILD_ROOT
0acf091f 103
26de232b
ER
104export OCAMLFIND_DESTDIR=$RPM_BUILD_ROOT%{_libdir}/ocaml
105install -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
115install -d $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version}
116cp -p examples/* $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version}
26de232b
ER
117
118%clean
119rm -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
This page took 0.069764 seconds and 5 git commands to generate.