]> git.pld-linux.org Git - packages/alsa-lib.git/blob - alsa-lib.spec
up to 1.2.11
[packages/alsa-lib.git] / alsa-lib.spec
1 #
2 # Conditional build:
3 %bcond_without  static_libs     # don't build static library
4 %bcond_without  apidocs         # do not build and package API docs
5 %bcond_without  python          # smixer-python binding
6 %bcond_with     python2         # python 2.x instead of python 3.x for smixer pymodules
7 %bcond_with     resmgr          # Resource Manager support
8
9 Summary:        Advanced Linux Sound Architecture (ALSA) - Library
10 Summary(es.UTF-8):      Advanced Linux Sound Architecture (ALSA) - Biblioteca
11 Summary(pl.UTF-8):      Advanced Linux Sound Architecture (ALSA) - Biblioteka
12 Summary(pt_BR.UTF-8):   Biblioteca para o ALSA (Advanced Linux Sound Architecture)
13 Summary(ru.UTF-8):      Библиотека API для работы с драйвером ALSA
14 Summary(uk.UTF-8):      Бібліотека API для роботи з драйвером ALSA
15 Name:           alsa-lib
16 Version:        1.2.11
17 # alsa-*-conf tarballs are not released for each patch version
18 %define topology_confver        1.2.5.1
19 %define ucm_confver             1.2.11
20 Release:        1
21 License:        LGPL v2.1+
22 Group:          Libraries
23 Source0:        ftp://ftp.alsa-project.org/pub/lib/%{name}-%{version}.tar.bz2
24 # Source0-md5:  1c5870770047b6a520d18a43f49e42ea
25 Source1:        %{name}-modprobe.conf
26 Source2:        %{name}-asound.conf
27 Source3:        smixer.conf
28 Source4:        ftp://ftp.alsa-project.org/pub/lib/alsa-topology-conf-%{topology_confver}.tar.bz2
29 # Source4-md5:  066d6a980e09a2fa44b4cc1d06ecc0ea
30 Source5:        ftp://ftp.alsa-project.org/pub/lib/alsa-ucm-conf-%{ucm_confver}.tar.bz2
31 # Source5-md5:  125060f9693e27ed9a57e29a2e88c32f
32 Patch0:         version-script-path.patch
33 URL:            https://www.alsa-project.org/
34 BuildRequires:  autoconf >= 2.59
35 BuildRequires:  automake
36 BuildRequires:  doxygen
37 BuildRequires:  libtool >= 1.4
38 %if %{with python}
39 %if %{with python2}
40 BuildRequires:  python-devel >= 1:2.4
41 BuildRequires:  python-modules >= 1:2.4
42 %else
43 BuildRequires:  python3-devel >= 1:3.2
44 BuildRequires:  python3-modules >= 1:3.2
45 %endif
46 %endif
47 %{?with_resmgr:BuildRequires:   resmgr-devel}
48 BuildRequires:  rpm-build >= 4.6
49 BuildRequires:  tar >= 1:1.15
50 BuildConflicts: alsa-lib <= 0.4.0
51 Obsoletes:      alsa-libs < 0.5.2
52 Conflicts:      alsa-utils < 1.0.20-3
53 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
54
55 %description
56 Advanced Linux Sound Architecture (ALSA) - Library
57
58 Features:
59 - general
60         - modularized architecture
61         - support for versioned and exported symbols
62         - full proc filesystem support - /proc/sound
63 - ISA soundcards
64         - support for 128k ISA DMA buffer
65 - mixer
66         - new enhanced API for applications
67         - support for unlimited number of channels
68         - volume can be set in three ways (percentual (0-100), exact and
69           decibel)
70         - support for mute (and hardware mute if hardware supports it)
71         - support for mixer events
72                 - this allows two or more applications to be synchronized
73 - digital audio (PCM)
74         - new enhanced API for applications
75         - full real duplex support
76         - full duplex support for SoundBlaster 16/AWE soundcards
77         - digital audio data for playback and record should be read back using
78           proc filesystem
79 - OSS/Lite compatibility
80         - full mixer compatibity
81         - full PCM (/dev/dsp) compatibility
82
83 %description -l pl.UTF-8
84 Advanced Linux Sound Architecture (ALSA) - Biblioteka
85
86 Możliwości:
87 - generalne
88         - zmodularyzowana architektura
89         - pełne wsparcie dla systemu plików proc - /proc/sound
90 - karty dźwiękowe ISA
91         - obsługa bufora 128k ISA DMA
92 - mikser
93         - nowe rozszerzone API dla aplikacji
94         - obsługa nielimitowanej liczby kanałów
95         - głośność może być ustawiana na trzy różne sposoby (procentowo
96           (0-100), liniowo oraz w skali decybelowej)
97         - obsługa wyciszania (oraz sprzętowego wyciszania)
98         - obsługa zdarzeń miksera
99                 - to pozwala dwum lub większej liczbie aplikacji się synchronizować
100 - cyfrowe audio (PCM)
101         - nowe rozszerzone API dla aplikacji
102         - pełna, prawdziwa obsługa trybu duplex
103         - pełna obsługa trybu duplex dla kart SoundBlaster 16/AWE
104         - dane cyfrowego dźwięku dla odtwarzania i nagrywania powinny być
105           odczytywane poprzez system plików /proc
106 - kompatybilność z OSS/Lite
107         - pełna kompatybilność miksera
108         - pełna kompatybilność PCM (/dev/dsp)
109
110 %description -l pt_BR.UTF-8
111 Bibliotecas para o ALSA. Esse pacote é necessário para rodar programas
112 Linux queusam o driver de som ALSA.
113
114 %description -l ru.UTF-8
115 Библиотека API для работы с драйвером ALSA.
116
117 %description -l uk.UTF-8
118 Бібліотека API для роботи з драйвером ALSA.
119
120 %package devel
121 Summary:        Advanced Linux Sound Architecture (ALSA) - header files
122 Summary(es.UTF-8):      Archivos de desarrollo de ALSA
123 Summary(pl.UTF-8):      Advanced Linux Sound Architecture (ALSA) - pliki nagłówkowe
124 Summary(pt_BR.UTF-8):   Arquivos de desenvolvimento do ALSA (Advanced Linux Sound Architecture)
125 Summary(ru.UTF-8):      Библиотека API для работы с драйвером ALSA - файлы программиста
126 Summary(uk.UTF-8):      Бібліотека API для роботи з драйвером ALSA - файли програміста
127 Group:          Development/Libraries
128 Requires:       %{name} = %{version}-%{release}
129 Obsoletes:      alsa-devel < 0.9
130 Obsoletes:      alsa-lib-devel-doc < 0.9
131
132 %description devel
133 Advanced Linux Sound Architecture (ALSA) - header files.
134
135 %description devel -l es.UTF-8
136 Este paquete contiene los archivos necesarios para compilar programas
137 que usan la biblioteca del sistema ALSA. No es necesario instalarlo si
138 lo que se desea es solamente ejecutar programas.
139
140 %description devel -l pl.UTF-8
141 Advanced Linux Sound Architecture (ALSA) - pliki nagłówkowe.
142
143 %description devel -l pt_BR.UTF-8
144 Esse pacote contém os arquivos necessários para compilar programas que
145 usam a biblioteca do ALSA. Não é necessário instalar esse pacote para
146 apenas rodar programas.
147
148 %description devel -l ru.UTF-8
149 Библиотеки разработчика и хедера для библиотеки API для работы с
150 драйвером ALSA.
151
152 %description devel -l uk.UTF-8
153 Бібліотеки програміста та хедери для бібліотеки API для роботи з
154 драйвером ALSA.
155
156 %package static
157 Summary:        Advanced Linux Sound Architecture (ALSA) - static library
158 Summary(pl.UTF-8):      Advanced Linux Sound Architecture (ALSA) - biblioteka statyczna
159 Summary(pt_BR.UTF-8):   Bibliotecas estáticas para desenvolvimento com a alsa-lib
160 Summary(ru.UTF-8):      Статическая библиотека API для работы с драйвером ALSA
161 Summary(uk.UTF-8):      Статична бібліотека API для роботи з драйвером ALSA
162 Group:          Development/Libraries
163 Requires:       %{name}-devel = %{version}-%{release}
164
165 %description static
166 Advanced Linux Sound Architecture (ALSA) - static library.
167
168 %description static -l pl.UTF-8
169 Advanced Linux Sound Architecture (ALSA) - biblioteka statyczna.
170
171 %description static -l pt_BR.UTF-8
172 Bibliotecas estáticas para desenvolvimento com a alsa-lib
173
174 %description static -l ru.UTF-8
175 Статическая библиотека API для работы с драйвером ALSA.
176
177 %description static -l uk.UTF-8
178 Статична бібліотека API для роботи з драйвером ALSA.
179
180 %package apidocs
181 Summary:        ALSA Library API documentation
182 Summary(pl.UTF-8):      Dokumentacja API biblioteki ALSA
183 Group:          Documentation
184 BuildArch:      noarch
185
186 %description apidocs
187 API and internal documentation for ALSA Library.
188
189 %description apidocs -l pl.UTF-8
190 Dokumentacja API biblioteki ALSA.
191
192 %package smixer-python
193 Summary:        Python binding module for ALSA Mixer Interface
194 Summary(pl.UTF-8):      Moduł wiązania Pythona dla interfejsu miksera architektury ALSA
195 Group:          Libraries
196 Requires:       %{name} = %{version}-%{release}
197
198 %description smixer-python
199 Python binding module for ALSA Mixer Interface.
200
201 %description smixer-python -l pl.UTF-8
202 Moduł wiązania Pythona dla interfejsu miksera architektury ALSA.
203
204 %prep
205 %setup -q
206 cp -p %{SOURCE3} src/conf
207 %patch0 -p1
208
209 %build
210 %{__libtoolize}
211 %{__aclocal} -I m4
212 %{__autoconf}
213 %{__autoheader}
214 %{__automake}
215 configure_opts="\
216         --disable-silent-rules \
217         %{!?with_python:--disable-python} \
218         %{?with_python2:--enable-python2} \
219         %{?with_resmgr:--enable-resmgr} \
220         --enable-mixer-modules \
221         --enable-mixer-pymods
222 "
223
224 %if %{with static_libs}
225 install -d build-static
226 cd build-static
227 ../%configure $configure_opts \
228         --disable-shared \
229         --enable-static
230 %{__make}
231 cd ..
232 %endif
233
234 install -d build-shared
235 cd build-shared
236 ../%configure $configure_opts \
237         --enable-shared \
238         --disable-static
239
240 %{__make}
241 %{?with_apidocs:%{__make} doc}
242 cd ..
243
244 %install
245 rm -rf $RPM_BUILD_ROOT
246 install -d $RPM_BUILD_ROOT{/%{_lib},%{_sysconfdir}/alsa/conf.d,%{_datadir}/alsa/alsa.conf.d,/etc/modprobe.d}
247
248 %if %{with static_libs}
249 %{__make} -C build-static/src install-libLTLIBRARIES \
250         DESTDIR=$RPM_BUILD_ROOT
251 %endif
252
253 %{__make} -C build-shared install \
254         DESTDIR=$RPM_BUILD_ROOT
255
256 %{__mv} $RPM_BUILD_ROOT%{_libdir}/libasound.so.* $RPM_BUILD_ROOT/%{_lib}
257 %{__rm} $RPM_BUILD_ROOT%{_libdir}/libasound.so
258 ln -sf /%{_lib}/$(cd $RPM_BUILD_ROOT/%{_lib}; echo libasound.so.*.*) \
259         $RPM_BUILD_ROOT%{_libdir}/libasound.so
260
261 tar xf %{SOURCE4} --strip-components=1 -C $RPM_BUILD_ROOT%{_datadir}/alsa alsa-topology-conf-%{topology_confver}/topology
262 tar xf %{SOURCE5} --strip-components=1 -C $RPM_BUILD_ROOT%{_datadir}/alsa alsa-ucm-conf-%{ucm_confver}/ucm alsa-ucm-conf-%{ucm_confver}/ucm2
263
264 install -D utils/alsa.m4 $RPM_BUILD_ROOT%{_aclocaldir}/alsa.m4
265 install %{SOURCE1} $RPM_BUILD_ROOT/etc/modprobe.d/alsa-base.conf
266 install %{SOURCE2} $RPM_BUILD_ROOT%{_sysconfdir}/asound.conf
267
268 %{__rm} $RPM_BUILD_ROOT%{_libdir}/alsa-lib/smixer/*.la
269
270 %clean
271 rm -rf $RPM_BUILD_ROOT
272
273 %post   -p /sbin/ldconfig
274 %postun -p /sbin/ldconfig
275
276 %files
277 %defattr(644,root,root,755)
278 %doc doc/asoundrc.txt
279 %attr(755,root,root) %{_bindir}/aserver
280 %attr(755,root,root) /%{_lib}/libasound.so.*.*.*
281 %attr(755,root,root) %ghost /%{_lib}/libasound.so.2
282 %attr(755,root,root) /%{_libdir}/libatopology.so.*.*.*
283 %attr(755,root,root) %ghost /%{_libdir}/libatopology.so.2
284 %dir %{_libdir}/alsa-lib
285 %dir %{_libdir}/alsa-lib/smixer
286 %attr(755,root,root) %{_libdir}/alsa-lib/smixer/smixer-ac97.so
287 %attr(755,root,root) %{_libdir}/alsa-lib/smixer/smixer-hda.so
288 %attr(755,root,root) %{_libdir}/alsa-lib/smixer/smixer-sbase.so
289 %dir %{_datadir}/alsa
290 %{_datadir}/alsa/cards
291 %{_datadir}/alsa/ctl
292 %{_datadir}/alsa/pcm
293 %{_datadir}/alsa/topology
294 %{_datadir}/alsa/ucm
295 %{_datadir}/alsa/ucm2
296 %{_datadir}/alsa/alsa.conf
297 # directory for "global" config files (not accessed directly, but through symlinks in %{_sysconfdir}/alsa/conf.d)
298 %dir %{_datadir}/alsa/alsa.conf.d
299 %{_datadir}/alsa/smixer.conf
300 %dir %{_sysconfdir}/alsa
301 # directory for "local" config files (loaded from %{_datadir}/alsa/alsa.conf)
302 %dir %{_sysconfdir}/alsa/conf.d
303 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/asound.conf
304 %config(noreplace) %verify(not md5 mtime size) /etc/modprobe.d/alsa-base.conf
305
306 %files devel
307 %defattr(644,root,root,755)
308 %attr(755,root,root) %{_libdir}/libasound.so
309 %attr(755,root,root) %{_libdir}/libatopology.so
310 %{_libdir}/libasound.la
311 %{_libdir}/libatopology.la
312 %{_includedir}/sys/asoundlib.h
313 %{_includedir}/alsa
314 %{_includedir}/asoundlib.h
315 %{_aclocaldir}/alsa.m4
316 %{_pkgconfigdir}/alsa.pc
317 %{_pkgconfigdir}/alsa-topology.pc
318
319 %if %{with static_libs}
320 %files static
321 %defattr(644,root,root,755)
322 %{_libdir}/libasound.a
323 %endif
324
325 %if %{with apidocs}
326 %files apidocs
327 %defattr(644,root,root,755)
328 %doc build-shared/doc/doxygen/html/*
329 %endif
330
331 %if %{with python}
332 %files smixer-python
333 %defattr(644,root,root,755)
334 %attr(755,root,root) %{_libdir}/alsa-lib/smixer/smixer-python.so
335 %endif
This page took 0.084349 seconds and 4 git commands to generate.