]> git.pld-linux.org Git - SPECS.git/blob - ocaml-lablgl.spec
SPECS updated Wed 28 Jul 14:48:01 CEST 2021
[SPECS.git] / ocaml-lablgl.spec
1 #
2 # Conditional build:
3 %bcond_without  ocaml_opt       # skip building native optimized binaries (bytecode is always built)
4
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
8 %endif
9
10 %if %{without ocaml_opt}
11 %define         _enable_debug_packages  0
12 %endif
13
14 %define         ocaml_ver       1:3.09.2
15 Summary:        OpenGL binding for OCaml
16 Summary(pl.UTF-8):      Wiązania OpenGL dla OCamla
17 Name:           ocaml-lablgl
18 Version:        1.06
19 Release:        2
20 License:        BSD
21 Group:          Libraries
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)
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
44 %description -l pl.UTF-8
45 LablGL umożliwia używanie OpenGL w OCamlu. Dostępne są wszystkie
46 biblioteki GL i GLU.
47
48 Pakiet ten zawiera binaria potrzebne do uruchamiania programów
49 używających tej biblioteki.
50
51 %package devel
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}
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
65 %description devel -l pl.UTF-8
66 LablGL umożliwia używanie OpenGL w OCamlu. Dostępne są wszystkie
67 biblioteki GL i GLU.
68
69 Pakiet ten zawiera pliki niezbędne do tworzenia programów używających
70 tej biblioteki.
71
72 %package togl
73 Summary:        Tk widget for lablGL
74 Summary(pl.UTF-8):      Widget Tk dla lablGL
75 Group:          Libraries
76 Requires:       %{name} = %{version}-%{release}
77 %requires_eq    ocaml-labltk
78 %requires_eq    ocaml-runtime
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
86 %description togl -l pl.UTF-8
87 Widget Togl używający Tk dla lablGL. Może być on używany wraz z
88 labltk.
89
90 Pakiet ten zawiera binaria potrzebne do uruchamiania programów
91 używających tej biblioteki.
92
93 %package togl-devel
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}
98 %requires_eq    ocaml
99 %requires_eq    ocaml-labltk-devel
100
101 %description togl-devel
102 Togl Tk widget for lablGL, to be used with labltk.
103
104 This package contains files needed to develop OCaml programs using
105 this library.
106
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
109 labltk.
110
111 Pakiet ten zawiera pliki niezbędne do tworzenia programów używających
112 tej biblioteki.
113
114 %package glut
115 Summary:        GLUT binding for OCaml
116 Summary(pl.UTF-8):      Wiązanie OCamla dla biblioteki GLUT
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
123 (GL Utility Toolkit) is a portable windowing library for OpenGL,
124 written by Mark Kilgard.
125
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.
130
131 %package glut-devel
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}
136 %requires_eq    ocaml
137
138 %description glut-devel
139 This package contains development files for GLUT binding for OCaml.
140
141 %description glut-devel -l pl.UTF-8
142 Ten pakiet zawiera pliki programistyczne wiązania OCamla dla
143 biblioteki GLUT.
144
145 %package toplevel
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}
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
159 %description toplevel -l pl.UTF-8
160 LablGL umożliwia używanie OpenGL w OCamlu. Dostępne są wszystkie
161 biblioteki GL i GLU.
162
163 Pakiet ten zawiera system interaktywny OCamla skonsolidowany z lablgl.
164
165 %prep
166 %setup -q -n lablgl-%{version}
167
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
171 %build
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}
177
178 %install
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}
182
183 %{__make} install \
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}
188
189 mv -f $RPM_BUILD_ROOT%{_libdir}/ocaml/lablGL/*.mli .
190
191 cp -r LablGlut/examples/* $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version}/LablGlut
192 cp -r Togl/examples/* $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version}/Togl
193
194 cp -p META $RPM_BUILD_ROOT%{_libdir}/ocaml/lablGL
195
196 %clean
197 rm -rf $RPM_BUILD_ROOT
198
199 %files
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
205
206 %files devel
207 %defattr(644,root,root,755)
208 %doc *.mli
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}
215
216 %files glut
217 %defattr(644,root,root,755)
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
225 %files togl
226 %defattr(644,root,root,755)
227 %attr(755,root,root) %{_libdir}/ocaml/stublibs/dlltogl.so
228
229 %files togl-devel
230 %defattr(644,root,root,755)
231 %{_libdir}/ocaml/lablGL/togl.*
232 %{_libdir}/ocaml/lablGL/libtogl.a
233
234 %files toplevel
235 %defattr(644,root,root,755)
236 %attr(755,root,root) %{_bindir}/lablgl
237 %attr(755,root,root) %{_bindir}/lablglut
This page took 0.759881 seconds and 3 git commands to generate.