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