]> git.pld-linux.org Git - packages/ocaml-gapi-ocaml.git/blob - ocaml-gapi-ocaml.spec
900062c26ebc2026e1fc9a18a5063c0f64e3702c
[packages/ocaml-gapi-ocaml.git] / ocaml-gapi-ocaml.spec
1 #
2 # Conditional build:
3 %bcond_without  ocaml_opt       # skip building native optimized binaries (bytecode is always built)
4
5 # not yet available on x32 (ocaml 4.02.1), remove when upstream will support it
6 %ifnarch %{ix86} %{x8664} arm aarch64 ppc sparc sparcv9
7 %undefine       with_ocaml_opt
8 %endif
9
10 %define         pkgname gapi-ocaml
11 %define         debug_package   %{nil}
12 Summary:        Google Data Protocol (GData) client library
13 Name:           ocaml-%{pkgname}
14 Version:        0.2.6
15 Release:        3
16 License:        MIT
17 Group:          Libraries
18 Source0:        https://forge.ocamlcore.org/frs/download.php/1468/%{pkgname}-%{version}.tar.gz
19 # Source0-md5:  e158c98587681652decdff6302e423b7
20 URL:            http://gapi-ocaml.forge.ocamlcore.org/
21 BuildRequires:  cppo >= 0.9.3
22 BuildRequires:  ocaml >= 3.04-7
23 BuildRequires:  ocaml-biniou-devel >= 1.0.6
24 BuildRequires:  ocaml-cryptokit-devel >= 1.9
25 BuildRequires:  ocaml-curl-devel >= 0.6.0
26 BuildRequires:  ocaml-easy-format-devel >= 1.0.1
27 BuildRequires:  ocaml-extlib-devel >= 1.5.4
28 BuildRequires:  ocaml-findlib >= 1.4
29 BuildRequires:  ocaml-net-netstring-devel >= 3.6
30 #BuildRequires: ocaml-net-netstring-devel >= 3.7.3
31 BuildRequires:  ocaml-xmlm-devel >= 1.1.1
32 BuildRequires:  ocaml-yojson-devel >= 1.1.6
33 %requires_eq    ocaml-runtime
34 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
35
36 %description
37 gapi-ocaml is a simple, unofficial, OCaml client for Google Services.
38 The project is hosted on github, where you can find the latest
39 development version, and on the OCaml forge where you can find
40 releases. Reference documentation can be found here.
41
42 %description -l pl.UTF-8
43 Pakiet ten zawiera binaria potrzebne do uruchamiania programów
44 używających tej biblioteki.
45
46 %package devel
47 Summary:        Google Data Protocol (GData) client library - development part
48 Summary(pl.UTF-8):      Wiązania gapi dla OCamla - cześć programistyczna
49 Group:          Development/Libraries
50 %requires_eq    ocaml
51 Requires:       ocaml-biniou-devel >= 1.0.6
52 Requires:       ocaml-cryptokit-devel >= 1.9
53 Requires:       ocaml-curl-devel >= 0.6.0
54 Requires:       ocaml-easy-format-devel >= 1.0.1
55 Requires:       ocaml-extlib-devel >= 1.5.4
56 Requires:       ocaml-net-netstring-devel >= 3.6
57 #Requires:      ocaml-net-netstring-devel >= 3.7.3
58 Requires:       ocaml-xmlm-devel >= 1.1.1
59 Requires:       ocaml-yojson-devel >= 1.1.6
60
61 %description devel
62 This package contains files needed to develop OCaml programs using
63 this library.
64
65 %description devel -l pl.UTF-8
66 Pakiet ten zawiera pliki niezbędne do tworzenia programów używających
67 tej biblioteki.
68
69 %prep
70 %setup -q -n %{pkgname}-%{version}
71
72 %build
73 ocaml setup.ml -configure \
74         --destdir $RPM_BUILD_ROOT
75 ocaml setup.ml -build
76
77 %install
78 rm -rf $RPM_BUILD_ROOT
79 export OCAMLFIND_DESTDIR=$RPM_BUILD_ROOT%{_libdir}/ocaml
80 install -d $OCAMLFIND_DESTDIR
81 ocaml setup.ml -install
82
83 # move to dir pld ocamlfind looks
84 install -d $RPM_BUILD_ROOT%{_libdir}/ocaml/site-lib/%{pkgname}
85 mv $OCAMLFIND_DESTDIR/%{pkgname}/META \
86         $RPM_BUILD_ROOT%{_libdir}/ocaml/site-lib/%{pkgname}
87 cat <<EOF >> $RPM_BUILD_ROOT%{_libdir}/ocaml/site-lib/%{pkgname}/META
88 directory="+%{pkgname}"
89 EOF
90
91 # no standard way of packaging .mli docs in pld. just drop
92 %{__rm} $RPM_BUILD_ROOT%{_libdir}/ocaml/%{pkgname}/*.mli
93
94 %clean
95 rm -rf $RPM_BUILD_ROOT
96
97 %files devel
98 %defattr(644,root,root,755)
99 %doc LICENSE
100 %dir %{_libdir}/ocaml/%{pkgname}
101 %{_libdir}/ocaml/%{pkgname}/*.cma
102 %{_libdir}/ocaml/%{pkgname}/*.cm[ix]
103 %if %{with ocaml_opt}
104 %{_libdir}/ocaml/%{pkgname}/*.a
105 %{_libdir}/ocaml/%{pkgname}/*.cmxa
106 %endif
107 %dir %{_libdir}/ocaml/site-lib/%{pkgname}
108 %{_libdir}/ocaml/site-lib/%{pkgname}/META
This page took 0.026669 seconds and 3 git commands to generate.