]>
Commit | Line | Data |
---|---|---|
fca531cd JR |
1 | # |
2 | # Conditional build: | |
3 | %bcond_without ocaml_opt # skip building native optimized binaries (bytecode is always built) | |
4 | ||
5 | %ifarch x32 | |
6 | # not yet available on x32 (ocaml 4.02.1), remove when upstream will support it | |
7 | %undefine with_ocaml_opt | |
8 | %endif | |
9 | ||
ad2dbbb1 | 10 | %define ocaml_ver 1:3.09.2 |
d0c4eccb | 11 | Summary: OpenGL binding for OCaml |
86a9d925 | 12 | Summary(pl.UTF-8): Wiązania OpenGL dla OCamla |
d0c4eccb | 13 | Name: ocaml-lablgl |
1cb8f00c | 14 | Version: 1.05 |
fca531cd | 15 | Release: 2 |
d0c4eccb MM |
16 | License: BSD |
17 | Group: Libraries | |
af5fc04e | 18 | #Source0Download: https://forge.ocamlcore.org/frs/?group_id=291 |
1cb8f00c JR |
19 | Source0: https://forge.ocamlcore.org/frs/download.php/1254/lablgl-%{version}.tar.gz |
20 | # Source0-md5: b64662bf47f2973f836d33ae1365244f | |
af5fc04e | 21 | URL: https://forge.ocamlcore.org/projects/lablgl/ |
4d49067c JB |
22 | BuildRequires: OpenGL-GLX-devel |
23 | BuildRequires: OpenGL-glut-devel >= 3.7 | |
5444590c | 24 | BuildRequires: ocaml >= %{ocaml_ver} |
06fa1cd1 | 25 | BuildRequires: ocaml-camlp4 |
d0c4eccb | 26 | BuildRequires: ocaml-labltk-devel |
d0c4eccb | 27 | BuildRequires: tcl-devel |
4d49067c JB |
28 | BuildRequires: tk-devel >= 4.0 |
29 | BuildRequires: xorg-lib-libXmu-devel | |
d0c4eccb MM |
30 | %requires_eq ocaml-runtime |
31 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) | |
32 | ||
33 | %description | |
34 | LablGL is an OpenGL interface for Objective Caml. All of the GL and | |
35 | GLU libraries are available. | |
36 | ||
37 | This package contains files needed to run bytecode executables using | |
38 | this library. | |
39 | ||
f2f3d6fe JR |
40 | %description -l pl.UTF-8 |
41 | LablGL umożliwia używanie OpenGL w OCamlu. Dostępne są wszystkie | |
d0c4eccb MM |
42 | biblioteki GL i GLU. |
43 | ||
f2f3d6fe JR |
44 | Pakiet ten zawiera binaria potrzebne do uruchamiania programów |
45 | używających tej biblioteki. | |
d0c4eccb MM |
46 | |
47 | %package devel | |
48 | Summary: OpenGL binding for OCaml - development part | |
86a9d925 | 49 | Summary(pl.UTF-8): Wiązania OpenGL dla OCamla - cześć programistyczna |
d0c4eccb MM |
50 | Group: Development/Libraries |
51 | Requires: %{name} = %{version}-%{release} | |
52 | %requires_eq ocaml | |
53 | ||
54 | %description devel | |
55 | LablGL is an OpenGL interface for Objective Caml. All of the GL and | |
56 | GLU libraries are available. | |
57 | ||
58 | This package contains files needed to develop OCaml programs using | |
59 | this library. | |
60 | ||
f2f3d6fe JR |
61 | %description devel -l pl.UTF-8 |
62 | LablGL umożliwia używanie OpenGL w OCamlu. Dostępne są wszystkie | |
d0c4eccb MM |
63 | biblioteki GL i GLU. |
64 | ||
f2f3d6fe | 65 | Pakiet ten zawiera pliki niezbędne do tworzenia programów używających |
d0c4eccb MM |
66 | tej biblioteki. |
67 | ||
68 | %package togl | |
69 | Summary: Tk widget for lablGL | |
86a9d925 | 70 | Summary(pl.UTF-8): Widget Tk dla lablGL |
d0c4eccb MM |
71 | Group: Libraries |
72 | Requires: %{name} = %{version}-%{release} | |
d0c4eccb | 73 | %requires_eq ocaml-labltk |
4d49067c | 74 | %requires_eq ocaml-runtime |
d0c4eccb MM |
75 | |
76 | %description togl | |
77 | Togl Tk widget for lablGL, to be used with labltk. | |
78 | ||
79 | This package contains files needed to run bytecode executables using | |
80 | this library. | |
81 | ||
f2f3d6fe JR |
82 | %description togl -l pl.UTF-8 |
83 | Widget Togl używający Tk dla lablGL. Może być on używany wraz z | |
d0c4eccb MM |
84 | labltk. |
85 | ||
f2f3d6fe JR |
86 | Pakiet ten zawiera binaria potrzebne do uruchamiania programów |
87 | używających tej biblioteki. | |
d0c4eccb MM |
88 | |
89 | %package togl-devel | |
90 | Summary: Tk widget for lablGL - development part | |
86a9d925 | 91 | Summary(pl.UTF-8): Widget Tk dla lablGL - cześć programistyczna |
d0c4eccb MM |
92 | Group: Development/Libraries |
93 | Requires: %{name} = %{version}-%{release} | |
94 | %requires_eq ocaml | |
95 | %requires_eq ocaml-labltk-devel | |
96 | ||
97 | %description togl-devel | |
42bac6fb | 98 | Togl Tk widget for lablGL, to be used with labltk. |
d0c4eccb MM |
99 | |
100 | This package contains files needed to develop OCaml programs using | |
101 | this library. | |
102 | ||
f2f3d6fe JR |
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 | |
d0c4eccb MM |
105 | labltk. |
106 | ||
f2f3d6fe | 107 | Pakiet ten zawiera pliki niezbędne do tworzenia programów używających |
d0c4eccb MM |
108 | tej biblioteki. |
109 | ||
4341aaa6 JB |
110 | %package glut |
111 | Summary: GLUT binding for OCaml | |
86a9d925 | 112 | Summary(pl.UTF-8): Wiązanie OCamla dla biblioteki GLUT |
4341aaa6 JB |
113 | Group: Libraries |
114 | Requires: %{name} = %{version}-%{release} | |
115 | %requires_eq ocaml-runtime | |
116 | ||
117 | %description glut | |
118 | The lablglut library is an OCaml binding for GLUT version 3.7. GLUT | |
5444590c | 119 | (GL Utility Toolkit) is a portable windowing library for OpenGL, |
4341aaa6 JB |
120 | written by Mark Kilgard. |
121 | ||
f2f3d6fe JR |
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 | |
4341aaa6 JB |
125 | dla OpenGL-a, napisana przez Marka Kilgarda. |
126 | ||
127 | %package glut-devel | |
128 | Summary: GLUT binding for OCaml - development part | |
86a9d925 | 129 | Summary(pl.UTF-8): Wiązanie OCamla dla biblioteki GLUT - część programistyczna |
4341aaa6 JB |
130 | Group: Development/Libraries |
131 | Requires: %{name} = %{version}-%{release} | |
132 | %requires_eq ocaml | |
133 | ||
134 | %description glut-devel | |
135 | This package contains development files for GLUT binding for OCaml. | |
136 | ||
f2f3d6fe JR |
137 | %description glut-devel -l pl.UTF-8 |
138 | Ten pakiet zawiera pliki programistyczne wiązania OCamla dla | |
4341aaa6 JB |
139 | biblioteki GLUT. |
140 | ||
d0c4eccb MM |
141 | %package toplevel |
142 | Summary: OpenGL binding for OCaml - interactive system | |
86a9d925 | 143 | Summary(pl.UTF-8): Wiązania OpenGL dla OCamla - system interaktywny |
d0c4eccb MM |
144 | Group: Development/Libraries |
145 | Requires: %{name} = %{version}-%{release} | |
146 | %requires_eq ocaml | |
147 | ||
148 | %description toplevel | |
149 | LablGL is an OpenGL interface for Objective Caml. All of the GL and | |
150 | GLU libraries are available. | |
151 | ||
152 | This package contains OCaml toplevel interactive system linked with | |
153 | lablgl. | |
154 | ||
f2f3d6fe JR |
155 | %description toplevel -l pl.UTF-8 |
156 | LablGL umożliwia używanie OpenGL w OCamlu. Dostępne są wszystkie | |
d0c4eccb MM |
157 | biblioteki GL i GLU. |
158 | ||
b833e602 | 159 | Pakiet ten zawiera system interaktywny OCamla skonsolidowany z lablgl. |
d0c4eccb MM |
160 | |
161 | %prep | |
1cb8f00c | 162 | %setup -q -n lablgl-%{version} |
d0c4eccb MM |
163 | |
164 | %build | |
4d49067c JB |
165 | sed -e 's|^\(X\|TK\)INCLUDES|#&|; |
166 | s|^GLLIBS.*|GLLIBS = -lGL -lGLU -lXmu|; | |
d0c4eccb MM |
167 | s|^COPTS.*|COPTS = %{rpmcflags} -c -fPIC|;' \ |
168 | Makefile.config.ex > Makefile.config | |
fca531cd | 169 | %{__make} -j1 all %{?with_ocaml_opt:opt} |
d0c4eccb MM |
170 | |
171 | %install | |
172 | rm -rf $RPM_BUILD_ROOT | |
4341aaa6 JB |
173 | install -d $RPM_BUILD_ROOT{%{_bindir},%{_libdir}/ocaml/{stublibs,site-lib/{lablgl,togl}}} \ |
174 | $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version}/{LablGlut,Togl} | |
d0c4eccb MM |
175 | |
176 | %{__make} install \ | |
4341aaa6 JB |
177 | INSTALLDIR=$RPM_BUILD_ROOT%{_libdir}/ocaml/lablGL \ |
178 | DLLDIR=$RPM_BUILD_ROOT%{_libdir}/ocaml/stublibs \ | |
c3b93b58 | 179 | LIBDIR=$RPM_BUILD_ROOT%{_libdir}/ocaml \ |
d0c4eccb MM |
180 | BINDIR=$RPM_BUILD_ROOT%{_bindir} |
181 | ||
4341aaa6 | 182 | mv -f $RPM_BUILD_ROOT%{_libdir}/ocaml/lablGL/*.mli . |
d0c4eccb | 183 | |
4341aaa6 JB |
184 | cp -r LablGlut/examples/* $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version}/LablGlut |
185 | cp -r Togl/examples/* $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version}/Togl | |
d0c4eccb | 186 | |
d0c4eccb MM |
187 | cat > $RPM_BUILD_ROOT%{_libdir}/ocaml/site-lib/lablgl/META <<EOF |
188 | # Specifications for the "lablgl" library: | |
189 | requires = "" | |
190 | version = "%{version}" | |
4341aaa6 | 191 | directory = "+lablGL" |
d0c4eccb MM |
192 | archive(byte) = "lablgl.cma" |
193 | archive(native) = "lablgl.cmxa" | |
194 | linkopts = "" | |
195 | EOF | |
196 | ||
197 | cat > $RPM_BUILD_ROOT%{_libdir}/ocaml/site-lib/togl/META <<EOF | |
4341aaa6 JB |
198 | # Specifications for the "togl" library: |
199 | requires = "lablgl" | |
d0c4eccb | 200 | version = "%{version}" |
4341aaa6 | 201 | directory = "+lablGL" |
d0c4eccb MM |
202 | archive(byte) = "togl.cma" |
203 | archive(native) = "togl.cmxa" | |
204 | linkopts = "" | |
205 | EOF | |
206 | ||
d0c4eccb MM |
207 | %clean |
208 | rm -rf $RPM_BUILD_ROOT | |
209 | ||
210 | %files | |
211 | %defattr(644,root,root,755) | |
4341aaa6 | 212 | %doc COPYRIGHT CHANGES README |
c3b93b58 | 213 | %attr(755,root,root) %{_libdir}/ocaml/stublibs/dlllablgl.so |
d0c4eccb | 214 | |
4341aaa6 JB |
215 | %files devel |
216 | %defattr(644,root,root,755) | |
217 | %doc *.mli | |
218 | %dir %{_libdir}/ocaml/lablGL | |
1cb8f00c | 219 | %{_libdir}/ocaml/lablGL/build.ml |
4341aaa6 JB |
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} | |
226 | ||
227 | %files glut | |
228 | %defattr(644,root,root,755) | |
4341aaa6 JB |
229 | %attr(755,root,root) %{_libdir}/ocaml/stublibs/dlllablglut.so |
230 | ||
231 | %files glut-devel | |
232 | %defattr(644,root,root,755) | |
233 | %{_libdir}/ocaml/lablGL/lablglut.* | |
234 | %{_libdir}/ocaml/lablGL/liblablglut.a | |
235 | ||
d0c4eccb MM |
236 | %files togl |
237 | %defattr(644,root,root,755) | |
c3b93b58 | 238 | %attr(755,root,root) %{_libdir}/ocaml/stublibs/dlltogl.so |
d0c4eccb MM |
239 | |
240 | %files togl-devel | |
241 | %defattr(644,root,root,755) | |
4341aaa6 JB |
242 | %{_libdir}/ocaml/lablGL/togl.* |
243 | %{_libdir}/ocaml/lablGL/libtogl.a | |
d0c4eccb MM |
244 | %{_libdir}/ocaml/site-lib/togl |
245 | ||
d0c4eccb MM |
246 | %files toplevel |
247 | %defattr(644,root,root,755) | |
248 | %attr(755,root,root) %{_bindir}/* |