]> git.pld-linux.org Git - packages/SDL2.git/blob - SDL2.spec
- updated to 2.0.3; completed mir bcond
[packages/SDL2.git] / SDL2.spec
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_with     mir             # Mir graphics support
11 %bcond_with     wayland         # Wayland graphics support
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:
20 # libartsc.so.?                 [if with arts]
21 # libasound.so.2                [if with alsa]
22 # libaudio.so.2                 [if with nas]
23 # libdirectfb-*.so --needs patch (-release not supported by configure)
24 # libesd.so.0                   [if with esd]
25 # libfusionsound-*.so --needs patch (-release not supported by configure)
26 # libmirclient.so.7             [if with mir]
27 # libpulse-simple.so.0
28 # libwayland-client.so.0        [if with wayland]
29 # libwayland-cursor.so.0        [if with wayland]
30 # libwayland-egl.so.1           [if with wayland]
31 # libxkbcommon.so.0             [if with wayland or mir]
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
53 Summary:        SDL (Simple DirectMedia Layer) - Game/Multimedia Library
54 Summary(pl.UTF-8):      SDL (Simple DirectMedia Layer) - Biblioteka do gier/multimediów
55 Summary(zh_CN.UTF-8):   SDL (Simple DirectMedia Layer) Generic APIs - 游戏/多媒体库
56 Name:           SDL2
57 Version:        2.0.3
58 Release:        1
59 License:        Zlib (BSD-like)
60 Group:          Libraries
61 Source0:        http://www.libsdl.org/release/%{name}-%{version}.tar.gz
62 # Source0-md5:  fe6c61d2e9df9ef570e7e80c6e822537
63 Patch0:         %{name}-config.patch
64 URL:            http://www.libsdl.org/
65 %{?with_wayland:BuildRequires:  Mesa-libwayland-egl-devel}
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}
72 BuildRequires:  autoconf >= 2.59-9
73 BuildRequires:  automake
74 BuildRequires:  dbus-devel
75 %{?with_esd:BuildRequires:      esound-devel >= 0.2.8}
76 BuildRequires:  gcc >= 5:4.0
77 BuildRequires:  libtool >= 2:2.0
78 %{?with_mir:BuildRequires:      mir-devel}
79 %{?with_nas:BuildRequires:      nas-devel}
80 BuildRequires:  perl-modules
81 BuildRequires:  pkgconfig >= 1:0.7
82 BuildRequires:  pulseaudio-devel >= 0.9
83 BuildRequires:  tslib-devel
84 BuildRequires:  udev-devel
85 # wayland-client, wayland-cursor
86 %{?with_wayland:BuildRequires:  wayland-devel}
87 BuildRequires:  xorg-lib-libX11-devel
88 BuildRequires:  xorg-lib-libXScrnSaver-devel
89 BuildRequires:  xorg-lib-libXcursor-devel
90 BuildRequires:  xorg-lib-libXext-devel
91 BuildRequires:  xorg-lib-libXi-devel
92 BuildRequires:  xorg-lib-libXinerama-devel
93 BuildRequires:  xorg-lib-libXrandr-devel
94 BuildRequires:  xorg-lib-libXrender-devel
95 BuildRequires:  xorg-lib-libXxf86vm-devel
96 %if %{with mir} || %{with wayland}
97 BuildRequires:  xorg-lib-libxkbcommon-devel
98 %endif
99 BuildRequires:  xorg-proto-xextproto-devel
100 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
101
102 %define         specflags_ppc   -maltivec
103
104 %description
105 SDL (Simple DirectMedia Layer) is a library that allows you portable,
106 low level access to a video framebuffer, audio output, mouse, and
107 keyboard. It can support both windowed and DGA modes of XFree86, and
108 it is designed to be portable - applications linked with SDL can also
109 be built on Win32 and BeOS.
110
111 %description -l pl.UTF-8
112 SDL (Simple DirectMedia Layer) jest biblioteką udostępniającą
113 przenośny, niskopoziomowy dostęp do bufora ramki video, wyjścia audio,
114 myszy oraz klawiatury. Może obsługiwać zarówno okienkowy tryb XFree86
115 jak i DGA. Konstruując ją miano na uwadze przenośność: aplikacje
116 konsolidowane z SDL można również budować w systemach Win32 i BeOS.
117
118 %description -l pt_BR.UTF-8
119 Esse é o Simple DirectMedia Layer, uma API genérica que dá acesso de
120 baixo nível a áudio, teclado, mouse e vídeo em várias plataformas.
121
122 Essa biblioteca é usada por alguns jogos.
123
124 %description -l ru.UTF-8
125 SDL (Simple DirectMedia Layer) это набор функций, предоставляющий
126 низкоуровневый доступ к звуку, клавиатуре, манипулятору мышь и к
127 буферу экрана на множестве различных платформ.
128
129 %package devel
130 Summary:        SDL - Header files
131 Summary(pl.UTF-8):      SDL - Pliki nagłówkowe
132 Summary(pt_BR.UTF-8):   Bibliotecas e arquivos de cabeçalho para aplicações SDL
133 Summary(ru.UTF-8):      Файлы, необходимые для разработки программ, использующих SDL
134 Summary(uk.UTF-8):      Файли, необхідні для розробки програм, що використовують SDL
135 Summary(zh_CN.UTF-8):   SDL (Simple DirectMedia Layer) 开发库
136 Group:          Development/Libraries
137 Requires:       %{name} = %{version}-%{release}
138 %{?with_directfb:Requires:      DirectFB-devel >= 1.0.0}
139 Requires:       tslib-devel
140 Requires:       xorg-lib-libX11-devel
141 Suggests:       OpenGL-GLU-devel
142
143 %description devel
144 SDL - Header files.
145
146 %description devel -l pl.UTF-8
147 SDL - Pliki nagłówkowe.
148
149 %description devel -l pt_BR.UTF-8
150 Esse pacote contém bibliotecas, arquivos de cabeçalho e outros
151 recursos 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
162 Summary:        SDL - static libraries
163 Summary(pl.UTF-8):      SDL - biblioteki statyczne
164 Summary(pt_BR.UTF-8):   Biblioteca estática para desenvolvimento de aplicações com a SDL
165 Summary(ru.UTF-8):      Статические библиотеки для разработки с использованием SDL
166 Summary(uk.UTF-8):      Статичні бібліотеки для розробки з використанням SDL
167 Group:          Development/Libraries
168 Requires:       %{name}-devel = %{version}-%{release}
169
170 %description static
171 SDL - static libraries.
172
173 %description static -l pl.UTF-8
174 SDL - biblioteki statyczne.
175
176 %description static -l pt_BR.UTF-8
177 Biblioteca 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
188 Summary:        SDL - example programs
189 Summary(pl.UTF-8):      SDL - programy przykładowe
190 License:        Public Domain
191 Group:          Development/Libraries
192 Requires:       %{name}-devel = %{version}-%{release}
193
194 %description examples
195 SDL - example programs.
196
197 %description examples -l pl.UTF-8
198 SDL - 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} \
224         %{?with_mir:--enable-video-mir} \
225         --enable-video-opengl%{!?with_opengl:=no} \
226         --enable-video-opengles%{!?with_gles:=no} \
227         %{?with_wayland:--enable-video-wayland} \
228         --with-x
229
230 %{__make}
231
232 %install
233 rm -rf $RPM_BUILD_ROOT
234 install -d $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version}
235
236 %{__make} install \
237         DESTDIR=$RPM_BUILD_ROOT \
238         m4datadir=%{_aclocaldir}
239
240 cp -pr test/* $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version}
241
242 %clean
243 rm -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.066556 seconds and 4 git commands to generate.