1 %define ocaml_ver 1:3.09.2
2 Summary: OpenGL binding for OCaml
3 Summary(pl.UTF-8): Wiązania OpenGL dla OCamla
9 Source0: http://wwwfun.kurims.kyoto-u.ac.jp/soft/olabl/dist/lablgl-%{version}.tar.gz
10 # Source0-md5: dcf05a0cffffdf06cbe0fe55f9eff974
11 Patch0: %{name}-tk85.patch
12 URL: http://wwwfun.kurims.kyoto-u.ac.jp/soft/olabl/lablgl.html
13 BuildRequires: OpenGL-GLX-devel
14 BuildRequires: OpenGL-glut-devel >= 3.7
15 BuildRequires: ocaml >= %{ocaml_ver}
16 BuildRequires: ocaml-camlp4
17 BuildRequires: ocaml-labltk-devel
18 BuildRequires: tcl-devel
19 BuildRequires: tk-devel >= 4.0
20 BuildRequires: xorg-lib-libXmu-devel
21 %requires_eq ocaml-runtime
22 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
25 LablGL is an OpenGL interface for Objective Caml. All of the GL and
26 GLU libraries are available.
28 This package contains files needed to run bytecode executables using
31 %description -l pl.UTF-8
32 LablGL umożliwia używanie OpenGL w OCamlu. Dostępne są wszystkie
35 Pakiet ten zawiera binaria potrzebne do uruchamiania programów
36 używających tej biblioteki.
39 Summary: OpenGL binding for OCaml - development part
40 Summary(pl.UTF-8): Wiązania OpenGL dla OCamla - cześć programistyczna
41 Group: Development/Libraries
42 Requires: %{name} = %{version}-%{release}
46 LablGL is an OpenGL interface for Objective Caml. All of the GL and
47 GLU libraries are available.
49 This package contains files needed to develop OCaml programs using
52 %description devel -l pl.UTF-8
53 LablGL umożliwia używanie OpenGL w OCamlu. Dostępne są wszystkie
56 Pakiet ten zawiera pliki niezbędne do tworzenia programów używających
60 Summary: Tk widget for lablGL
61 Summary(pl.UTF-8): Widget Tk dla lablGL
63 Requires: %{name} = %{version}-%{release}
64 %requires_eq ocaml-labltk
65 %requires_eq ocaml-runtime
68 Togl Tk widget for lablGL, to be used with labltk.
70 This package contains files needed to run bytecode executables using
73 %description togl -l pl.UTF-8
74 Widget Togl używający Tk dla lablGL. Może być on używany wraz z
77 Pakiet ten zawiera binaria potrzebne do uruchamiania programów
78 używających tej biblioteki.
81 Summary: Tk widget for lablGL - development part
82 Summary(pl.UTF-8): Widget Tk dla lablGL - cześć programistyczna
83 Group: Development/Libraries
84 Requires: %{name} = %{version}-%{release}
86 %requires_eq ocaml-labltk-devel
88 %description togl-devel
89 Togl Tk widget for lablGL, to be used with labltk.
91 This package contains files needed to develop OCaml programs using
94 %description togl-devel -l pl.UTF-8
95 Widget Togl używający Tk dla lablGL. Może być on używany wraz z
98 Pakiet ten zawiera pliki niezbędne do tworzenia programów używających
102 Summary: GLUT binding for OCaml
103 Summary(pl.UTF-8): Wiązanie OCamla dla biblioteki GLUT
105 Requires: %{name} = %{version}-%{release}
106 %requires_eq ocaml-runtime
109 The lablglut library is an OCaml binding for GLUT version 3.7. GLUT
110 (GL Utility Toolkit) is a portable windowing library for OpenGL,
111 written by Mark Kilgard.
113 %description glut -l pl.UTF-8
114 Biblioteka lablglut to wiązanie OCamla dla biblioteki GLUT w wersji
115 3.7. GLUT (czyli GL Utility Toolkit) to przenośna biblioteka okienkowa
116 dla OpenGL-a, napisana przez Marka Kilgarda.
119 Summary: GLUT binding for OCaml - development part
120 Summary(pl.UTF-8): Wiązanie OCamla dla biblioteki GLUT - część programistyczna
121 Group: Development/Libraries
122 Requires: %{name} = %{version}-%{release}
125 %description glut-devel
126 This package contains development files for GLUT binding for OCaml.
128 %description glut-devel -l pl.UTF-8
129 Ten pakiet zawiera pliki programistyczne wiązania OCamla dla
133 Summary: OpenGL binding for OCaml - interactive system
134 Summary(pl.UTF-8): Wiązania OpenGL dla OCamla - system interaktywny
135 Group: Development/Libraries
136 Requires: %{name} = %{version}-%{release}
139 %description toplevel
140 LablGL is an OpenGL interface for Objective Caml. All of the GL and
141 GLU libraries are available.
143 This package contains OCaml toplevel interactive system linked with
146 %description toplevel -l pl.UTF-8
147 LablGL umożliwia używanie OpenGL w OCamlu. Dostępne są wszystkie
150 Pakiet ten zawiera system interaktywny OCamla skonsolidowany z lablgl.
153 %setup -q -n lablgl-%{version}
157 sed -e 's|^\(X\|TK\)INCLUDES|#&|;
158 s|^GLLIBS.*|GLLIBS = -lGL -lGLU -lXmu|;
159 s|^COPTS.*|COPTS = %{rpmcflags} -c -fPIC|;' \
160 Makefile.config.ex > Makefile.config
161 %{__make} -j1 all opt
164 rm -rf $RPM_BUILD_ROOT
165 install -d $RPM_BUILD_ROOT{%{_bindir},%{_libdir}/ocaml/{stublibs,site-lib/{lablgl,togl}}} \
166 $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version}/{LablGlut,Togl}
169 INSTALLDIR=$RPM_BUILD_ROOT%{_libdir}/ocaml/lablGL \
170 DLLDIR=$RPM_BUILD_ROOT%{_libdir}/ocaml/stublibs \
171 LIBDIR=$RPM_BUILD_ROOT%{_libdir}/ocaml \
172 BINDIR=$RPM_BUILD_ROOT%{_bindir}
174 mv -f $RPM_BUILD_ROOT%{_libdir}/ocaml/lablGL/*.mli .
176 cp -r LablGlut/examples/* $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version}/LablGlut
177 cp -r Togl/examples/* $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version}/Togl
179 cat > $RPM_BUILD_ROOT%{_libdir}/ocaml/site-lib/lablgl/META <<EOF
180 # Specifications for the "lablgl" library:
182 version = "%{version}"
183 directory = "+lablGL"
184 archive(byte) = "lablgl.cma"
185 archive(native) = "lablgl.cmxa"
189 cat > $RPM_BUILD_ROOT%{_libdir}/ocaml/site-lib/togl/META <<EOF
190 # Specifications for the "togl" library:
192 version = "%{version}"
193 directory = "+lablGL"
194 archive(byte) = "togl.cma"
195 archive(native) = "togl.cmxa"
200 rm -rf $RPM_BUILD_ROOT
203 %defattr(644,root,root,755)
204 %doc COPYRIGHT CHANGES README
205 %attr(755,root,root) %{_libdir}/ocaml/stublibs/dlllablgl.so
208 %defattr(644,root,root,755)
210 %dir %{_libdir}/ocaml/lablGL
211 %{_libdir}/ocaml/lablGL/gl*
212 %{_libdir}/ocaml/lablGL/lablgl.*
213 %{_libdir}/ocaml/lablGL/liblablgl.a
214 %{_libdir}/ocaml/lablGL/raw.*
215 %{_libdir}/ocaml/site-lib/lablgl
216 %{_examplesdir}/%{name}-%{version}
219 %defattr(644,root,root,755)
220 %attr(755,root,root) %{_libdir}/ocaml/stublibs/dlllablglut.so
223 %defattr(644,root,root,755)
224 %{_libdir}/ocaml/lablGL/lablglut.*
225 %{_libdir}/ocaml/lablGL/liblablglut.a
228 %defattr(644,root,root,755)
229 %attr(755,root,root) %{_libdir}/ocaml/stublibs/dlltogl.so
232 %defattr(644,root,root,755)
233 %{_libdir}/ocaml/lablGL/togl.*
234 %{_libdir}/ocaml/lablGL/libtogl.a
235 %{_libdir}/ocaml/site-lib/togl
238 %defattr(644,root,root,755)
239 %attr(755,root,root) %{_bindir}/*