]> git.pld-linux.org Git - packages/SDL.git/blob - SDL.spec
- added libdir patch (fixes soname resolving with lib64)
[packages/SDL.git] / SDL.spec
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:        2
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 Patch3:         %{name}-libdir.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:1.4d
49 %{?with_nas:BuildRequires:      nas-devel}
50 %ifarch %{ix86}
51 BuildRequires:  nasm
52 %endif
53 BuildRequires:  perl-modules
54 %{?with_directfb: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 %description
66 SDL (Simple DirectMedia Layer) is a library that allows you portable,
67 low level access to a video framebuffer, audio output, mouse, and
68 keyboard. It can support both windowed and DGA modes of XFree86, and
69 it is designed to be portable - applications linked with SDL can also
70 be built on Win32 and BeOS.
71
72 %description -l pl.UTF-8
73 SDL (Simple DirectMedia Layer) jest biblioteką udostępniającą
74 przenośny, niskopoziomowy dostęp do bufora ramki video, wyjścia audio,
75 myszy oraz klawiatury. Może obsługiwać zarówno okienkowy tryb XFree86
76 jak i DGA. Konstruując ją miano na uwadze przenośność: aplikacje
77 konsolidowane z SDL można również budować w systemach Win32 i BeOS.
78
79 %description -l pt_BR.UTF-8
80 Esse é o Simple DirectMedia Layer, uma API genérica que dá acesso de
81 baixo nível a áudio, teclado, mouse e vídeo em várias plataformas.
82
83 Essa biblioteca é usada por alguns jogos.
84
85 %description -l ru.UTF-8
86 SDL (Simple DirectMedia Layer) это набор функций, предоставляющий
87 низкоуровневый доступ к звуку, клавиатуре, манипулятору мышь и к
88 буферу экрана на множестве различных платформ.
89
90 %package devel
91 Summary:        SDL - Header files
92 Summary(pl.UTF-8):      SDL - Pliki nagłówkowe
93 Summary(pt_BR.UTF-8):   Bibliotecas e arquivos de cabeçalho para aplicações SDL
94 Summary(ru.UTF-8):      Файлы, необходимые для разработки программ, использующих SDL
95 Summary(uk.UTF-8):      Файли, необхідні для розробки програм, що використовують SDL
96 Summary(zh_CN.UTF-8):   SDL (Simple DirectMedia Layer) 开发库
97 Group:          Development/Libraries
98 Requires:       %{name} = %{version}-%{release}
99 Suggests:       OpenGL-GLU-devel
100 %{?with_directfb:Requires:      DirectFB-devel >= 0.9.15}
101 %{?with_aa:Requires:    aalib-devel}
102 %{?with_caca:Requires:  libcaca-devel}
103 %{?with_ggi:Requires:   libggi-devel}
104 %{?with_nas:Requires:   nas-devel}
105 %{?with_svga:Requires:  svgalib-devel >= 1.4.0}
106 Requires:       tslib-devel
107
108 %description devel
109 SDL - Header files.
110
111 %description devel -l pl.UTF-8
112 SDL - Pliki nagłówkowe.
113
114 %description devel -l pt_BR.UTF-8
115 Esse pacote contém bibliotecas, arquivos de cabeçalho e outros
116 recursos para o desenvolvimento de aplicativos com SDL.
117
118 %description devel -l ru.UTF-8
119 Этот пакет содержит файлы, необходимые для разработки программ,
120 использующих SDL.
121
122 %description devel -l uk.UTF-8
123 Цей пакет містить файли, необхідні для розробки програм, що
124 використовують SDL.
125
126 %package static
127 Summary:        SDL - static libraries
128 Summary(pl.UTF-8):      SDL - biblioteki statyczne
129 Summary(pt_BR.UTF-8):   Biblioteca estática para desenvolvimento de aplicações com a SDL
130 Summary(ru.UTF-8):      Статические библиотеки для разработки с использованием SDL
131 Summary(uk.UTF-8):      Статичні бібліотеки для розробки з використанням SDL
132 Group:          Development/Libraries
133 Requires:       %{name}-devel = %{version}-%{release}
134
135 %description static
136 SDL - static libraries.
137
138 %description static -l pl.UTF-8
139 SDL - biblioteki statyczne.
140
141 %description static -l pt_BR.UTF-8
142 Biblioteca estática para desenvolvimento de aplicações com a SDL.
143
144 %description static -l ru.UTF-8
145 Этот пакет содержит статические библиотеки для разработки программ,
146 использующих SDL.
147
148 %description static -l uk.UTF-8
149 Цей пакет містить статичні бібліотеки для розробки програм, що
150 використовують SDL.
151
152 %package examples
153 Summary:        SDL - example programs
154 Summary(pl.UTF-8):      SDL - programy przykładowe
155 License:        Public Domain
156 Group:          Development/Libraries
157 Requires:       %{name}-devel = %{version}-%{release}
158
159 %description examples
160 SDL - example programs.
161
162 %description examples -l pl.UTF-8
163 SDL - przykładowe programy.
164
165 %prep
166 %setup -q
167 %patch0 -p1
168 %patch1 -p1
169 #%patch2 -p1    # needs rewrite
170 %patch3 -p1
171
172 %{!?with_alsa:echo 'AC_DEFUN([AM_PATH_ALSA],[$3])' >> acinclude.m4}
173 %{!?with_esd:echo 'AC_DEFUN([AM_PATH_ESD],[$3])' >> acinclude.m4}
174
175 %build
176 %{__libtoolize}
177 %{__aclocal}
178 %{__autoconf}
179 %configure \
180 %ifarch %{ix86}
181         --enable-nasm \
182 %else
183         --disable-nasm \
184 %endif
185         --disable-rpath \
186         %{!?with_alsa:--disable-alsa} \
187         %{!?with_arts:--disable-arts} \
188         --enable-dga \
189         %{!?with_esd:--disable-esd} \
190         %{!?with_nas:--disable-nas} \
191         --enable-pthreads \
192         --enable-pthread-sem \
193         %{?with_aalib:--enable-video-aalib} \
194         %{?with_caca:--enable-video-caca} \
195         %{!?with_directfb:--disable-video-directfb} \
196         --enable-video-dga \
197         --enable-video-fbcon \
198         %{?with_ggi:--enable-video-ggi} \
199         --enable-video-opengl \
200         %{!?with_svga:--disable-video-svga} \
201         --enable-video-x11-dgamouse \
202         --enable-video-x11-vm \
203         --enable-video-x11-xinerama \
204         --enable-video-x11-xme \
205         --enable-video-x11-xrandr \
206         --enable-video-x11-xv \
207         --with-x \
208         %{!?with_static_libs:--disable-static}
209
210 %{__make}
211
212 %install
213 rm -rf $RPM_BUILD_ROOT
214 install -d $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version}
215
216 %{__make} install \
217         DESTDIR=$RPM_BUILD_ROOT \
218         m4datadir=%{_aclocaldir}
219
220 rm -rf test/autom4te.cache
221 install test/* $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version}
222
223 rm -rf docs/man3
224
225 %clean
226 rm -rf $RPM_BUILD_ROOT
227
228 %post   -p /sbin/ldconfig
229 %postun -p /sbin/ldconfig
230
231 %files
232 %defattr(644,root,root,755)
233 %doc BUGS CREDITS README README-SDL.txt TODO WhatsNew
234 %attr(755,root,root) %{_libdir}/libSDL-1.2.so.*.*.*
235 %attr(755,root,root) %ghost %{_libdir}/libSDL-1.2.so.0
236
237 %files devel
238 %defattr(644,root,root,755)
239 %doc docs.html docs
240 %attr(755,root,root) %{_bindir}/sdl-config
241 %attr(755,root,root) %{_libdir}/libSDL.so
242 %{_libdir}/libSDL.la
243 %{_libdir}/libSDLmain.a
244 %{_includedir}/SDL
245 %{_aclocaldir}/sdl.m4
246 %{_pkgconfigdir}/sdl.pc
247 %{_mandir}/man3/SDL*.3*
248
249 %if %{with static_libs}
250 %files static
251 %defattr(644,root,root,755)
252 %{_libdir}/libSDL.a
253 %endif
254
255 %files examples
256 %defattr(644,root,root,755)
257 %{_examplesdir}/%{name}-%{version}
This page took 0.051775 seconds and 4 git commands to generate.