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