]> git.pld-linux.org Git - packages/ocaml-lablgl.git/blob - ocaml-lablgl.spec
- complete ocaml_opt archs list
[packages/ocaml-lablgl.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 %define         ocaml_ver       1:3.09.2
11 Summary:        OpenGL binding for OCaml
12 Summary(pl.UTF-8):      Wiązania OpenGL dla OCamla
13 Name:           ocaml-lablgl
14 Version:        1.05
15 Release:        3
16 License:        BSD
17 Group:          Libraries
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)
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
40 %description -l pl.UTF-8
41 LablGL umożliwia używanie OpenGL w OCamlu. Dostępne są wszystkie
42 biblioteki GL i GLU.
43
44 Pakiet ten zawiera binaria potrzebne do uruchamiania programów
45 używających tej biblioteki.
46
47 %package devel
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}
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
61 %description devel -l pl.UTF-8
62 LablGL umożliwia używanie OpenGL w OCamlu. Dostępne są wszystkie
63 biblioteki GL i GLU.
64
65 Pakiet ten zawiera pliki niezbędne do tworzenia programów używających
66 tej biblioteki.
67
68 %package togl
69 Summary:        Tk widget for lablGL
70 Summary(pl.UTF-8):      Widget Tk dla lablGL
71 Group:          Libraries
72 Requires:       %{name} = %{version}-%{release}
73 %requires_eq    ocaml-labltk
74 %requires_eq    ocaml-runtime
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
82 %description togl -l pl.UTF-8
83 Widget Togl używający Tk dla lablGL. Może być on używany wraz z
84 labltk.
85
86 Pakiet ten zawiera binaria potrzebne do uruchamiania programów
87 używających tej biblioteki.
88
89 %package togl-devel
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}
94 %requires_eq    ocaml
95 %requires_eq    ocaml-labltk-devel
96
97 %description togl-devel
98 Togl Tk widget for lablGL, to be used with labltk.
99
100 This package contains files needed to develop OCaml programs using
101 this library.
102
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
105 labltk.
106
107 Pakiet ten zawiera pliki niezbędne do tworzenia programów używających
108 tej biblioteki.
109
110 %package glut
111 Summary:        GLUT binding for OCaml
112 Summary(pl.UTF-8):      Wiązanie OCamla dla biblioteki GLUT
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
119 (GL Utility Toolkit) is a portable windowing library for OpenGL,
120 written by Mark Kilgard.
121
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.
126
127 %package glut-devel
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}
132 %requires_eq    ocaml
133
134 %description glut-devel
135 This package contains development files for GLUT binding for OCaml.
136
137 %description glut-devel -l pl.UTF-8
138 Ten pakiet zawiera pliki programistyczne wiązania OCamla dla
139 biblioteki GLUT.
140
141 %package toplevel
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}
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
155 %description toplevel -l pl.UTF-8
156 LablGL umożliwia używanie OpenGL w OCamlu. Dostępne są wszystkie
157 biblioteki GL i GLU.
158
159 Pakiet ten zawiera system interaktywny OCamla skonsolidowany z lablgl.
160
161 %prep
162 %setup -q -n lablgl-%{version}
163
164 %build
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}
170
171 %install
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}
175
176 %{__make} install \
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}
181
182 mv -f $RPM_BUILD_ROOT%{_libdir}/ocaml/lablGL/*.mli .
183
184 cp -r LablGlut/examples/* $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version}/LablGlut
185 cp -r Togl/examples/* $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version}/Togl
186
187 cat > $RPM_BUILD_ROOT%{_libdir}/ocaml/site-lib/lablgl/META <<EOF
188 # Specifications for the "lablgl" library:
189 requires = ""
190 version = "%{version}"
191 directory = "+lablGL"
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
198 # Specifications for the "togl" library:
199 requires = "lablgl"
200 version = "%{version}"
201 directory = "+lablGL"
202 archive(byte) = "togl.cma"
203 archive(native) = "togl.cmxa"
204 linkopts = ""
205 EOF
206
207 %clean
208 rm -rf $RPM_BUILD_ROOT
209
210 %files
211 %defattr(644,root,root,755)
212 %doc COPYRIGHT CHANGES README
213 %attr(755,root,root) %{_libdir}/ocaml/stublibs/dlllablgl.so
214
215 %files devel
216 %defattr(644,root,root,755)
217 %doc *.mli
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}
226
227 %files glut
228 %defattr(644,root,root,755)
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
236 %files togl
237 %defattr(644,root,root,755)
238 %attr(755,root,root) %{_libdir}/ocaml/stublibs/dlltogl.so
239
240 %files togl-devel
241 %defattr(644,root,root,755)
242 %{_libdir}/ocaml/lablGL/togl.*
243 %{_libdir}/ocaml/lablGL/libtogl.a
244 %{_libdir}/ocaml/site-lib/togl
245
246 %files toplevel
247 %defattr(644,root,root,755)
248 %attr(755,root,root) %{_bindir}/lablgl
249 %attr(755,root,root) %{_bindir}/lablglut
This page took 0.049342 seconds and 4 git commands to generate.