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