]>
Commit | Line | Data |
---|---|---|
dafc9a18 ER |
1 | # |
2 | # Conditional build: | |
3 | %bcond_without opt # build opt | |
4 | ||
5 | %define pkgname gapi | |
6 | %define debug_package %{nil} | |
7 | Summary: Google Data Protocol (GData) client library | |
8 | Name: ocaml-%{pkgname} | |
9 | Version: 0.2.1 | |
10 | Release: 1 | |
11 | License: MIT | |
12 | Group: Libraries | |
13 | Source0: https://forge.ocamlcore.org/frs/download.php/1274/gapi-ocaml-%{version}.tar.gz | |
14 | # Source0-md5: c87aa3b2c9afef190307d8da51d65875 | |
15 | URL: http://gapi-ocaml.forge.ocamlcore.org/ | |
16 | BuildRequires: cppo >= 0.9.3 | |
17 | BuildRequires: ocaml >= 3.04-7 | |
18 | BuildRequires: ocaml-biniou-devel >= 1.0.6 | |
19 | BuildRequires: ocaml-cryptokit-devel >= 1.9 | |
20 | BuildRequires: ocaml-curl >= 0.6.0 | |
21 | BuildRequires: ocaml-easy-format-devel >= 1.0.1 | |
22 | BuildRequires: ocaml-extlib-devel >= 1.5.4 | |
23 | BuildRequires: ocaml-findlib >= 1.4 | |
24 | BuildRequires: ocaml-net-netstring-devel >= 3.6 | |
25 | #BuildRequires: ocaml-net-netstring-devel >= 3.7.3 | |
26 | BuildRequires: ocaml-xmlm-devel >= 1.1.1 | |
27 | BuildRequires: ocaml-yojson-devel >= 1.1.6 | |
28 | %requires_eq ocaml-runtime | |
29 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) | |
30 | ||
31 | %description | |
32 | gapi-ocaml is a simple, unofficial, OCaml client for Google Services. | |
33 | The project is hosted on github, where you can find the latest | |
34 | development version, and on the OCaml forge where you can find | |
35 | releases. Reference documentation can be found here. | |
36 | ||
37 | %description -l pl.UTF-8 | |
38 | Pakiet ten zawiera binaria potrzebne do uruchamiania programów | |
39 | używających tej biblioteki. | |
40 | ||
41 | %package devel | |
42 | Summary: Google Data Protocol (GData) client library - development part | |
43 | Summary(pl.UTF-8): Wiązania gapi dla OCamla - cześć programistyczna | |
44 | Group: Development/Libraries | |
45 | %requires_eq ocaml | |
46 | ||
47 | %description devel | |
48 | This package contains files needed to develop OCaml programs using | |
49 | this library. | |
50 | ||
51 | %description devel -l pl.UTF-8 | |
52 | Pakiet ten zawiera pliki niezbędne do tworzenia programów używających | |
53 | tej biblioteki. | |
54 | ||
55 | %prep | |
56 | %setup -q -n gapi-ocaml-%{version} | |
57 | ||
58 | %build | |
59 | ocaml setup.ml -configure \ | |
60 | --destdir $RPM_BUILD_ROOT | |
61 | ocaml setup.ml -build | |
62 | ||
63 | %install | |
64 | rm -rf $RPM_BUILD_ROOT | |
65 | export OCAMLFIND_DESTDIR=$RPM_BUILD_ROOT%{_libdir}/ocaml | |
66 | install -d $OCAMLFIND_DESTDIR | |
67 | ocaml setup.ml -install | |
68 | ||
5c44f6a8 ER |
69 | # move to dir pld ocamlfind looks |
70 | install -d $RPM_BUILD_ROOT%{_libdir}/ocaml/site-lib/gapi-ocaml | |
71 | mv $OCAMLFIND_DESTDIR/gapi-ocaml/META \ | |
72 | $RPM_BUILD_ROOT%{_libdir}/ocaml/site-lib/gapi-ocaml | |
73 | cat <<EOF >> $RPM_BUILD_ROOT%{_libdir}/ocaml/site-lib/gapi-ocaml/META | |
74 | directory="+gapi-ocaml" | |
75 | EOF | |
76 | ||
dafc9a18 ER |
77 | # no standard way of packaging .mli docs in pld. just drop |
78 | %{__rm} $RPM_BUILD_ROOT%{_libdir}/ocaml/gapi-ocaml/*.mli | |
79 | ||
80 | %clean | |
81 | rm -rf $RPM_BUILD_ROOT | |
82 | ||
83 | %files devel | |
84 | %defattr(644,root,root,755) | |
85 | %doc LICENSE | |
86 | %dir %{_libdir}/ocaml/gapi-ocaml | |
dafc9a18 ER |
87 | %{_libdir}/ocaml/gapi-ocaml/*.a |
88 | %{_libdir}/ocaml/gapi-ocaml/*.cm[ixa]* | |
5c44f6a8 ER |
89 | %dir %{_libdir}/ocaml/site-lib/gapi-ocaml |
90 | %{_libdir}/ocaml/site-lib/gapi-ocaml/META |