]>
Commit | Line | Data |
---|---|---|
2397f585 JR |
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), update when upstream will support it | |
5a77db55 | 6 | %ifnarch %{ix86} %{x8664} arm aarch64 ppc sparc sparcv9 |
2397f585 JR |
7 | %undefine with_ocaml_opt |
8 | %endif | |
9 | ||
5a77db55 | 10 | %define ocaml_ver 1:4.05.0 |
2397f585 JR |
11 | Summary: GTK+3 binding for OCaml |
12 | Summary(pl.UTF-8): Wiązania GTK+3 dla OCamla | |
13 | Name: ocaml-lablgtk3 | |
14 | Version: 3.1.1 | |
6595a0b0 | 15 | Release: 2 |
2397f585 JR |
16 | License: LGPL with linking exceptions |
17 | Group: Libraries | |
18 | Source0: https://github.com/garrigue/lablgtk/archive/%{version}/lablgtk-%{version}.tar.gz | |
19 | # Source0-md5: c55c37b3ff0eaa2563f07a3fe01f9243 | |
20 | URL: http://lablgtk.forge.ocamlcore.org/ | |
5a77db55 JR |
21 | BuildRequires: camlp5 |
22 | BuildRequires: gtk+3-devel >= 3.18 | |
2397f585 | 23 | BuildRequires: gtksourceview3-devel |
5a77db55 JR |
24 | BuildRequires: gtkspell3-devel |
25 | BuildRequires: help2man | |
2397f585 | 26 | BuildRequires: ocaml-cairo2-devel >= 0.6 |
5a77db55 | 27 | BuildRequires: ocaml-dune >= 1.8 |
2397f585 JR |
28 | %requires_eq ocaml-runtime |
29 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) | |
30 | ||
31 | %description | |
32 | GTK+3 binding for OCaml. This package contains files needed to run | |
33 | bytecode OCaml programs using LablGtk. | |
34 | ||
35 | %description -l pl.UTF-8 | |
36 | Wiązania GTK+3 dla OCamla. Pakiet ten zawiera binaria potrzebne do | |
37 | uruchamiania programów używających LablGtk. | |
38 | ||
39 | %package devel | |
40 | Summary: GTK+3 binding for OCaml - development part | |
41 | Summary(pl.UTF-8): Wiązania GTK+3 dla OCamla - cześć programistyczna | |
42 | Group: Development/Libraries | |
43 | Requires: %{name} = %{version}-%{release} | |
5a77db55 JR |
44 | Requires: %{name}-tools = %{version}-%{release} |
45 | %requires_eq ocaml | |
2397f585 JR |
46 | |
47 | %description devel | |
48 | GTK+3 binding for OCaml. This package contains files needed to develop | |
49 | OCaml programs using LablGtk. | |
50 | ||
51 | %description devel -l pl.UTF-8 | |
52 | Wiązania GTK+3 dla OCamla. Pakiet ten zawiera pliki niezbędne do | |
53 | tworzenia programów używających LablGtk. | |
54 | ||
55 | %package gtkspell | |
56 | Summary: GTK+3 binding for OCaml - GtkSpell support | |
57 | Summary(pl.UTF-8): Wiązania GTK+3 dla OCamla - obsługa GtkSpella | |
58 | Group: Libraries | |
59 | Requires: %{name} = %{version}-%{release} | |
5a77db55 | 60 | %requires_eq ocaml-runtime |
2397f585 JR |
61 | |
62 | %description gtkspell | |
63 | GTK+3 binding for OCaml, GtkSpell support. | |
64 | ||
65 | %description gtkspell -l pl.UTF-8 | |
66 | Wiązania GTK+3 dla OCamla, obsługa GtkSpella | |
67 | ||
68 | %package gtkspell-devel | |
69 | Summary: GTK+3 binding for OCaml - GtkSpell support, development part | |
70 | Summary(pl.UTF-8): Wiązania GTK+3 dla OCamla - obsługa GtkSpella, część programistyczna | |
71 | Group: Development/Libraries | |
72 | Requires: %{name}-gtkspell = %{version}-%{release} | |
5a77db55 | 73 | %requires_eq ocaml |
2397f585 JR |
74 | |
75 | %description gtkspell-devel | |
76 | GTK+3 binding for OCaml, GtkSpell support. This package contains files | |
77 | needed to develop OCaml programs using LablGtk-GtkSpell. | |
78 | ||
79 | %description gtkspell-devel -l pl.UTF-8 | |
80 | Wiązania GTK+3 dla OCamla, obsługa GtkSpella. Ten pakiet zawiera pliki | |
81 | niezbędne do tworzenia programów używających LablGtk-GtkSpell. | |
82 | ||
83 | %package gtksourceview | |
84 | Summary: GTK+3 binding for OCaml - GtkSourceView support | |
85 | Summary(pl.UTF-8): Wiązania GTK+3 dla OCamla - wsparcie dla GtkSourceView | |
86 | Group: Libraries | |
87 | Requires: %{name} = %{version}-%{release} | |
5a77db55 | 88 | %requires_eq ocaml |
2397f585 JR |
89 | |
90 | %description gtksourceview | |
91 | GTK+3 binding for OCaml, GtkSourceView support. This package contains | |
92 | files needed to run bytecode OCaml programs using | |
93 | LablGtk-GtkSourceView. | |
94 | ||
95 | %description gtksourceview -l pl.UTF-8 | |
96 | Wiązania GTK+3 dla OCamla, wsparcie dla GtkSourceView. Pakiet ten | |
97 | zawiera binaria potrzebne do uruchamiania programów używających | |
98 | LablGtk-GtkSourceView. | |
99 | ||
100 | %package gtksourceview-devel | |
101 | Summary: GTK+3 binding for OCaml - GtkSourceView support, development part | |
102 | Summary(pl.UTF-8): Wiązania GTK+3 dla OCamla - wsparcie dla GtkSourceView, część programistyczna | |
103 | Group: Development/Libraries | |
104 | Requires: %{name}-gtksourceview = %{version}-%{release} | |
5a77db55 | 105 | %requires_eq ocaml |
2397f585 JR |
106 | |
107 | %description gtksourceview-devel | |
108 | GTK+3 binding for OCaml, GtkSourceView support. This package contains | |
109 | files needed to develop OCaml programs using LablGtk-GtkSourceView. | |
110 | ||
111 | %description gtksourceview-devel -l pl.UTF-8 | |
112 | Wiązania GTK+3 dla OCamla, wsparcie dla GtkSourceView. Pakiet ten | |
113 | zawiera pliki niezbędne do tworzenia programów używających | |
114 | LablGtk-GtkSourceView. | |
115 | ||
5a77db55 JR |
116 | %package tools |
117 | Summary: GTK+ binding for OCaml - tools | |
118 | Summary(pl.UTF-8): Wiązania GTK+ dla OCamla - narzędzia | |
119 | Group: Development/Libraries | |
120 | Requires: %{name} = %{version}-%{release} | |
121 | %requires_eq ocaml | |
122 | ||
123 | %description tools | |
124 | GTK+ binding for OCaml. This package contains tools for working with | |
125 | lablgtk. | |
126 | ||
127 | %description tools -l pl.UTF-8 | |
128 | Wiązania GTK+ dla OCamla. Pakiet ten zawiera narzędzia do pracy z | |
129 | lablgtk. | |
130 | ||
2397f585 JR |
131 | %prep |
132 | %setup -q -n lablgtk-%{version} | |
133 | ||
6595a0b0 JR |
134 | for p in lablgtk3 lablgtk3-gtkspell3 lablgtk3-sourceview3; do |
135 | echo -e "\nversion: \"%{version}\"" >> ${p}.opam | |
136 | done | |
137 | ||
2397f585 JR |
138 | %build |
139 | dune build %{?_smp_mflags} | |
140 | ||
5a77db55 JR |
141 | help2man -N --version-string=%{version} -o gdk_pixbuf_mlsource3.1 _build/install/default/bin/gdk_pixbuf_mlsource3 |
142 | help2man -N --version-string=%{version} -o lablgladecc3.1 _build/install/default/bin/lablgladecc3 | |
143 | ||
2397f585 JR |
144 | %install |
145 | rm -rf $RPM_BUILD_ROOT | |
5a77db55 | 146 | install -d $RPM_BUILD_ROOT{%{_bindir},%{_mandir}/man1,%{_libdir}/ocaml/stublibs,%{_examplesdir}/%{name}-%{version}} |
2397f585 JR |
147 | |
148 | dune install --destdir=$RPM_BUILD_ROOT | |
149 | ||
5a77db55 JR |
150 | cp -p gdk_pixbuf_mlsource3.1 lablgladecc3.1 $RPM_BUILD_ROOT%{_mandir}/man1 |
151 | ||
2397f585 JR |
152 | cp -r examples/* $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version} |
153 | ||
5a77db55 JR |
154 | %{__rm} $RPM_BUILD_ROOT%{_libdir}/ocaml/lablgtk3*/*.ml |
155 | ||
2397f585 JR |
156 | %clean |
157 | rm -rf $RPM_BUILD_ROOT | |
158 | ||
159 | %files | |
160 | %defattr(644,root,root,755) | |
161 | %doc CHANGES.md README.md | |
162 | %dir %{_libdir}/ocaml/lablgtk3 | |
5a77db55 | 163 | %{_libdir}/ocaml/lablgtk3/META |
2397f585 JR |
164 | %{_libdir}/ocaml/lablgtk3/lablgtk3.cma |
165 | %if %{with ocaml_opt} | |
166 | %attr(755,root,root) %{_libdir}/ocaml/lablgtk3/lablgtk3.cmxs | |
167 | %endif | |
168 | %attr(755,root,root) %{_libdir}/ocaml/stublibs/dlllablgtk3_stubs.so | |
169 | ||
170 | %files devel | |
171 | %defattr(644,root,root,755) | |
5a77db55 JR |
172 | %{_libdir}/ocaml/lablgtk3/*.cmi |
173 | %{_libdir}/ocaml/lablgtk3/*.cmt | |
174 | %{_libdir}/ocaml/lablgtk3/*.cmti | |
175 | %{_libdir}/ocaml/lablgtk3/*.mli | |
2397f585 JR |
176 | %{_libdir}/ocaml/lablgtk3/liblablgtk3_stubs.a |
177 | %if %{with ocaml_opt} | |
5a77db55 | 178 | %{_libdir}/ocaml/lablgtk3/*.cmx |
2397f585 JR |
179 | %{_libdir}/ocaml/lablgtk3/lablgtk3.a |
180 | %{_libdir}/ocaml/lablgtk3/lablgtk3.cmxa | |
181 | %endif | |
182 | %{_libdir}/ocaml/lablgtk3/gdk_tags.h | |
183 | %{_libdir}/ocaml/lablgtk3/gtk_tags.h | |
184 | %{_libdir}/ocaml/lablgtk3/ml_*.h | |
185 | %{_libdir}/ocaml/lablgtk3/pango_tags.h | |
186 | %{_libdir}/ocaml/lablgtk3/wrappers.h | |
5a77db55 JR |
187 | %{_libdir}/ocaml/lablgtk3/dune-package |
188 | %{_libdir}/ocaml/lablgtk3/opam | |
2397f585 JR |
189 | %{_examplesdir}/%{name}-%{version} |
190 | ||
191 | %files gtkspell | |
192 | %defattr(644,root,root,755) | |
5a77db55 JR |
193 | %dir %{_libdir}/ocaml/lablgtk3-gtkspell3 |
194 | %{_libdir}/ocaml/lablgtk3-gtkspell3/META | |
2397f585 JR |
195 | %{_libdir}/ocaml/lablgtk3-gtkspell3/lablgtk3_gtkspell3.cma |
196 | %if %{with ocaml_opt} | |
197 | %attr(755,root,root) %{_libdir}/ocaml/lablgtk3-gtkspell3/lablgtk3_gtkspell3.cmxs | |
198 | %endif | |
199 | %attr(755,root,root) %{_libdir}/ocaml/stublibs/dlllablgtk3_gtkspell3_stubs.so | |
200 | ||
201 | %files gtkspell-devel | |
202 | %defattr(644,root,root,755) | |
5a77db55 JR |
203 | %{_libdir}/ocaml/lablgtk3-gtkspell3/*.cmi |
204 | %{_libdir}/ocaml/lablgtk3-gtkspell3/*.cmt | |
205 | %{_libdir}/ocaml/lablgtk3-gtkspell3/*.cmti | |
206 | %{_libdir}/ocaml/lablgtk3-gtkspell3/*.mli | |
2397f585 JR |
207 | %{_libdir}/ocaml/lablgtk3-gtkspell3/liblablgtk3_gtkspell3_stubs.a |
208 | %if %{with ocaml_opt} | |
5a77db55 | 209 | %{_libdir}/ocaml/lablgtk3-gtkspell3/*.cmx |
2397f585 JR |
210 | %{_libdir}/ocaml/lablgtk3-gtkspell3/lablgtk3_gtkspell3.a |
211 | %{_libdir}/ocaml/lablgtk3-gtkspell3/lablgtk3_gtkspell3.cmxa | |
212 | %endif | |
5a77db55 JR |
213 | %{_libdir}/ocaml/lablgtk3-gtkspell3/dune-package |
214 | %{_libdir}/ocaml/lablgtk3-gtkspell3/opam | |
2397f585 JR |
215 | |
216 | %files gtksourceview | |
217 | %defattr(644,root,root,755) | |
5a77db55 JR |
218 | %dir %{_libdir}/ocaml/lablgtk3-sourceview3 |
219 | %{_libdir}/ocaml/lablgtk3-sourceview3/META | |
2397f585 JR |
220 | %{_libdir}/ocaml/lablgtk3-sourceview3/lablgtk3_sourceview3.cma |
221 | %if %{with ocaml_opt} | |
222 | %attr(755,root,root) %{_libdir}/ocaml/lablgtk3-sourceview3/lablgtk3_sourceview3.cmxs | |
223 | %endif | |
224 | %attr(755,root,root) %{_libdir}/ocaml/stublibs/dlllablgtk3_sourceview3_stubs.so | |
225 | ||
226 | %files gtksourceview-devel | |
227 | %defattr(644,root,root,755) | |
5a77db55 JR |
228 | %{_libdir}/ocaml/lablgtk3-sourceview3/*.cmi |
229 | %{_libdir}/ocaml/lablgtk3-sourceview3/*.cmt | |
230 | %{_libdir}/ocaml/lablgtk3-sourceview3/*.cmti | |
231 | %{_libdir}/ocaml/lablgtk3-sourceview3/*.mli | |
2397f585 JR |
232 | %{_libdir}/ocaml/lablgtk3-sourceview3/liblablgtk3_sourceview3_stubs.a |
233 | %if %{with ocaml_opt} | |
5a77db55 | 234 | %{_libdir}/ocaml/lablgtk3-sourceview3/*.cmx |
2397f585 JR |
235 | %{_libdir}/ocaml/lablgtk3-sourceview3/lablgtk3_sourceview3.a |
236 | %{_libdir}/ocaml/lablgtk3-sourceview3/lablgtk3_sourceview3.cmxa | |
237 | %endif | |
5a77db55 JR |
238 | %{_libdir}/ocaml/lablgtk3-sourceview3/dune-package |
239 | %{_libdir}/ocaml/lablgtk3-sourceview3/opam | |
240 | ||
241 | %files tools | |
242 | %defattr(644,root,root,755) | |
243 | %attr(755,root,root) %{_bindir}/gdk_pixbuf_mlsource3 | |
244 | %attr(755,root,root) %{_bindir}/lablgladecc3 | |
245 | %{_mandir}/man1/gdk_pixbuf_mlsource3.1* | |
246 | %{_mandir}/man1/lablgladecc3.1* |