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