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