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