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