]>
Commit | Line | Data |
---|---|---|
916aeb96 JB |
1 | # |
2 | # Conditional build: | |
3 | %bcond_with directfb # DirectFB graphics support | |
4 | %bcond_with nas # NAS audio support | |
5 | %bcond_without alsa # ALSA audio support | |
6 | %bcond_with arts # aRts audio support | |
7 | %bcond_with esd # EsounD audio support | |
8 | %bcond_without gl # OpenGL (GLX) support | |
9 | %bcond_without gles # OpenGL ES (EGL) support | |
b63b7f4a JB |
10 | %bcond_with mir # Mir graphics support [BR: libmirclient] |
11 | %bcond_with wayland # Wayland graphics support | |
916aeb96 JB |
12 | %bcond_without static_libs # don't build static libraries |
13 | %bcond_with mmx # MMX instructions | |
14 | %bcond_with sse # SSE instructions | |
15 | %bcond_with sse2 # SSE2 instructions | |
16 | %bcond_with 3dnow # 3Dnow! instructions | |
17 | %bcond_with altivec # Altivec instructions | |
18 | # | |
19 | # NOTE: the following libraries are dlopened by soname detected at build time: | |
b63b7f4a JB |
20 | # libartsc.so.? [if with arts] |
21 | # libasound.so.2 [if with alsa] | |
22 | # libaudio.so.2 [if with nas] | |
916aeb96 | 23 | # libdirectfb-*.so --needs patch (-release not supported by configure) |
b63b7f4a | 24 | # libesd.so.0 [if with esd] |
916aeb96 JB |
25 | # libfusionsound-*.so --needs patch (-release not supported by configure) |
26 | # libpulse-simple.so.0 | |
b63b7f4a JB |
27 | # libwayland-client.so.0 [if with wayland] |
28 | # libwayland-cursor.so.0 [if with wayland] | |
29 | # libwayland-egl.so.1 [if with wayland] | |
30 | # libxkbcommon.so.0 [if with wayland] | |
916aeb96 JB |
31 | # libX11.so.6 |
32 | # libXcursor.so.1 | |
33 | # libXext.so.6 | |
34 | # libXi.so.6 | |
35 | # libXinerama.so.1 | |
36 | # libXrandr.so.2 | |
37 | # libXrender.so.1 | |
38 | # libXss.so.1 | |
39 | # libXxf86vm.so.1 | |
40 | %ifarch k6 athlon | |
41 | %define with_3dnow 1 | |
42 | %endif | |
43 | %ifarch %{x8664} pentium2 pentium3 pentium4 athlon | |
44 | %define with_mmx 1 | |
45 | %endif | |
46 | %ifarch %{x8664} pentium3 pentium4 | |
47 | %define with_sse 1 | |
48 | %endif | |
49 | %ifarch %{x8664} pentium4 | |
50 | %define with_sse2 1 | |
51 | %endif | |
52 | Summary: SDL (Simple DirectMedia Layer) - Game/Multimedia Library | |
53 | Summary(pl.UTF-8): SDL (Simple DirectMedia Layer) - Biblioteka do gier/multimediów | |
54 | Summary(zh_CN.UTF-8): SDL (Simple DirectMedia Layer) Generic APIs - 游戏/多媒体库 | |
55 | Name: SDL2 | |
b63b7f4a | 56 | Version: 2.0.2 |
916aeb96 JB |
57 | Release: 1 |
58 | License: Zlib (BSD-like) | |
59 | Group: Libraries | |
60 | Source0: http://www.libsdl.org/release/%{name}-%{version}.tar.gz | |
b63b7f4a | 61 | # Source0-md5: e8070e8b6335def073a80cee78f3a7f0 |
916aeb96 JB |
62 | Patch0: %{name}-config.patch |
63 | URL: http://www.libsdl.org/ | |
b63b7f4a | 64 | %{?with_wayland:BuildRequires: Mesa-libwayland-egl-devel} |
916aeb96 JB |
65 | %{?with_directfb:BuildRequires: DirectFB-devel >= 1.0.0} |
66 | %{?with_directfb:BuildRequires: FusionSound-devel >= 1.1.1} | |
67 | %{?with_gl:BuildRequires: OpenGL-GLX-devel} | |
68 | %{?with_gles:BuildRequires: OpenGLES-devel} | |
69 | %{?with_alsa:BuildRequires: alsa-lib-devel >= 0.9.0} | |
70 | %{?with_arts:BuildRequires: artsc-devel >= 1.1} | |
71 | BuildRequires: autoconf >= 2.59-9 | |
72 | BuildRequires: automake | |
73 | BuildRequires: dbus-devel | |
74 | %{?with_esd:BuildRequires: esound-devel >= 0.2.8} | |
75 | BuildRequires: gcc >= 5:4.0 | |
76 | BuildRequires: libtool >= 2:2.0 | |
77 | %{?with_nas:BuildRequires: nas-devel} | |
78 | BuildRequires: perl-modules | |
79 | BuildRequires: pkgconfig >= 1:0.7 | |
80 | BuildRequires: pulseaudio-devel >= 0.9 | |
81 | BuildRequires: tslib-devel | |
82 | BuildRequires: udev-devel | |
b63b7f4a JB |
83 | # wayland-client, wayland-cursor |
84 | %{?with_wayland:BuildRequires: wayland-devel} | |
916aeb96 JB |
85 | BuildRequires: xorg-lib-libX11-devel |
86 | BuildRequires: xorg-lib-libXScrnSaver-devel | |
87 | BuildRequires: xorg-lib-libXcursor-devel | |
88 | BuildRequires: xorg-lib-libXext-devel | |
89 | BuildRequires: xorg-lib-libXi-devel | |
90 | BuildRequires: xorg-lib-libXinerama-devel | |
91 | BuildRequires: xorg-lib-libXrandr-devel | |
92 | BuildRequires: xorg-lib-libXrender-devel | |
93 | BuildRequires: xorg-lib-libXxf86vm-devel | |
b63b7f4a | 94 | %{?with_wayland:BuildRequires: xorg-lib-libxkbcommon-devel} |
916aeb96 JB |
95 | BuildRequires: xorg-proto-xextproto-devel |
96 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) | |
97 | ||
98 | %define specflags_ppc -maltivec | |
99 | ||
100 | %description | |
101 | SDL (Simple DirectMedia Layer) is a library that allows you portable, | |
102 | low level access to a video framebuffer, audio output, mouse, and | |
103 | keyboard. It can support both windowed and DGA modes of XFree86, and | |
104 | it is designed to be portable - applications linked with SDL can also | |
105 | be built on Win32 and BeOS. | |
106 | ||
107 | %description -l pl.UTF-8 | |
108 | SDL (Simple DirectMedia Layer) jest biblioteką udostępniającą | |
109 | przenośny, niskopoziomowy dostęp do bufora ramki video, wyjścia audio, | |
110 | myszy oraz klawiatury. Może obsługiwać zarówno okienkowy tryb XFree86 | |
111 | jak i DGA. Konstruując ją miano na uwadze przenośność: aplikacje | |
112 | konsolidowane z SDL można również budować w systemach Win32 i BeOS. | |
113 | ||
114 | %description -l pt_BR.UTF-8 | |
115 | Esse é o Simple DirectMedia Layer, uma API genérica que dá acesso de | |
116 | baixo nível a áudio, teclado, mouse e vídeo em várias plataformas. | |
117 | ||
118 | Essa biblioteca é usada por alguns jogos. | |
119 | ||
120 | %description -l ru.UTF-8 | |
121 | SDL (Simple DirectMedia Layer) это набор функций, предоставляющий | |
122 | низкоуровневый доступ к звуку, клавиатуре, манипулятору мышь и к | |
123 | буферу экрана на множестве различных платформ. | |
124 | ||
125 | %package devel | |
126 | Summary: SDL - Header files | |
127 | Summary(pl.UTF-8): SDL - Pliki nagłówkowe | |
128 | Summary(pt_BR.UTF-8): Bibliotecas e arquivos de cabeçalho para aplicações SDL | |
129 | Summary(ru.UTF-8): Файлы, необходимые для разработки программ, использующих SDL | |
130 | Summary(uk.UTF-8): Файли, необхідні для розробки програм, що використовують SDL | |
131 | Summary(zh_CN.UTF-8): SDL (Simple DirectMedia Layer) 开发库 | |
132 | Group: Development/Libraries | |
133 | Requires: %{name} = %{version}-%{release} | |
134 | %{?with_directfb:Requires: DirectFB-devel >= 1.0.0} | |
135 | Requires: tslib-devel | |
136 | Requires: xorg-lib-libX11-devel | |
137 | Suggests: OpenGL-GLU-devel | |
138 | ||
139 | %description devel | |
140 | SDL - Header files. | |
141 | ||
142 | %description devel -l pl.UTF-8 | |
143 | SDL - Pliki nagłówkowe. | |
144 | ||
145 | %description devel -l pt_BR.UTF-8 | |
146 | Esse pacote contém bibliotecas, arquivos de cabeçalho e outros | |
147 | recursos para o desenvolvimento de aplicativos com SDL. | |
148 | ||
149 | %description devel -l ru.UTF-8 | |
150 | Этот пакет содержит файлы, необходимые для разработки программ, | |
151 | использующих SDL. | |
152 | ||
153 | %description devel -l uk.UTF-8 | |
154 | Цей пакет містить файли, необхідні для розробки програм, що | |
155 | використовують SDL. | |
156 | ||
157 | %package static | |
158 | Summary: SDL - static libraries | |
159 | Summary(pl.UTF-8): SDL - biblioteki statyczne | |
160 | Summary(pt_BR.UTF-8): Biblioteca estática para desenvolvimento de aplicações com a SDL | |
161 | Summary(ru.UTF-8): Статические библиотеки для разработки с использованием SDL | |
162 | Summary(uk.UTF-8): Статичні бібліотеки для розробки з використанням SDL | |
163 | Group: Development/Libraries | |
164 | Requires: %{name}-devel = %{version}-%{release} | |
165 | ||
166 | %description static | |
167 | SDL - static libraries. | |
168 | ||
169 | %description static -l pl.UTF-8 | |
170 | SDL - biblioteki statyczne. | |
171 | ||
172 | %description static -l pt_BR.UTF-8 | |
173 | Biblioteca estática para desenvolvimento de aplicações com a SDL. | |
174 | ||
175 | %description static -l ru.UTF-8 | |
176 | Этот пакет содержит статические библиотеки для разработки программ, | |
177 | использующих SDL. | |
178 | ||
179 | %description static -l uk.UTF-8 | |
180 | Цей пакет містить статичні бібліотеки для розробки програм, що | |
181 | використовують SDL. | |
182 | ||
183 | %package examples | |
184 | Summary: SDL - example programs | |
185 | Summary(pl.UTF-8): SDL - programy przykładowe | |
186 | License: Public Domain | |
187 | Group: Development/Libraries | |
188 | Requires: %{name}-devel = %{version}-%{release} | |
189 | ||
190 | %description examples | |
191 | SDL - example programs. | |
192 | ||
193 | %description examples -l pl.UTF-8 | |
194 | SDL - przykładowe programy. | |
195 | ||
196 | %prep | |
197 | %setup -q | |
198 | %patch0 -p1 | |
199 | ||
200 | %build | |
201 | %{__libtoolize} | |
202 | %{__aclocal} -I acinclude | |
203 | %{__autoconf} | |
204 | %configure \ | |
205 | %{!?with_3dnow:--disable-3dnow} \ | |
206 | %{!?with_alsa:--disable-alsa} \ | |
207 | %{!?with_altiveca:--disable-altivec} \ | |
208 | %{!?with_arts:--disable-arts} \ | |
209 | %{!?with_esd:--disable-esd} \ | |
210 | %{!?with_mmx:--disable-mmx} \ | |
211 | %{!?with_nas:--disable-nas} \ | |
212 | --enable-pthreads \ | |
213 | --enable-pthread-sem \ | |
214 | --disable-rpath \ | |
215 | %{!?with_sse:--disable-sse --disable-ssemath} \ | |
216 | %{!?with_sse2:--disable-sse2} \ | |
217 | %{?with_sse:--enable-ssemath} \ | |
218 | %{!?with_static_libs:--disable-static} \ | |
219 | %{!?with_directfb:--disable-video-directfb} \ | |
b63b7f4a | 220 | %{?with_mir:--enable-video-mir} \ |
916aeb96 JB |
221 | --enable-video-opengl%{!?with_opengl:=no} \ |
222 | --enable-video-opengles%{!?with_gles:=no} \ | |
b63b7f4a | 223 | %{?with_wayland:--enable-video-wayland} \ |
916aeb96 JB |
224 | --with-x |
225 | ||
226 | %{__make} | |
227 | ||
228 | %install | |
229 | rm -rf $RPM_BUILD_ROOT | |
230 | install -d $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version} | |
231 | ||
232 | %{__make} install \ | |
233 | DESTDIR=$RPM_BUILD_ROOT \ | |
234 | m4datadir=%{_aclocaldir} | |
235 | ||
236 | cp -pr test/* $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version} | |
237 | ||
238 | %clean | |
239 | rm -rf $RPM_BUILD_ROOT | |
240 | ||
241 | %post -p /sbin/ldconfig | |
242 | %postun -p /sbin/ldconfig | |
243 | ||
244 | %files | |
245 | %defattr(644,root,root,755) | |
246 | # non-Linux READMEs packaged for portability information | |
247 | %doc BUGS.txt COPYING.txt CREDITS.txt README*.txt TODO.txt WhatsNew.txt | |
248 | %attr(755,root,root) %{_libdir}/libSDL2-2.0.so.*.*.* | |
249 | %attr(755,root,root) %ghost %{_libdir}/libSDL2-2.0.so.0 | |
250 | ||
251 | %files devel | |
252 | %defattr(644,root,root,755) | |
253 | %attr(755,root,root) %{_bindir}/sdl2-config | |
254 | %attr(755,root,root) %{_libdir}/libSDL2.so | |
255 | %{_libdir}/libSDL2.la | |
256 | %{_libdir}/libSDL2_test.a | |
257 | %{_libdir}/libSDL2main.a | |
258 | %{_includedir}/SDL2 | |
259 | %{_aclocaldir}/sdl2.m4 | |
260 | %{_pkgconfigdir}/sdl2.pc | |
261 | ||
262 | %if %{with static_libs} | |
263 | %files static | |
264 | %defattr(644,root,root,755) | |
265 | %{_libdir}/libSDL2.a | |
266 | %endif | |
267 | ||
268 | %files examples | |
269 | %defattr(644,root,root,755) | |
270 | %{_examplesdir}/%{name}-%{version} |