]>
Commit | Line | Data |
---|---|---|
dafc9a18 ER |
1 | # |
2 | # Conditional build: | |
da484bab | 3 | %bcond_without ocaml_opt # native optimized binaries (bytecode is always built) |
cdfcbd46 | 4 | |
da484bab 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 | |
cdfcbd46 JR |
7 | %undefine with_ocaml_opt |
8 | %endif | |
dafc9a18 | 9 | |
da484bab | 10 | %define module gapi-ocaml |
dafc9a18 ER |
11 | %define debug_package %{nil} |
12 | Summary: Google Data Protocol (GData) client library | |
529874e7 | 13 | Summary(pl.UTF-8): Biblioteka kliencka protokołu GData (Google Data Protocol) |
da484bab | 14 | Name: ocaml-%{module} |
429ac537 JB |
15 | Version: 0.4.2 |
16 | Release: 1 | |
dafc9a18 ER |
17 | License: MIT |
18 | Group: Libraries | |
429ac537 JB |
19 | #Source0Download: https://github.com/astrada/gapi-ocaml/releases |
20 | Source0: https://github.com/astrada/gapi-ocaml/archive/v%{version}/%{module}-%{version}.tar.gz | |
21 | # Source0-md5: d8f549e73826599a5ae94a3633aa7356 | |
dafc9a18 ER |
22 | URL: http://gapi-ocaml.forge.ocamlcore.org/ |
23 | BuildRequires: cppo >= 0.9.3 | |
da484bab | 24 | BuildRequires: ocaml >= 1:4.02.3 |
dafc9a18 | 25 | BuildRequires: ocaml-cryptokit-devel >= 1.9 |
a655c1bd | 26 | BuildRequires: ocaml-curl-devel >= 0.6.0 |
da484bab | 27 | BuildRequires: ocaml-dune |
dafc9a18 | 28 | BuildRequires: ocaml-findlib >= 1.4 |
e787fbc9 | 29 | BuildRequires: ocaml-net-netstring-devel >= 4.1.4 |
429ac537 JB |
30 | BuildRequires: ocaml-net-netsys-devel >= 4.1.4 |
31 | BuildRequires: ocaml-xmlm-devel >= 1.0.2 | |
dafc9a18 ER |
32 | BuildRequires: ocaml-yojson-devel >= 1.1.6 |
33 | %requires_eq ocaml-runtime | |
da484bab | 34 | Conflicts: ocaml-gapi-ocaml < 0.4.1-4 |
dafc9a18 ER |
35 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) |
36 | ||
37 | %description | |
38 | gapi-ocaml is a simple, unofficial, OCaml client for Google Services. | |
39 | The project is hosted on github, where you can find the latest | |
40 | development version, and on the OCaml forge where you can find | |
41 | releases. Reference documentation can be found here. | |
42 | ||
43 | %description -l pl.UTF-8 | |
44 | Pakiet ten zawiera binaria potrzebne do uruchamiania programów | |
45 | używających tej biblioteki. | |
46 | ||
47 | %package devel | |
48 | Summary: Google Data Protocol (GData) client library - development part | |
529874e7 | 49 | Summary(pl.UTF-8): Biblioteka kliencka protokołu GData (Google Data Protocol) - cześć programistyczna |
dafc9a18 | 50 | Group: Development/Libraries |
529874e7 | 51 | %requires_eq ocaml |
a726fef6 JR |
52 | Requires: ocaml-cryptokit-devel >= 1.9 |
53 | Requires: ocaml-curl-devel >= 0.6.0 | |
429ac537 JB |
54 | Requires: ocaml-net-netstring-devel >= 4.1.1 |
55 | Requires: ocaml-net-netsys-devel >= 4.1.4 | |
56 | Requires: ocaml-xmlm-devel >= 1.0.2 | |
a726fef6 | 57 | Requires: ocaml-yojson-devel >= 1.1.6 |
dafc9a18 ER |
58 | |
59 | %description devel | |
60 | This package contains files needed to develop OCaml programs using | |
61 | this library. | |
62 | ||
63 | %description devel -l pl.UTF-8 | |
529874e7 JB |
64 | Pakiet ten zawiera pliki niezbędne do tworzenia programów w OCamlu |
65 | używających biblioteki gapi-ocaml. | |
dafc9a18 ER |
66 | |
67 | %prep | |
da484bab | 68 | %setup -q -n %{module}-%{version} |
dafc9a18 ER |
69 | |
70 | %build | |
da484bab | 71 | dune build --verbose |
dafc9a18 ER |
72 | |
73 | %install | |
74 | rm -rf $RPM_BUILD_ROOT | |
5b797f51 JR |
75 | |
76 | dune install --destdir=$RPM_BUILD_ROOT | |
dafc9a18 | 77 | |
da484bab JB |
78 | # sources |
79 | %{__rm} $RPM_BUILD_ROOT%{_libdir}/ocaml/%{module}/*.ml | |
80 | # packaged as %doc | |
81 | %{__rm} -r $RPM_BUILD_ROOT%{_prefix}/doc/%{module} | |
dafc9a18 ER |
82 | |
83 | %clean | |
84 | rm -rf $RPM_BUILD_ROOT | |
85 | ||
da484bab | 86 | %files |
dafc9a18 | 87 | %defattr(644,root,root,755) |
da484bab JB |
88 | %doc LICENSE README.md |
89 | %dir %{_libdir}/ocaml/gapi-ocaml | |
5b797f51 | 90 | %{_libdir}/ocaml/gapi-ocaml/META |
da484bab JB |
91 | %{_libdir}/ocaml/gapi-ocaml/*.cma |
92 | %if %{with ocaml_opt} | |
93 | %attr(755,root,root) %{_libdir}/ocaml/gapi-ocaml/*.cmxs | |
94 | %endif | |
95 | ||
96 | %files devel | |
97 | %defattr(644,root,root,755) | |
5b797f51 JR |
98 | %{_libdir}/ocaml/gapi-ocaml/dune-package |
99 | %{_libdir}/ocaml/gapi-ocaml/opam | |
da484bab JB |
100 | %{_libdir}/ocaml/gapi-ocaml/*.cmi |
101 | %{_libdir}/ocaml/gapi-ocaml/*.cmt | |
102 | %{_libdir}/ocaml/gapi-ocaml/*.cmti | |
103 | %{_libdir}/ocaml/gapi-ocaml/*.mli | |
cdfcbd46 | 104 | %if %{with ocaml_opt} |
da484bab JB |
105 | %{_libdir}/ocaml/gapi-ocaml/*.a |
106 | %{_libdir}/ocaml/gapi-ocaml/*.cmx | |
107 | %{_libdir}/ocaml/gapi-ocaml/*.cmxa | |
cdfcbd46 | 108 | %endif |