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