3 %bcond_with opengl # build with lablgtkgl packages
4 %bcond_with glade # build with lablgtkglade packages
5 %bcond_with gnome # build with lablgtkgnome packages
7 %define ocaml_ver 1:3.09.2
8 Summary: GTK+ binding for OCaml
9 Summary(pl.UTF-8): Wiązania GTK+ dla OCamla
14 License: LGPL w/ linking exceptions
16 Source0: http://wwwfun.kurims.kyoto-u.ac.jp/soft/olabl/dist/lablgtk-%{version}.tar.gz
17 # Source0-md5: 73a797e3a459190fdcaa8288935f6fb9
18 URL: http://wwwfun.kurims.kyoto-u.ac.jp/soft/olabl/lablgtk.html
19 BuildRequires: gdk-pixbuf-devel
20 %{?with_gnome:BuildRequires: gnome-libs-devel}
21 BuildRequires: gtk+-devel
22 %{?with_opengl:BuildRequires: gtkglarea1-devel >= 1.2.0}
23 %{?with_glade:BuildRequires: libglade-devel}
24 %if %{with glade} && %{with gnome}
25 BuildRequires: libglade-gnome-devel
27 BuildRequires: libxml-devel
28 BuildRequires: ocaml-camlp4 >= %{ocaml_ver}
29 %{?with_opengl:BuildRequires: ocaml-lablgl-devel}
31 %requires_eq ocaml-runtime
33 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
36 GTK+ binding for OCaml. This package contains files needed to run
37 bytecode OCaml programs using LablGtk.
39 %description -l pl.UTF-8
40 Wiązania GTK+ dla OCamla. Pakiet ten zawiera binaria potrzebne do
41 uruchamiania programów używających LablGtk.
44 Summary: GTK+ binding for OCaml - development part
45 Summary(pl.UTF-8): Wiązania GTK+ dla OCamla - cześć programistyczna
46 Group: Development/Libraries
47 Requires: %{name} = %{epoch}:%{version}-%{release}
49 %{?with_opengl:%requires_eq ocaml-lablgl-devel}
50 Obsoletes: lablgtk-examples
53 GTK+ binding for OCaml. This package contains files needed to develop
54 OCaml programs using LablGtk.
56 %description devel -l pl.UTF-8
57 Wiązania GTK+ dla OCamla. Pakiet ten zawiera pliki niezbędne do
58 tworzenia programów używających LablGtk.
61 Summary: GTK+ binding for OCaml - GNOME support
62 Summary(pl.UTF-8): Wiązania GTK+ dla OCamla - wsparcie dla GNOME
64 Requires: %{name} = %{epoch}:%{version}-%{release}
65 %requires_eq ocaml-runtime
68 GTK+ binding for OCaml, GNOME support. This package contains files
69 needed to run bytecode OCaml programs using LablGtk-GNOME.
71 %description gnome -l pl.UTF-8
72 Wiązania GTK+ dla OCamla, wsparcie dla GNOME. Pakiet ten zawiera
73 binaria potrzebne do uruchamiania programów używających LablGtk-GNOME.
76 Summary: GTK+ binding for OCaml - GNOME support, development part
77 Summary(pl.UTF-8): Wiązania GTK+ dla OCamla - wsparcie dla GNOME, część programistyczna
78 Group: Development/Libraries
79 Requires: %{name}-gnome = %{epoch}:%{version}-%{release}
82 %description gnome-devel
83 GTK+ binding for OCaml, GNOME support. This package contains files
84 needed to develop OCaml programs using LablGtk-GNOME.
86 %description gnome-devel -l pl.UTF-8
87 Wiązania GTK+ dla OCamla, wsparcie dla GNOME. Pakiet ten zawiera pliki
88 niezbędne do tworzenia programów używających LablGtk-GNOME.
91 Summary: GTK+ binding for OCaml - Glade support
92 Summary(pl.UTF-8): Wiązania GTK+ dla OCamla - wsparcie dla Glade
94 Requires: %{name} = %{epoch}:%{version}-%{release}
95 %requires_eq ocaml-runtime
98 GTK+ binding for OCaml, Glade support. This package contains files
99 needed to run bytecode OCaml programs using LablGtk-Glade.
101 %description glade -l pl.UTF-8
102 Wiązania GTK+ dla OCamla, wsparcie dla Glade. Pakiet ten zawiera
103 binaria potrzebne do uruchamiania programów używających LablGtk-Glade.
106 Summary: GTK+ binding for OCaml - Glade support, development part
107 Summary(pl.UTF-8): Wiązania GTK+ dla OCamla - wsparcie dla Glade, część programistyczna
108 Group: Development/Libraries
109 Requires: %{name}-glade = %{epoch}:%{version}-%{release}
112 %description glade-devel
113 GTK+ binding for OCaml, Glade support. This package contains files
114 needed to develop OCaml programs using LablGtk-Glade.
116 %description glade-devel -l pl.UTF-8
117 Wiązania GTK+ dla OCamla, wsparcie dla Glade. Pakiet ten zawiera pliki
118 niezbędne do tworzenia programów używających LablGtk-Glade.
121 Summary: GTK+ binding for OCaml - GtkGL support
122 Summary(pl.UTF-8): Wiązania GTK+ dla OCamla - wsparcie dla GtkGL
124 Requires: %{name} = %{epoch}:%{version}-%{release}
125 %requires_eq ocaml-runtime
126 %{?with_opengl:%requires_eq ocaml-lablgl}
129 GTK+ binding for OCaml, GtkGL support. This package contains files
130 needed to run bytecode OCaml programs using LablGtk-GtkGL.
132 %description gl -l pl.UTF-8
133 Wiązania GTK+ dla OCamla, wsparcie dla GtkGL. Pakiet ten zawiera
134 binaria potrzebne do uruchamiania programów używających LablGtk-GtkGL.
137 Summary: GTK+ binding for OCaml - GtkGL support, development part
138 Summary(pl.UTF-8): Wiązania GTK+ dla OCamla - wsparcie dla GtkGL, część programistyczna
139 Group: Development/Libraries
140 Requires: %{name}-gl = %{epoch}:%{version}-%{release}
142 %{?with_opengl:%requires_eq ocaml-lablgl-devel}
144 %description gl-devel
145 GTK+ binding for OCaml, GtkGL support. This package contains files
146 needed to develop OCaml programs using LablGtk-GtkGL.
148 %description gl-devel -l pl.UTF-8
149 Wiązania GTK+ dla OCamla, wsparcie dla GtkGL. Pakiet ten zawiera pliki
150 niezbędne do tworzenia programów używających LablGtk-GtkGL.
153 Summary: GTK+ binding for OCaml - interactive system
154 Summary(pl.UTF-8): Wiązania GTK+ dla OCamla - system interaktywny
155 Group: Development/Libraries
156 Requires: %{name}-devel = %{epoch}:%{version}-%{release}
159 %description toplevel
160 GTK+ binding for OCaml. GNOME and Glade support is included. This
161 package contains OCaml toplevel interactive system linked with
164 %description toplevel -l pl.UTF-8
165 Wiązania GTK+ dla OCamla. Wsparcie dla GNOME i Glade jest dołączone.
166 Pakiet ten zawiera system interaktywny OCamla skonsolidowany z
170 %setup -q -n lablgtk-%{version}
173 %{__make} configure \
174 CC="%{__cc} %{rpmcflags} -fPIC" \
176 %{?with_gnome:USE_GNOME=1} \
177 %{?with_glade:USE_GLADE=1} \
178 %{?with_opengl:USE_GL=1}
180 %{__make} all opt -j1 \
181 LABLGLDIR=%{_libdir}/ocaml/lablgl
184 rm -rf $RPM_BUILD_ROOT
185 install -d $RPM_BUILD_ROOT{%{_bindir},%{_libdir}/ocaml/stublibs}
188 INSTALLDIR=$RPM_BUILD_ROOT%{_libdir}/ocaml/lablgtk \
189 DLLDIR=$RPM_BUILD_ROOT%{_libdir}/ocaml/stublibs \
190 LIBDIR=$RPM_BUILD_ROOT%{_libdir}/ocaml \
191 BINDIR=$RPM_BUILD_ROOT%{_bindir}
193 install -d $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version}
194 cp -r examples/* $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version}
196 # .mli files stay, they are the only documentation, but .ml go
197 rm -f $RPM_BUILD_ROOT%{_libdir}/ocaml/lablgtk/*.ml
198 gzip -9nf $RPM_BUILD_ROOT%{_libdir}/ocaml/lablgtk/*.mli
199 mv $RPM_BUILD_ROOT%{_libdir}/ocaml/lablgtk/*.gz .
201 # make METAs for findlib
202 install -d $RPM_BUILD_ROOT%{_libdir}/ocaml/site-lib/labl{gtk,gnome,glade,gtkgl}
203 cat > $RPM_BUILD_ROOT%{_libdir}/ocaml/site-lib/lablgtk/META <<EOF
204 # Specifications for the "lablgtk" library:
206 version = "%{version}"
207 directory = "+lablgtk"
208 archive(byte) = "lablgtk.cma gtkInit.cmo"
209 archive(native) = "lablgtk.cmxa gtkInit.cmx"
213 for f in gnome glade gtkgl ; do
214 cat > $RPM_BUILD_ROOT%{_libdir}/ocaml/site-lib/labl$f/META <<EOF
215 # Specifications for the "lablgtk" library:
217 version = "%{version}"
218 directory = "+lablgtk"
219 archive(byte) = "labl$f.cma"
220 archive(native) = "labl$f.cmxa"
226 rm -rf $RPM_BUILD_ROOT
229 %defattr(644,root,root,755)
230 %attr(755,root,root) %{_libdir}/ocaml/stublibs/dlllablgtk.so
233 %defattr(644,root,root,755)
234 %doc CHANGES COPYING README
235 %dir %{_libdir}/ocaml/lablgtk
236 %{_libdir}/ocaml/lablgtk/g[BCDELMOPRTUWadp]*.cm*
237 %{_libdir}/ocaml/lablgtk/glib.cm*
238 %{_libdir}/ocaml/lablgtk/gtk.cm*
239 %{_libdir}/ocaml/lablgtk/gtk[ABDEILMNPRSTW]*.cm*
240 # hmm.. where did xml_lexer go?
241 #%%{_libdir}/ocaml/lablgtk/x*.cm*
242 %{_libdir}/ocaml/lablgtk/*.[ho]
243 %{_libdir}/ocaml/lablgtk/lablgtk.*
244 %{_libdir}/ocaml/lablgtk/liblablgtk.*
245 %attr(755,root,root) %{_libdir}/ocaml/lablgtk/varcc
246 %{_examplesdir}/%{name}-%{version}
247 %{_libdir}/ocaml/site-lib/lablgtk
251 %defattr(644,root,root,755)
252 %attr(755,root,root) %{_libdir}/ocaml/stublibs/dlllablgnome.so
253 %{_libdir}/ocaml/dlllablgnome.so
256 %defattr(644,root,root,755)
257 %{_libdir}/ocaml/lablgtk/gtkXmHTML.cm*
258 %{_libdir}/ocaml/lablgtk/gHtml.cm*
259 %{_libdir}/ocaml/lablgtk/lablgnome.*
260 %{_libdir}/ocaml/lablgtk/liblablgnome.*
261 %{_libdir}/ocaml/site-lib/lablgnome
266 %defattr(644,root,root,755)
267 %attr(755,root,root) %{_libdir}/ocaml/stublibs/dlllablglade.so
268 %{_libdir}/ocaml/dlllablglade.so
271 %defattr(644,root,root,755)
272 %attr(755,root,root) %{_bindir}/lablgladecc
273 %{_libdir}/ocaml/lablgtk/glade.cm*
274 %{_libdir}/ocaml/lablgtk/lablglade.*
275 %{_libdir}/ocaml/lablgtk/liblablglade.*
276 %{_libdir}/ocaml/site-lib/lablglade
281 %defattr(644,root,root,755)
282 %attr(755,root,root) %{_libdir}/ocaml/stublibs/dlllablgtkgl.so
283 %{_libdir}/ocaml/dlllablgtkgl.so
286 %defattr(644,root,root,755)
287 %{_libdir}/ocaml/lablgtk/glGtk.cm*
288 %{_libdir}/ocaml/lablgtk/lablgtkgl.*
289 %{_libdir}/ocaml/lablgtk/liblablgtkgl.*
290 %{_libdir}/ocaml/site-lib/lablgtkgl
294 %defattr(644,root,root,755)
295 %attr(755,root,root) %{_bindir}/lablgtk
296 %attr(755,root,root) %{_libdir}/ocaml/lablgtk/lablgtktop
297 %attr(755,root,root) %{_libdir}/ocaml/lablgtk/lablgtktop_t