]> git.pld-linux.org Git - packages/ocaml-lablgl.git/blame - ocaml-lablgl.spec
- added ocaml_opt bcond
[packages/ocaml-lablgl.git] / ocaml-lablgl.spec
CommitLineData
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 11Summary: OpenGL binding for OCaml
86a9d925 12Summary(pl.UTF-8): Wiązania OpenGL dla OCamla
d0c4eccb 13Name: ocaml-lablgl
1cb8f00c 14Version: 1.05
fca531cd 15Release: 2
d0c4eccb
MM
16License: BSD
17Group: Libraries
af5fc04e 18#Source0Download: https://forge.ocamlcore.org/frs/?group_id=291
1cb8f00c
JR
19Source0: https://forge.ocamlcore.org/frs/download.php/1254/lablgl-%{version}.tar.gz
20# Source0-md5: b64662bf47f2973f836d33ae1365244f
af5fc04e 21URL: https://forge.ocamlcore.org/projects/lablgl/
4d49067c
JB
22BuildRequires: OpenGL-GLX-devel
23BuildRequires: OpenGL-glut-devel >= 3.7
5444590c 24BuildRequires: ocaml >= %{ocaml_ver}
06fa1cd1 25BuildRequires: ocaml-camlp4
d0c4eccb 26BuildRequires: ocaml-labltk-devel
d0c4eccb 27BuildRequires: tcl-devel
4d49067c
JB
28BuildRequires: tk-devel >= 4.0
29BuildRequires: xorg-lib-libXmu-devel
d0c4eccb
MM
30%requires_eq ocaml-runtime
31BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
32
33%description
34LablGL is an OpenGL interface for Objective Caml. All of the GL and
35GLU libraries are available.
36
37This package contains files needed to run bytecode executables using
38this library.
39
f2f3d6fe
JR
40%description -l pl.UTF-8
41LablGL umożliwia używanie OpenGL w OCamlu. Dostępne są wszystkie
d0c4eccb
MM
42biblioteki GL i GLU.
43
f2f3d6fe
JR
44Pakiet ten zawiera binaria potrzebne do uruchamiania programów
45używających tej biblioteki.
d0c4eccb
MM
46
47%package devel
48Summary: OpenGL binding for OCaml - development part
86a9d925 49Summary(pl.UTF-8): Wiązania OpenGL dla OCamla - cześć programistyczna
d0c4eccb
MM
50Group: Development/Libraries
51Requires: %{name} = %{version}-%{release}
52%requires_eq ocaml
53
54%description devel
55LablGL is an OpenGL interface for Objective Caml. All of the GL and
56GLU libraries are available.
57
58This package contains files needed to develop OCaml programs using
59this library.
60
f2f3d6fe
JR
61%description devel -l pl.UTF-8
62LablGL umożliwia używanie OpenGL w OCamlu. Dostępne są wszystkie
d0c4eccb
MM
63biblioteki GL i GLU.
64
f2f3d6fe 65Pakiet ten zawiera pliki niezbędne do tworzenia programów używających
d0c4eccb
MM
66tej biblioteki.
67
68%package togl
69Summary: Tk widget for lablGL
86a9d925 70Summary(pl.UTF-8): Widget Tk dla lablGL
d0c4eccb
MM
71Group: Libraries
72Requires: %{name} = %{version}-%{release}
d0c4eccb 73%requires_eq ocaml-labltk
4d49067c 74%requires_eq ocaml-runtime
d0c4eccb
MM
75
76%description togl
77Togl Tk widget for lablGL, to be used with labltk.
78
79This package contains files needed to run bytecode executables using
80this library.
81
f2f3d6fe
JR
82%description togl -l pl.UTF-8
83Widget Togl używający Tk dla lablGL. Może być on używany wraz z
d0c4eccb
MM
84labltk.
85
f2f3d6fe
JR
86Pakiet ten zawiera binaria potrzebne do uruchamiania programów
87używających tej biblioteki.
d0c4eccb
MM
88
89%package togl-devel
90Summary: Tk widget for lablGL - development part
86a9d925 91Summary(pl.UTF-8): Widget Tk dla lablGL - cześć programistyczna
d0c4eccb
MM
92Group: Development/Libraries
93Requires: %{name} = %{version}-%{release}
94%requires_eq ocaml
95%requires_eq ocaml-labltk-devel
96
97%description togl-devel
42bac6fb 98Togl Tk widget for lablGL, to be used with labltk.
d0c4eccb
MM
99
100This package contains files needed to develop OCaml programs using
101this library.
102
f2f3d6fe
JR
103%description togl-devel -l pl.UTF-8
104Widget Togl używający Tk dla lablGL. Może być on używany wraz z
d0c4eccb
MM
105labltk.
106
f2f3d6fe 107Pakiet ten zawiera pliki niezbędne do tworzenia programów używających
d0c4eccb
MM
108tej biblioteki.
109
4341aaa6
JB
110%package glut
111Summary: GLUT binding for OCaml
86a9d925 112Summary(pl.UTF-8): Wiązanie OCamla dla biblioteki GLUT
4341aaa6
JB
113Group: Libraries
114Requires: %{name} = %{version}-%{release}
115%requires_eq ocaml-runtime
116
117%description glut
118The 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
120written by Mark Kilgard.
121
f2f3d6fe
JR
122%description glut -l pl.UTF-8
123Biblioteka lablglut to wiązanie OCamla dla biblioteki GLUT w wersji
1243.7. GLUT (czyli GL Utility Toolkit) to przenośna biblioteka okienkowa
4341aaa6
JB
125dla OpenGL-a, napisana przez Marka Kilgarda.
126
127%package glut-devel
128Summary: GLUT binding for OCaml - development part
86a9d925 129Summary(pl.UTF-8): Wiązanie OCamla dla biblioteki GLUT - część programistyczna
4341aaa6
JB
130Group: Development/Libraries
131Requires: %{name} = %{version}-%{release}
132%requires_eq ocaml
133
134%description glut-devel
135This package contains development files for GLUT binding for OCaml.
136
f2f3d6fe
JR
137%description glut-devel -l pl.UTF-8
138Ten pakiet zawiera pliki programistyczne wiązania OCamla dla
4341aaa6
JB
139biblioteki GLUT.
140
d0c4eccb
MM
141%package toplevel
142Summary: OpenGL binding for OCaml - interactive system
86a9d925 143Summary(pl.UTF-8): Wiązania OpenGL dla OCamla - system interaktywny
d0c4eccb
MM
144Group: Development/Libraries
145Requires: %{name} = %{version}-%{release}
146%requires_eq ocaml
147
148%description toplevel
149LablGL is an OpenGL interface for Objective Caml. All of the GL and
150GLU libraries are available.
151
152This package contains OCaml toplevel interactive system linked with
153lablgl.
154
f2f3d6fe
JR
155%description toplevel -l pl.UTF-8
156LablGL umożliwia używanie OpenGL w OCamlu. Dostępne są wszystkie
d0c4eccb
MM
157biblioteki GL i GLU.
158
b833e602 159Pakiet 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
165sed -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
172rm -rf $RPM_BUILD_ROOT
4341aaa6
JB
173install -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 182mv -f $RPM_BUILD_ROOT%{_libdir}/ocaml/lablGL/*.mli .
d0c4eccb 183
4341aaa6
JB
184cp -r LablGlut/examples/* $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version}/LablGlut
185cp -r Togl/examples/* $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version}/Togl
d0c4eccb 186
d0c4eccb
MM
187cat > $RPM_BUILD_ROOT%{_libdir}/ocaml/site-lib/lablgl/META <<EOF
188# Specifications for the "lablgl" library:
189requires = ""
190version = "%{version}"
4341aaa6 191directory = "+lablGL"
d0c4eccb
MM
192archive(byte) = "lablgl.cma"
193archive(native) = "lablgl.cmxa"
194linkopts = ""
195EOF
196
197cat > $RPM_BUILD_ROOT%{_libdir}/ocaml/site-lib/togl/META <<EOF
4341aaa6
JB
198# Specifications for the "togl" library:
199requires = "lablgl"
d0c4eccb 200version = "%{version}"
4341aaa6 201directory = "+lablGL"
d0c4eccb
MM
202archive(byte) = "togl.cma"
203archive(native) = "togl.cmxa"
204linkopts = ""
205EOF
206
d0c4eccb
MM
207%clean
208rm -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}/*
This page took 0.061477 seconds and 4 git commands to generate.