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
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
37 %ifarch %{x8664} pentium2 pentium3 pentium4 athlon
40 %ifarch %{x8664} pentium3 pentium4
43 %ifarch %{x8664} pentium4
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 - 游戏/多媒体库
52 License: Zlib (BSD-like)
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)
88 %define specflags_ppc -maltivec
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.
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.
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.
108 Essa biblioteca é usada por alguns jogos.
110 %description -l ru.UTF-8
111 SDL (Simple DirectMedia Layer) это набор функций, предоставляющий
112 низкоуровневый доступ к звуку, клавиатуре, манипулятору мышь и к
113 буферу экрана на множестве различных платформ.
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
132 %description devel -l pl.UTF-8
133 SDL - Pliki nagłówkowe.
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.
139 %description devel -l ru.UTF-8
140 Этот пакет содержит файлы, необходимые для разработки программ,
143 %description devel -l uk.UTF-8
144 Цей пакет містить файли, необхідні для розробки програм, що
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}
157 SDL - static libraries.
159 %description static -l pl.UTF-8
160 SDL - biblioteki statyczne.
162 %description static -l pt_BR.UTF-8
163 Biblioteca estática para desenvolvimento de aplicações com a SDL.
165 %description static -l ru.UTF-8
166 Этот пакет содержит статические библиотеки для разработки программ,
169 %description static -l uk.UTF-8
170 Цей пакет містить статичні бібліотеки для розробки програм, що
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}
180 %description examples
181 SDL - example programs.
183 %description examples -l pl.UTF-8
184 SDL - przykładowe programy.
192 %{__aclocal} -I acinclude
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} \
203 --enable-pthread-sem \
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} \
217 rm -rf $RPM_BUILD_ROOT
218 install -d $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version}
221 DESTDIR=$RPM_BUILD_ROOT \
222 m4datadir=%{_aclocaldir}
224 cp -pr test/* $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version}
227 rm -rf $RPM_BUILD_ROOT
229 %post -p /sbin/ldconfig
230 %postun -p /sbin/ldconfig
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
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
247 %{_aclocaldir}/sdl2.m4
248 %{_pkgconfigdir}/sdl2.pc
250 %if %{with static_libs}
252 %defattr(644,root,root,755)
257 %defattr(644,root,root,755)
258 %{_examplesdir}/%{name}-%{version}