3 %bcond_without ocaml_opt # skip building native optimized binaries (bytecode is always built)
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
10 %define ocaml_ver 1:4.05.0
11 Summary: GTK+3 binding for OCaml
12 Summary(pl.UTF-8): Wiązania GTK+3 dla OCamla
16 License: LGPL with linking exceptions
18 Source0: https://github.com/garrigue/lablgtk/archive/%{version}/lablgtk-%{version}.tar.gz
19 # Source0-md5: c55c37b3ff0eaa2563f07a3fe01f9243
20 URL: http://lablgtk.forge.ocamlcore.org/
22 BuildRequires: gtk+3-devel >= 3.18
23 BuildRequires: gtksourceview3-devel
24 BuildRequires: gtkspell3-devel
25 BuildRequires: help2man
26 BuildRequires: ocaml-cairo2-devel >= 0.6
27 BuildRequires: ocaml-dune >= 1.8
28 %requires_eq ocaml-runtime
29 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
32 GTK+3 binding for OCaml. This package contains files needed to run
33 bytecode OCaml programs using LablGtk.
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.
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}
44 Requires: %{name}-tools = %{version}-%{release}
45 Requires: ocaml-cairo2-devel >= 0.6
49 GTK+3 binding for OCaml. This package contains files needed to develop
50 OCaml programs using LablGtk.
52 %description devel -l pl.UTF-8
53 Wiązania GTK+3 dla OCamla. Pakiet ten zawiera pliki niezbędne do
54 tworzenia programów używających LablGtk.
57 Summary: GTK+3 binding for OCaml - GtkSpell support
58 Summary(pl.UTF-8): Wiązania GTK+3 dla OCamla - obsługa GtkSpella
60 Requires: %{name} = %{version}-%{release}
61 %requires_eq ocaml-runtime
64 GTK+3 binding for OCaml, GtkSpell support.
66 %description gtkspell -l pl.UTF-8
67 Wiązania GTK+3 dla OCamla, obsługa GtkSpella
69 %package gtkspell-devel
70 Summary: GTK+3 binding for OCaml - GtkSpell support, development part
71 Summary(pl.UTF-8): Wiązania GTK+3 dla OCamla - obsługa GtkSpella, część programistyczna
72 Group: Development/Libraries
73 Requires: %{name}-gtkspell = %{version}-%{release}
76 %description gtkspell-devel
77 GTK+3 binding for OCaml, GtkSpell support. This package contains files
78 needed to develop OCaml programs using LablGtk-GtkSpell.
80 %description gtkspell-devel -l pl.UTF-8
81 Wiązania GTK+3 dla OCamla, obsługa GtkSpella. Ten pakiet zawiera pliki
82 niezbędne do tworzenia programów używających LablGtk-GtkSpell.
84 %package gtksourceview
85 Summary: GTK+3 binding for OCaml - GtkSourceView support
86 Summary(pl.UTF-8): Wiązania GTK+3 dla OCamla - wsparcie dla GtkSourceView
88 Requires: %{name} = %{version}-%{release}
91 %description gtksourceview
92 GTK+3 binding for OCaml, GtkSourceView support. This package contains
93 files needed to run bytecode OCaml programs using
94 LablGtk-GtkSourceView.
96 %description gtksourceview -l pl.UTF-8
97 Wiązania GTK+3 dla OCamla, wsparcie dla GtkSourceView. Pakiet ten
98 zawiera binaria potrzebne do uruchamiania programów używających
99 LablGtk-GtkSourceView.
101 %package gtksourceview-devel
102 Summary: GTK+3 binding for OCaml - GtkSourceView support, development part
103 Summary(pl.UTF-8): Wiązania GTK+3 dla OCamla - wsparcie dla GtkSourceView, część programistyczna
104 Group: Development/Libraries
105 Requires: %{name}-gtksourceview = %{version}-%{release}
108 %description gtksourceview-devel
109 GTK+3 binding for OCaml, GtkSourceView support. This package contains
110 files needed to develop OCaml programs using LablGtk-GtkSourceView.
112 %description gtksourceview-devel -l pl.UTF-8
113 Wiązania GTK+3 dla OCamla, wsparcie dla GtkSourceView. Pakiet ten
114 zawiera pliki niezbędne do tworzenia programów używających
115 LablGtk-GtkSourceView.
118 Summary: GTK+ binding for OCaml - tools
119 Summary(pl.UTF-8): Wiązania GTK+ dla OCamla - narzędzia
120 Group: Development/Libraries
121 Requires: %{name} = %{version}-%{release}
125 GTK+ binding for OCaml. This package contains tools for working with
128 %description tools -l pl.UTF-8
129 Wiązania GTK+ dla OCamla. Pakiet ten zawiera narzędzia do pracy z
133 %setup -q -n lablgtk-%{version}
135 for p in lablgtk3 lablgtk3-gtkspell3 lablgtk3-sourceview3; do
136 echo -e "\nversion: \"%{version}\"" >> ${p}.opam
140 dune build %{?_smp_mflags}
142 help2man -N --version-string=%{version} -o gdk_pixbuf_mlsource3.1 _build/install/default/bin/gdk_pixbuf_mlsource3
143 help2man -N --version-string=%{version} -o lablgladecc3.1 _build/install/default/bin/lablgladecc3
146 rm -rf $RPM_BUILD_ROOT
147 install -d $RPM_BUILD_ROOT{%{_bindir},%{_mandir}/man1,%{_libdir}/ocaml/stublibs,%{_examplesdir}/%{name}-%{version}}
149 dune install --destdir=$RPM_BUILD_ROOT
151 cp -p gdk_pixbuf_mlsource3.1 lablgladecc3.1 $RPM_BUILD_ROOT%{_mandir}/man1
153 cp -r examples/* $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version}
155 %{__rm} $RPM_BUILD_ROOT%{_libdir}/ocaml/lablgtk3*/*.ml
158 rm -rf $RPM_BUILD_ROOT
161 %defattr(644,root,root,755)
162 %doc CHANGES.md README.md
163 %dir %{_libdir}/ocaml/lablgtk3
164 %{_libdir}/ocaml/lablgtk3/META
165 %{_libdir}/ocaml/lablgtk3/lablgtk3.cma
166 %if %{with ocaml_opt}
167 %attr(755,root,root) %{_libdir}/ocaml/lablgtk3/lablgtk3.cmxs
169 %attr(755,root,root) %{_libdir}/ocaml/stublibs/dlllablgtk3_stubs.so
172 %defattr(644,root,root,755)
173 %{_libdir}/ocaml/lablgtk3/*.cmi
174 %{_libdir}/ocaml/lablgtk3/*.cmt
175 %{_libdir}/ocaml/lablgtk3/*.cmti
176 %{_libdir}/ocaml/lablgtk3/*.mli
177 %{_libdir}/ocaml/lablgtk3/liblablgtk3_stubs.a
178 %if %{with ocaml_opt}
179 %{_libdir}/ocaml/lablgtk3/*.cmx
180 %{_libdir}/ocaml/lablgtk3/lablgtk3.a
181 %{_libdir}/ocaml/lablgtk3/lablgtk3.cmxa
183 %{_libdir}/ocaml/lablgtk3/gdk_tags.h
184 %{_libdir}/ocaml/lablgtk3/gtk_tags.h
185 %{_libdir}/ocaml/lablgtk3/ml_*.h
186 %{_libdir}/ocaml/lablgtk3/pango_tags.h
187 %{_libdir}/ocaml/lablgtk3/wrappers.h
188 %{_libdir}/ocaml/lablgtk3/dune-package
189 %{_libdir}/ocaml/lablgtk3/opam
190 %{_examplesdir}/%{name}-%{version}
193 %defattr(644,root,root,755)
194 %dir %{_libdir}/ocaml/lablgtk3-gtkspell3
195 %{_libdir}/ocaml/lablgtk3-gtkspell3/META
196 %{_libdir}/ocaml/lablgtk3-gtkspell3/lablgtk3_gtkspell3.cma
197 %if %{with ocaml_opt}
198 %attr(755,root,root) %{_libdir}/ocaml/lablgtk3-gtkspell3/lablgtk3_gtkspell3.cmxs
200 %attr(755,root,root) %{_libdir}/ocaml/stublibs/dlllablgtk3_gtkspell3_stubs.so
202 %files gtkspell-devel
203 %defattr(644,root,root,755)
204 %{_libdir}/ocaml/lablgtk3-gtkspell3/*.cmi
205 %{_libdir}/ocaml/lablgtk3-gtkspell3/*.cmt
206 %{_libdir}/ocaml/lablgtk3-gtkspell3/*.cmti
207 %{_libdir}/ocaml/lablgtk3-gtkspell3/*.mli
208 %{_libdir}/ocaml/lablgtk3-gtkspell3/liblablgtk3_gtkspell3_stubs.a
209 %if %{with ocaml_opt}
210 %{_libdir}/ocaml/lablgtk3-gtkspell3/*.cmx
211 %{_libdir}/ocaml/lablgtk3-gtkspell3/lablgtk3_gtkspell3.a
212 %{_libdir}/ocaml/lablgtk3-gtkspell3/lablgtk3_gtkspell3.cmxa
214 %{_libdir}/ocaml/lablgtk3-gtkspell3/dune-package
215 %{_libdir}/ocaml/lablgtk3-gtkspell3/opam
218 %defattr(644,root,root,755)
219 %dir %{_libdir}/ocaml/lablgtk3-sourceview3
220 %{_libdir}/ocaml/lablgtk3-sourceview3/META
221 %{_libdir}/ocaml/lablgtk3-sourceview3/lablgtk3_sourceview3.cma
222 %if %{with ocaml_opt}
223 %attr(755,root,root) %{_libdir}/ocaml/lablgtk3-sourceview3/lablgtk3_sourceview3.cmxs
225 %attr(755,root,root) %{_libdir}/ocaml/stublibs/dlllablgtk3_sourceview3_stubs.so
227 %files gtksourceview-devel
228 %defattr(644,root,root,755)
229 %{_libdir}/ocaml/lablgtk3-sourceview3/*.cmi
230 %{_libdir}/ocaml/lablgtk3-sourceview3/*.cmt
231 %{_libdir}/ocaml/lablgtk3-sourceview3/*.cmti
232 %{_libdir}/ocaml/lablgtk3-sourceview3/*.mli
233 %{_libdir}/ocaml/lablgtk3-sourceview3/liblablgtk3_sourceview3_stubs.a
234 %if %{with ocaml_opt}
235 %{_libdir}/ocaml/lablgtk3-sourceview3/*.cmx
236 %{_libdir}/ocaml/lablgtk3-sourceview3/lablgtk3_sourceview3.a
237 %{_libdir}/ocaml/lablgtk3-sourceview3/lablgtk3_sourceview3.cmxa
239 %{_libdir}/ocaml/lablgtk3-sourceview3/dune-package
240 %{_libdir}/ocaml/lablgtk3-sourceview3/opam
243 %defattr(644,root,root,755)
244 %attr(755,root,root) %{_bindir}/gdk_pixbuf_mlsource3
245 %attr(755,root,root) %{_bindir}/lablgladecc3
246 %{_mandir}/man1/gdk_pixbuf_mlsource3.1*
247 %{_mandir}/man1/lablgladecc3.1*