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 %if %{without ocaml_opt}
11 %define _enable_debug_packages 0
14 %define ocaml_ver 1:3.09.2
15 Summary: OpenGL binding for OCaml
16 Summary(pl.UTF-8): Wiązania OpenGL dla OCamla
22 #Source0Download: https://forge.ocamlcore.org/frs/?group_id=291
23 Source0: https://github.com/garrigue/lablgl/archive/v%{version}/lablgl-%{version}.tar.gz
24 # Source0-md5: 8ee7a37b016095c4f7cd066f0ebd4436
25 URL: http://wwwfun.kurims.kyoto-u.ac.jp/soft/olabl/lablgl.html
26 BuildRequires: OpenGL-GLX-devel
27 BuildRequires: OpenGL-glut-devel >= 3.7
28 BuildRequires: ocaml >= %{ocaml_ver}
29 BuildRequires: ocaml-camlp4
30 BuildRequires: ocaml-labltk-devel
31 BuildRequires: tcl-devel
32 BuildRequires: tk-devel >= 4.0
33 BuildRequires: xorg-lib-libXmu-devel
34 %requires_eq ocaml-runtime
35 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
38 LablGL is an OpenGL interface for Objective Caml. All of the GL and
39 GLU libraries are available.
41 This package contains files needed to run bytecode executables using
44 %description -l pl.UTF-8
45 LablGL umożliwia używanie OpenGL w OCamlu. Dostępne są wszystkie
48 Pakiet ten zawiera binaria potrzebne do uruchamiania programów
49 używających tej biblioteki.
52 Summary: OpenGL binding for OCaml - development part
53 Summary(pl.UTF-8): Wiązania OpenGL dla OCamla - cześć programistyczna
54 Group: Development/Libraries
55 Requires: %{name} = %{version}-%{release}
59 LablGL is an OpenGL interface for Objective Caml. All of the GL and
60 GLU libraries are available.
62 This package contains files needed to develop OCaml programs using
65 %description devel -l pl.UTF-8
66 LablGL umożliwia używanie OpenGL w OCamlu. Dostępne są wszystkie
69 Pakiet ten zawiera pliki niezbędne do tworzenia programów używających
73 Summary: Tk widget for lablGL
74 Summary(pl.UTF-8): Widget Tk dla lablGL
76 Requires: %{name} = %{version}-%{release}
77 %requires_eq ocaml-labltk
78 %requires_eq ocaml-runtime
81 Togl Tk widget for lablGL, to be used with labltk.
83 This package contains files needed to run bytecode executables using
86 %description togl -l pl.UTF-8
87 Widget Togl używający Tk dla lablGL. Może być on używany wraz z
90 Pakiet ten zawiera binaria potrzebne do uruchamiania programów
91 używających tej biblioteki.
94 Summary: Tk widget for lablGL - development part
95 Summary(pl.UTF-8): Widget Tk dla lablGL - cześć programistyczna
96 Group: Development/Libraries
97 Requires: %{name} = %{version}-%{release}
99 %requires_eq ocaml-labltk-devel
101 %description togl-devel
102 Togl Tk widget for lablGL, to be used with labltk.
104 This package contains files needed to develop OCaml programs using
107 %description togl-devel -l pl.UTF-8
108 Widget Togl używający Tk dla lablGL. Może być on używany wraz z
111 Pakiet ten zawiera pliki niezbędne do tworzenia programów używających
115 Summary: GLUT binding for OCaml
116 Summary(pl.UTF-8): Wiązanie OCamla dla biblioteki GLUT
118 Requires: %{name} = %{version}-%{release}
119 %requires_eq ocaml-runtime
122 The lablglut library is an OCaml binding for GLUT version 3.7. GLUT
123 (GL Utility Toolkit) is a portable windowing library for OpenGL,
124 written by Mark Kilgard.
126 %description glut -l pl.UTF-8
127 Biblioteka lablglut to wiązanie OCamla dla biblioteki GLUT w wersji
128 3.7. GLUT (czyli GL Utility Toolkit) to przenośna biblioteka okienkowa
129 dla OpenGL-a, napisana przez Marka Kilgarda.
132 Summary: GLUT binding for OCaml - development part
133 Summary(pl.UTF-8): Wiązanie OCamla dla biblioteki GLUT - część programistyczna
134 Group: Development/Libraries
135 Requires: %{name} = %{version}-%{release}
138 %description glut-devel
139 This package contains development files for GLUT binding for OCaml.
141 %description glut-devel -l pl.UTF-8
142 Ten pakiet zawiera pliki programistyczne wiązania OCamla dla
146 Summary: OpenGL binding for OCaml - interactive system
147 Summary(pl.UTF-8): Wiązania OpenGL dla OCamla - system interaktywny
148 Group: Development/Libraries
149 Requires: %{name} = %{version}-%{release}
152 %description toplevel
153 LablGL is an OpenGL interface for Objective Caml. All of the GL and
154 GLU libraries are available.
156 This package contains OCaml toplevel interactive system linked with
159 %description toplevel -l pl.UTF-8
160 LablGL umożliwia używanie OpenGL w OCamlu. Dostępne są wszystkie
163 Pakiet ten zawiera system interaktywny OCamla skonsolidowany z lablgl.
166 %setup -q -n lablgl-%{version}
168 find LablGlut/examples -name '*.ml' -print0 | xargs --null \
169 %{__sed} -E -i -e '1s,#!\s*/usr/bin/env\s+lablglut(\s|$),#!%{_bindir}/lablglut\1,' \
172 sed -e 's|^\(X\|TK\)INCLUDES|#&|;
173 s|^GLLIBS.*|GLLIBS = -lGL -lGLU -lXmu|;
174 s|^COPTS.*|COPTS = %{rpmcflags} -c -fPIC|;' \
175 Makefile.config.ex > Makefile.config
176 %{__make} -j1 all %{?with_ocaml_opt:opt}
179 rm -rf $RPM_BUILD_ROOT
180 install -d $RPM_BUILD_ROOT{%{_bindir},%{_libdir}/ocaml/stublibs} \
181 $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version}/{LablGlut,Togl}
184 INSTALLDIR=$RPM_BUILD_ROOT%{_libdir}/ocaml/lablGL \
185 DLLDIR=$RPM_BUILD_ROOT%{_libdir}/ocaml/stublibs \
186 LIBDIR=$RPM_BUILD_ROOT%{_libdir}/ocaml \
187 BINDIR=$RPM_BUILD_ROOT%{_bindir}
189 mv -f $RPM_BUILD_ROOT%{_libdir}/ocaml/lablGL/*.mli .
191 cp -r LablGlut/examples/* $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version}/LablGlut
192 cp -r Togl/examples/* $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version}/Togl
194 cp -p META $RPM_BUILD_ROOT%{_libdir}/ocaml/lablGL
197 rm -rf $RPM_BUILD_ROOT
200 %defattr(644,root,root,755)
201 %doc COPYRIGHT CHANGES README
202 %dir %{_libdir}/ocaml/lablGL
203 %{_libdir}/ocaml/lablGL/META
204 %attr(755,root,root) %{_libdir}/ocaml/stublibs/dlllablgl.so
207 %defattr(644,root,root,755)
209 %{_libdir}/ocaml/lablGL/build.ml
210 %{_libdir}/ocaml/lablGL/gl*
211 %{_libdir}/ocaml/lablGL/lablgl.*
212 %{_libdir}/ocaml/lablGL/liblablgl.a
213 %{_libdir}/ocaml/lablGL/raw.*
214 %{_examplesdir}/%{name}-%{version}
217 %defattr(644,root,root,755)
218 %attr(755,root,root) %{_libdir}/ocaml/stublibs/dlllablglut.so
221 %defattr(644,root,root,755)
222 %{_libdir}/ocaml/lablGL/lablglut.*
223 %{_libdir}/ocaml/lablGL/liblablglut.a
226 %defattr(644,root,root,755)
227 %attr(755,root,root) %{_libdir}/ocaml/stublibs/dlltogl.so
230 %defattr(644,root,root,755)
231 %{_libdir}/ocaml/lablGL/togl.*
232 %{_libdir}/ocaml/lablGL/libtogl.a
235 %defattr(644,root,root,755)
236 %attr(755,root,root) %{_bindir}/lablgl
237 %attr(755,root,root) %{_bindir}/lablglut