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:3.09.2
11 Summary: OpenGL binding for OCaml
12 Summary(pl.UTF-8): Wiązania OpenGL dla OCamla
18 #Source0Download: https://forge.ocamlcore.org/frs/?group_id=291
19 Source0: https://forge.ocamlcore.org/frs/download.php/1254/lablgl-%{version}.tar.gz
20 # Source0-md5: b64662bf47f2973f836d33ae1365244f
21 URL: https://forge.ocamlcore.org/projects/lablgl/
22 BuildRequires: OpenGL-GLX-devel
23 BuildRequires: OpenGL-glut-devel >= 3.7
24 BuildRequires: ocaml >= %{ocaml_ver}
25 BuildRequires: ocaml-camlp4
26 BuildRequires: ocaml-labltk-devel
27 BuildRequires: tcl-devel
28 BuildRequires: tk-devel >= 4.0
29 BuildRequires: xorg-lib-libXmu-devel
30 %requires_eq ocaml-runtime
31 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
34 LablGL is an OpenGL interface for Objective Caml. All of the GL and
35 GLU libraries are available.
37 This package contains files needed to run bytecode executables using
40 %description -l pl.UTF-8
41 LablGL umożliwia używanie OpenGL w OCamlu. Dostępne są wszystkie
44 Pakiet ten zawiera binaria potrzebne do uruchamiania programów
45 używających tej biblioteki.
48 Summary: OpenGL binding for OCaml - development part
49 Summary(pl.UTF-8): Wiązania OpenGL dla OCamla - cześć programistyczna
50 Group: Development/Libraries
51 Requires: %{name} = %{version}-%{release}
55 LablGL is an OpenGL interface for Objective Caml. All of the GL and
56 GLU libraries are available.
58 This package contains files needed to develop OCaml programs using
61 %description devel -l pl.UTF-8
62 LablGL umożliwia używanie OpenGL w OCamlu. Dostępne są wszystkie
65 Pakiet ten zawiera pliki niezbędne do tworzenia programów używających
69 Summary: Tk widget for lablGL
70 Summary(pl.UTF-8): Widget Tk dla lablGL
72 Requires: %{name} = %{version}-%{release}
73 %requires_eq ocaml-labltk
74 %requires_eq ocaml-runtime
77 Togl Tk widget for lablGL, to be used with labltk.
79 This package contains files needed to run bytecode executables using
82 %description togl -l pl.UTF-8
83 Widget Togl używający Tk dla lablGL. Może być on używany wraz z
86 Pakiet ten zawiera binaria potrzebne do uruchamiania programów
87 używających tej biblioteki.
90 Summary: Tk widget for lablGL - development part
91 Summary(pl.UTF-8): Widget Tk dla lablGL - cześć programistyczna
92 Group: Development/Libraries
93 Requires: %{name} = %{version}-%{release}
95 %requires_eq ocaml-labltk-devel
97 %description togl-devel
98 Togl Tk widget for lablGL, to be used with labltk.
100 This package contains files needed to develop OCaml programs using
103 %description togl-devel -l pl.UTF-8
104 Widget Togl używający Tk dla lablGL. Może być on używany wraz z
107 Pakiet ten zawiera pliki niezbędne do tworzenia programów używających
111 Summary: GLUT binding for OCaml
112 Summary(pl.UTF-8): Wiązanie OCamla dla biblioteki GLUT
114 Requires: %{name} = %{version}-%{release}
115 %requires_eq ocaml-runtime
118 The lablglut library is an OCaml binding for GLUT version 3.7. GLUT
119 (GL Utility Toolkit) is a portable windowing library for OpenGL,
120 written by Mark Kilgard.
122 %description glut -l pl.UTF-8
123 Biblioteka lablglut to wiązanie OCamla dla biblioteki GLUT w wersji
124 3.7. GLUT (czyli GL Utility Toolkit) to przenośna biblioteka okienkowa
125 dla OpenGL-a, napisana przez Marka Kilgarda.
128 Summary: GLUT binding for OCaml - development part
129 Summary(pl.UTF-8): Wiązanie OCamla dla biblioteki GLUT - część programistyczna
130 Group: Development/Libraries
131 Requires: %{name} = %{version}-%{release}
134 %description glut-devel
135 This package contains development files for GLUT binding for OCaml.
137 %description glut-devel -l pl.UTF-8
138 Ten pakiet zawiera pliki programistyczne wiązania OCamla dla
142 Summary: OpenGL binding for OCaml - interactive system
143 Summary(pl.UTF-8): Wiązania OpenGL dla OCamla - system interaktywny
144 Group: Development/Libraries
145 Requires: %{name} = %{version}-%{release}
148 %description toplevel
149 LablGL is an OpenGL interface for Objective Caml. All of the GL and
150 GLU libraries are available.
152 This package contains OCaml toplevel interactive system linked with
155 %description toplevel -l pl.UTF-8
156 LablGL umożliwia używanie OpenGL w OCamlu. Dostępne są wszystkie
159 Pakiet ten zawiera system interaktywny OCamla skonsolidowany z lablgl.
162 %setup -q -n lablgl-%{version}
165 sed -e 's|^\(X\|TK\)INCLUDES|#&|;
166 s|^GLLIBS.*|GLLIBS = -lGL -lGLU -lXmu|;
167 s|^COPTS.*|COPTS = %{rpmcflags} -c -fPIC|;' \
168 Makefile.config.ex > Makefile.config
169 %{__make} -j1 all %{?with_ocaml_opt:opt}
172 rm -rf $RPM_BUILD_ROOT
173 install -d $RPM_BUILD_ROOT{%{_bindir},%{_libdir}/ocaml/{stublibs,site-lib/{lablgl,togl}}} \
174 $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version}/{LablGlut,Togl}
177 INSTALLDIR=$RPM_BUILD_ROOT%{_libdir}/ocaml/lablGL \
178 DLLDIR=$RPM_BUILD_ROOT%{_libdir}/ocaml/stublibs \
179 LIBDIR=$RPM_BUILD_ROOT%{_libdir}/ocaml \
180 BINDIR=$RPM_BUILD_ROOT%{_bindir}
182 mv -f $RPM_BUILD_ROOT%{_libdir}/ocaml/lablGL/*.mli .
184 cp -r LablGlut/examples/* $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version}/LablGlut
185 cp -r Togl/examples/* $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version}/Togl
187 cat > $RPM_BUILD_ROOT%{_libdir}/ocaml/site-lib/lablgl/META <<EOF
188 # Specifications for the "lablgl" library:
190 version = "%{version}"
191 directory = "+lablGL"
192 archive(byte) = "lablgl.cma"
193 archive(native) = "lablgl.cmxa"
197 cat > $RPM_BUILD_ROOT%{_libdir}/ocaml/site-lib/togl/META <<EOF
198 # Specifications for the "togl" library:
200 version = "%{version}"
201 directory = "+lablGL"
202 archive(byte) = "togl.cma"
203 archive(native) = "togl.cmxa"
208 rm -rf $RPM_BUILD_ROOT
211 %defattr(644,root,root,755)
212 %doc COPYRIGHT CHANGES README
213 %attr(755,root,root) %{_libdir}/ocaml/stublibs/dlllablgl.so
216 %defattr(644,root,root,755)
218 %dir %{_libdir}/ocaml/lablGL
219 %{_libdir}/ocaml/lablGL/build.ml
220 %{_libdir}/ocaml/lablGL/gl*
221 %{_libdir}/ocaml/lablGL/lablgl.*
222 %{_libdir}/ocaml/lablGL/liblablgl.a
223 %{_libdir}/ocaml/lablGL/raw.*
224 %{_libdir}/ocaml/site-lib/lablgl
225 %{_examplesdir}/%{name}-%{version}
228 %defattr(644,root,root,755)
229 %attr(755,root,root) %{_libdir}/ocaml/stublibs/dlllablglut.so
232 %defattr(644,root,root,755)
233 %{_libdir}/ocaml/lablGL/lablglut.*
234 %{_libdir}/ocaml/lablGL/liblablglut.a
237 %defattr(644,root,root,755)
238 %attr(755,root,root) %{_libdir}/ocaml/stublibs/dlltogl.so
241 %defattr(644,root,root,755)
242 %{_libdir}/ocaml/lablGL/togl.*
243 %{_libdir}/ocaml/lablGL/libtogl.a
244 %{_libdir}/ocaml/site-lib/togl
247 %defattr(644,root,root,755)
248 %attr(755,root,root) %{_bindir}/lablgl
249 %attr(755,root,root) %{_bindir}/lablglut