]> git.pld-linux.org Git - packages/ocaml-curl.git/blame_incremental - ocaml-curl.spec
- no need to (re)install .mli file
[packages/ocaml-curl.git] / ocaml-curl.spec
... / ...
CommitLineData
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
12Summary: OCaml Curl library (ocurl)
13Summary(pl.UTF-8): Biblioteka Curl dla OCamla (ocurl)
14Name: ocaml-curl
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
22Patch1: %{name}-sh.patch
23URL: http://ocurl.forge.ocamlcore.org/
24BuildRequires: autoconf >= 2.50
25BuildRequires: curl-devel >= 7.28.0
26BuildRequires: gawk
27BuildRequires: ocaml >= 3.10.0-7
28BuildRequires: ocaml-findlib-devel
29BuildRequires: ocaml-lwt-devel
30BuildRequires: ocaml-lwt-ppx-devel
31BuildRequires: pkgconfig
32# Explicitly require Curl (fixes RHBZ#711261). Since ocaml-curl uses
33# -custom rather than ocamlmklib, automatic detection is infeasible.
34Requires: curl-devel >= 7.28.0
35%requires_eq ocaml-runtime
36ExcludeArch: sparc64 s390 s390x
37BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
38
39%description
40The Ocaml Curl Library (Ocurl) is an interface library for the
41programming language Ocaml to the networking library libcurl.
42
43%description -l pl.UTF-8
44Biblioteka Ocaml Curl (Ocurl) to biblioteka interfejsu języka
45programowania Ocaml do biblioteki sieciowe libcurl.
46
47%package devel
48Summary: OCaml Curl library (ocurl) - development part
49Summary(pl.UTF-8): Biblioteka Curl dla OCamla (ocurl) - część programistyczna
50Group: Development/Libraries
51Requires: %{name} = %{version}-%{release}
52
53%description devel
54This package contains libraries and signature files for developing
55applications that use OCaml Curl library.
56
57%description devel -l pl.UTF-8
58Ten pakiet zawiera biblioteki i pliki sygnatur do tworzenia aplikacji
59z użyciem biblioteki OCamla Curl.
60
61%prep
62%setup -q -n ocurl-%{version}
63%patch0 -p1
64%patch1 -p1
65
66%build
67%{__autoconf}
68%configure
69%{__make} -j1 all
70
71%install
72rm -rf $RPM_BUILD_ROOT
73
74export OCAMLFIND_DESTDIR=$RPM_BUILD_ROOT%{_libdir}/ocaml
75install -d $OCAMLFIND_DESTDIR $OCAMLFIND_DESTDIR/stublibs
76
77%{__make} install \
78 DESTDIR=$RPM_BUILD_ROOT
79
80cat > $RPM_BUILD_ROOT%{_libdir}/ocaml/curl/META <<EOF
81requires = ""
82version = "%{version}"
83directory = "+curl"
84archive(byte) = "curl.cma"
85archive(native) = "curl.cmxa"
86linkopts = ""
87EOF
88
89# useless in rpm
90%{__rm} $RPM_BUILD_ROOT%{_libdir}/ocaml/stublibs/*.so.owner
91
92# Make clean in the examples dir so our docs don't contain binaries.
93%{__make} -C examples clean
94install -d $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version}
95cp -p examples/* $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version}
96
97%clean
98rm -rf $RPM_BUILD_ROOT
99
100%files
101%defattr(644,root,root,755)
102%doc COPYING
103%dir %{_libdir}/ocaml/curl
104%{_libdir}/ocaml/curl/META
105%{_libdir}/ocaml/curl/*.cma
106%if %{with ocaml_opt}
107%attr(755,root,root) %{_libdir}/ocaml/curl/*.cmxs
108%endif
109%attr(755,root,root) %{_libdir}/ocaml/stublibs/dllcurl-helper.so
110
111%files devel
112%defattr(644,root,root,755)
113%{_libdir}/ocaml/curl/libcurl-helper.a
114%{_libdir}/ocaml/curl/*.cmi
115%{_libdir}/ocaml/curl/*.cmo
116%{_libdir}/ocaml/curl/*.cmt
117%{_libdir}/ocaml/curl/*.cmti
118%{_libdir}/ocaml/curl/*.mli
119%if %{with ocaml_opt}
120%{_libdir}/ocaml/curl/curl*.a
121%{_libdir}/ocaml/curl/*.cmx
122%{_libdir}/ocaml/curl/*.cmxa
123%{_libdir}/ocaml/curl/*.o
124%endif
125%{_examplesdir}/%{name}-%{version}
This page took 0.030909 seconds and 4 git commands to generate.