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