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