]> git.pld-linux.org Git - packages/alsa-lib.git/blobdiff - alsa-lib.spec
- now uses python3 by default, added python2 bcond
[packages/alsa-lib.git] / alsa-lib.spec
index 3643bad56ba7296baa404a6b783169e0d9e42424..64ff9d778aa6dcc54f67bd410c0d73eb9b550630 100644 (file)
 #
-# TODO:
-#  - track this bug - alsasink in gstreamer isn't working
-#    https://bugtrack.alsa-project.org/alsa-bug/bug_view_page.php?bug_id=0000116
-#
+# Conditional build:
+%bcond_without static_libs     # don't build static library
+%bcond_without apidocs         # do not build and package API docs
+%bcond_without python          # smixer-python binding
+%bcond_with    python2         # python 2.x instead of python 3.x for smixer pymodules
+%bcond_with    resmgr          # Resource Manager support
+
 Summary:       Advanced Linux Sound Architecture (ALSA) - Library
-Summary(es):   Biblioteca para ALSA (Advanced Linux Sound Architecture)
-Summary(pl):   Advanced Linux Sound Architecture (ALSA) - Biblioteka
-Summary(pt_BR):        Biblioteca para o ALSA (Advanced Linux Sound Architecture)
-Summary(ru):   âÉÂÌÉÏÔÅËÁ API ÄÌÑ ÒÁÂÏÔÙ Ó ÄÒÁÊ×ÅÒÏÍ ALSA
-Summary(uk):   â¦Â̦ÏÔÅËÁ API ÄÌÑ ÒÏÂÏÔÉ Ú ÄÒÁÊ×ÅÒÏÍ ALSA
+Summary(es.UTF-8):     Advanced Linux Sound Architecture (ALSA) - Biblioteca
+Summary(pl.UTF-8):     Advanced Linux Sound Architecture (ALSA) - Biblioteka
+Summary(pt_BR.UTF-8):  Biblioteca para o ALSA (Advanced Linux Sound Architecture)
+Summary(ru.UTF-8):     Библиотека API для работы с драйвером ALSA
+Summary(uk.UTF-8):     Бібліотека API для роботи з драйвером ALSA
 Name:          alsa-lib
-Version:       1.0.4
+Version:       1.1.6
 Release:       1
-License:       LGPL
+License:       LGPL v2.1+
 Group:         Libraries
 Source0:       ftp://ftp.alsa-project.org/pub/lib/%{name}-%{version}.tar.bz2
-# Source0-md5: 5f0967a9e71ffdfb47c41fed9e52d9a5
-Patch0:                %{name}-bluezsco.patch
+# Source0-md5: 2f981a8f7897c59ec2ddc44916d33788
+Source1:       %{name}-modprobe.conf
+Source2:       %{name}-asound.conf
+Source3:       smixer.conf
 URL:           http://www.alsa-project.org/
-BuildRequires: alsa-driver-devel
-BuildRequires: autoconf
+BuildRequires: autoconf >= 2.59
 BuildRequires: automake
 BuildRequires: doxygen
-BuildRequires: flex
-BuildRequires: libstdc++-devel
-BuildRequires: libtool
-BuildRequires: ncurses-devel
+BuildRequires: libtool >= 1.4
+%if %{with python}
+%if %{with python2}
+BuildRequires: python-devel >= 1:2.4
+BuildRequires: python-modules >= 1:2.4
+%else
+BuildRequires: python3-devel >= 1:3.2
+BuildRequires: python3-modules >= 1:3.2
+%endif
+%{?with_resmgr:BuildRequires:  resmgr-devel}
 BuildConflicts:        alsa-lib <= 0.4.0
 Obsoletes:     alsa-libs
+Conflicts:     alsa-utils < 1.0.20-3
 BuildRoot:     %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
 
-%define                _sysconfdir     /etc
-
 %description
 Advanced Linux Sound Architecture (ALSA) - Library
 
 Features:
 - general
-  - modularized architecture with support for 2.2
-  - support for versioned and exported symbols
-  - full proc filesystem support - /proc/sound
+       - modularized architecture
+       - support for versioned and exported symbols
+       - full proc filesystem support - /proc/sound
 - ISA soundcards
-  - support for 128k ISA DMA buffer
+       - support for 128k ISA DMA buffer
 - mixer
-  - new enhanced API for applications
-  - support for unlimited number of channels
-  - volume can be set in three ways (percentual (0-100), exact and
-    decibel)
-  - support for mute (and hardware mute if hardware supports it)
-  - support for mixer events
-    - this allows two or more applications to be synchronized
+       - new enhanced API for applications
+       - support for unlimited number of channels
+       - volume can be set in three ways (percentual (0-100), exact and
+         decibel)
+       - support for mute (and hardware mute if hardware supports it)
+       - support for mixer events
+               - this allows two or more applications to be synchronized
 - digital audio (PCM)
-  - new enhanced API for applications
-  - full real duplex support
-  - full duplex support for SoundBlaster 16/AWE soundcards
-  - digital audio data for playback and record should be read back using
-    proc filesystem
+       - new enhanced API for applications
+       - full real duplex support
+       - full duplex support for SoundBlaster 16/AWE soundcards
+       - digital audio data for playback and record should be read back using
+         proc filesystem
 - OSS/Lite compatibility
-  - full mixer compatibity
-  - full PCM (/dev/dsp) compatibility
+       - full mixer compatibity
+       - full PCM (/dev/dsp) compatibility
 
-%description -l es
-Bibliotecas para el sistema de sonido ALSA. Este paquete se necesita
-para ejecutar programas Linux que usan el programa de control de
-sonido ALSA.
-
-%description -l pl
+%description -l pl.UTF-8
 Advanced Linux Sound Architecture (ALSA) - Biblioteka
 
-Mo¿liwo¶ci:
+Możliwości:
 - generalne
-  - zmodularyzowana architektura ze wsparciem dla j±der 2.2
-  - pe³ne wsparcie dla systemu plików proc - /proc/sound
-- karty d¼wiêkowe ISA
-  - obs³uga bufora 128k ISA DMA
+       - zmodularyzowana architektura
+       - pełne wsparcie dla systemu plików proc - /proc/sound
+- karty dźwiękowe ISA
+       - obsługa bufora 128k ISA DMA
 - mikser
-  - nowe rozszerzone API dla aplikacji
-  - obs³uga nielimitowanej liczby kana³ów
-  - g³o¶no¶æ mo¿e byæ ustawiana na trzy ró¿ne sposoby (procentowo
-    (0-100), liniowo oraz w skali decybelowej)
-  - obs³uga wyciszania (oraz sprzêtowego wyciszania)
-  - obs³uga zdarzeñ miksera
-    - to pozwala dwum lub wiêkszej liczbie aplikacji siê synchronizowaæ
+       - nowe rozszerzone API dla aplikacji
+       - obsługa nielimitowanej liczby kanałów
+       - głośność może być ustawiana na trzy różne sposoby (procentowo
+         (0-100), liniowo oraz w skali decybelowej)
+       - obsługa wyciszania (oraz sprzętowego wyciszania)
+       - obsługa zdarzeń miksera
+               - to pozwala dwum lub większej liczbie aplikacji się synchronizować
 - cyfrowe audio (PCM)
-  - nowe rozszerzone API dla aplikacji
-  - pe³na, prawdziwa obs³uga trybu duplex
-  - pe³na obs³uga trybu duplex dla kart SoundBlaster 16/AWE
-  - dane cyfrowego d¼wiêku dla odtwarzania i nagrywania powinny byæ
-    odczytywane poprzez system plików /proc
-- kompatybilno¶æ z OSS/Lite
-  - pe³na kompatybilno¶æ miksera
-  - pe³na kompatybilno¶æ PCM (/dev/dsp)
-
-%description -l pt_BR
-Bibliotecas para o ALSA. Esse pacote é necessário para rodar programas
+       - nowe rozszerzone API dla aplikacji
+       - pełna, prawdziwa obsługa trybu duplex
+       - pełna obsługa trybu duplex dla kart SoundBlaster 16/AWE
+       - dane cyfrowego dźwięku dla odtwarzania i nagrywania powinny być
+         odczytywane poprzez system plików /proc
+- kompatybilność z OSS/Lite
+       - pełna kompatybilność miksera
+       - pełna kompatybilność PCM (/dev/dsp)
+
+%description -l pt_BR.UTF-8
+Bibliotecas para o ALSA. Esse pacote é necessário para rodar programas
 Linux queusam o driver de som ALSA.
 
-%description -l ru
-âÉÂÌÉÏÔÅËÁ API ÄÌÑ ÒÁÂÏÔÙ Ó ÄÒÁÊ×ÅÒÏÍ ALSA.
+%description -l ru.UTF-8
+Библиотека API для работы с драйвером ALSA.
 
-%description -l uk
-â¦Â̦ÏÔÅËÁ API ÄÌÑ ÒÏÂÏÔÉ Ú ÄÒÁÊ×ÅÒÏÍ ALSA.
+%description -l uk.UTF-8
+Бібліотека API для роботи з драйвером ALSA.
 
 %package devel
 Summary:       Advanced Linux Sound Architecture (ALSA) - header files
-Summary(es):   Archivos de desarrollo de ALSA (Advanced Linux Sound Architecture)
-Summary(pl):   Advanced Linux Sound Architecture (ALSA) - pliki nag³ówkowe
-Summary(pt_BR):        Arquivos de desenvolvimento do ALSA (Advanced Linux Sound Architecture)
-Summary(ru):   âÉÂÌÉÏÔÅËÁ API ÄÌÑ ÒÁÂÏÔÙ Ó ÄÒÁÊ×ÅÒÏÍ ALSA - ÆÁÊÌÙ ÐÒÏÇÒÁÍÍÉÓÔÁ
-Summary(uk):   â¦Â̦ÏÔÅËÁ API ÄÌÑ ÒÏÂÏÔÉ Ú ÄÒÁÊ×ÅÒÏÍ ALSA - ÆÁÊÌÉ ÐÒÏÇÒÁͦÓÔÁ
+Summary(es.UTF-8):     Archivos de desarrollo de ALSA
+Summary(pl.UTF-8):     Advanced Linux Sound Architecture (ALSA) - pliki nagłówkowe
+Summary(pt_BR.UTF-8):  Arquivos de desenvolvimento do ALSA (Advanced Linux Sound Architecture)
+Summary(ru.UTF-8):     Библиотека API для работы с драйвером ALSA - файлы программиста
+Summary(uk.UTF-8):     Бібліотека API для роботи з драйвером ALSA - файли програміста
 Group:         Development/Libraries
 Requires:      %{name} = %{version}-%{release}
-Requires:      alsa-driver-devel
 Obsoletes:     alsa-devel
 Obsoletes:     alsa-lib-devel-doc
 
 %description devel
 Advanced Linux Sound Architecture (ALSA) - header files.
 
-%description devel -l es
+%description devel -l es.UTF-8
 Este paquete contiene los archivos necesarios para compilar programas
 que usan la biblioteca del sistema ALSA. No es necesario instalarlo si
 lo que se desea es solamente ejecutar programas.
 
-%description devel -l pl
-Advanced Linux Sound Architecture (ALSA) - pliki nag³ówkowe.
+%description devel -l pl.UTF-8
+Advanced Linux Sound Architecture (ALSA) - pliki nagłówkowe.
 
-%description devel -l pt_BR
-Esse pacote contém os arquivos necessários para compilar programas que
-usam a biblioteca do ALSA. Não é necessário instalar esse pacote para
+%description devel -l pt_BR.UTF-8
+Esse pacote contém os arquivos necessários para compilar programas que
+usam a biblioteca do ALSA. Não é necessário instalar esse pacote para
 apenas rodar programas.
 
-%description devel -l ru
-âÉÂÌÉÏÔÅËÉ ÒÁÚÒÁÂÏÔÞÉËÁ É ÈÅÄÅÒÁ ÄÌÑ ÂÉÂÌÉÏÔÅËÉ API ÄÌÑ ÒÁÂÏÔÙ Ó
-ÄÒÁÊ×ÅÒÏÍ ALSA.
+%description devel -l ru.UTF-8
+Библиотеки разработчика и хедера для библиотеки API для работы с
+драйвером ALSA.
 
-%description devel -l uk
-â¦Â̦ÏÔÅËÉ ÐÒÏÇÒÁͦÓÔÁ ÔÁ ÈÅÄÅÒÉ ÄÌѠ¦Â̦ÏÔÅËÉ API ÄÌÑ ÒÏÂÏÔÉ Ú
-ÄÒÁÊ×ÅÒÏÍ ALSA.
+%description devel -l uk.UTF-8
+Бібліотеки програміста та хедери для бібліотеки API для роботи з
+драйвером ALSA.
 
 %package static
 Summary:       Advanced Linux Sound Architecture (ALSA) - static library
-Summary(pl):   Advanced Linux Sound Architecture (ALSA) - biblioteka statyczna
-Summary(pt_BR):        Bibliotecas estáticas para desenvolvimento com a alsa-lib
-Summary(ru):   óÔÁÔÉÞÅÓËÁÑ ÂÉÂÌÉÏÔÅËÁ API ÄÌÑ ÒÁÂÏÔÙ Ó ÄÒÁÊ×ÅÒÏÍ ALSA
-Summary(uk):   óÔÁÔÉÞÎÁ Â¦Â̦ÏÔÅËÁ API ÄÌÑ ÒÏÂÏÔÉ Ú ÄÒÁÊ×ÅÒÏÍ ALSA
+Summary(pl.UTF-8):     Advanced Linux Sound Architecture (ALSA) - biblioteka statyczna
+Summary(pt_BR.UTF-8):  Bibliotecas estáticas para desenvolvimento com a alsa-lib
+Summary(ru.UTF-8):     Статическая библиотека API для работы с драйвером ALSA
+Summary(uk.UTF-8):     Статична бібліотека API для роботи з драйвером ALSA
 Group:         Development/Libraries
 Requires:      %{name}-devel = %{version}-%{release}
 
 %description static
 Advanced Linux Sound Architecture (ALSA) - static library.
 
-%description static -l pl
+%description static -l pl.UTF-8
 Advanced Linux Sound Architecture (ALSA) - biblioteka statyczna.
 
-%description static -l pt_BR
-Bibliotecas estáticas para desenvolvimento com a alsa-lib
+%description static -l pt_BR.UTF-8
+Bibliotecas estáticas para desenvolvimento com a alsa-lib
+
+%description static -l ru.UTF-8
+Статическая библиотека API для работы с драйвером ALSA.
+
+%description static -l uk.UTF-8
+Статична бібліотека API для роботи з драйвером ALSA.
+
+%package apidocs
+Summary:       ALSA Library API documentation
+Summary(pl.UTF-8):     Dokumentacja API biblioteki ALSA
+Group:         Documentation
+%if "%{_rpmversion}" >= "5"
+BuildArch:     noarch
+%endif
+
+%description apidocs
+API and internal documentation for ALSA Library.
+
+%description apidocs -l pl.UTF-8
+Dokumentacja API biblioteki ALSA.
+
+%package smixer-python
+Summary:       Python binding module for ALSA Mixer Interface
+Summary(pl.UTF-8):     Moduł wiązania Pythona dla interfejsu miksera architektury ALSA
+Group:         Libraries
+Requires:      %{name} = %{version}-%{release}
 
-%description static -l ru
-óÔÁÔÉÞÅÓËÁÑ ÂÉÂÌÉÏÔÅËÁ API ÄÌÑ ÒÁÂÏÔÙ Ó ÄÒÁÊ×ÅÒÏÍ ALSA.
+%description smixer-python
+Python binding module for ALSA Mixer Interface.
 
-%description static -l uk
-óÔÁÔÉÞÎÁ Â¦Â̦ÏÔÅËÁ API ÄÌÑ ÒÏÂÏÔÉ Ú ÄÒÁÊ×ÅÒÏÍ ALSA.
+%description smixer-python -l pl.UTF-8
+Moduł wiązania Pythona dla interfejsu miksera architektury ALSA.
 
 %prep
 %setup -q
-%patch0 -p1
+cp -p %{SOURCE3} src/conf
 
 %build
 %{__libtoolize}
-%{__aclocal}
+%{__aclocal} -I m4
 %{__autoconf}
+%{__autoheader}
 %{__automake}
-%configure \
+configure_opts="\
+       --disable-silent-rules \
+       %{!?with_python:--disable-python} \
+       %{?with_python2:--enable-python2} \
+       %{?with_resmgr:--enable-resmgr} \
+       --enable-mixer-modules \
+       --enable-mixer-pymods
+"
+
+%if %{with static_libs}
+install -d build-static
+cd build-static
+../%configure $configure_opts \
+       --disable-shared \
        --enable-static
+%{__make}
+cd ..
+%endif
+
+install -d build-shared
+cd build-shared
+../%configure $configure_opts \
+       --enable-shared \
+       --disable-static
 
 %{__make}
-%{__make} doc
+%{?with_apidocs:%{__make} doc}
+cd ..
 
 %install
 rm -rf $RPM_BUILD_ROOT
+install -d $RPM_BUILD_ROOT{/%{_lib},%{_sysconfdir}/alsa,/etc/modprobe.d}
+
+%if %{with static_libs}
+%{__make} -C build-static/src install-libLTLIBRARIES \
+       DESTDIR=$RPM_BUILD_ROOT
+%endif
 
-%{__make} install \
+%{__make} -C build-shared install \
        DESTDIR=$RPM_BUILD_ROOT
 
+%{__mv} $RPM_BUILD_ROOT%{_libdir}/libasound.so.* $RPM_BUILD_ROOT/%{_lib}
+%{__rm} $RPM_BUILD_ROOT%{_libdir}/libasound.so
+ln -sf /%{_lib}/$(cd $RPM_BUILD_ROOT/%{_lib}; echo libasound.so.*.*) \
+       $RPM_BUILD_ROOT%{_libdir}/libasound.so
+
 install -D utils/alsa.m4 $RPM_BUILD_ROOT%{_aclocaldir}/alsa.m4
+install %{SOURCE1} $RPM_BUILD_ROOT/etc/modprobe.d/alsa-base.conf
+install %{SOURCE2} $RPM_BUILD_ROOT%{_sysconfdir}/asound.conf
+
+%{__rm} $RPM_BUILD_ROOT%{_libdir}/alsa-lib/smixer/*.la
 
 %clean
 rm -rf $RPM_BUILD_ROOT
@@ -194,20 +262,43 @@ rm -rf $RPM_BUILD_ROOT
 
 %files
 %defattr(644,root,root,755)
-%attr(755,root,root) %{_bindir}/*
-%attr(755,root,root) %{_libdir}/lib*.so.*.*
+%doc doc/asoundrc.txt
+%attr(755,root,root) %{_bindir}/aserver
+%attr(755,root,root) /%{_lib}/libasound.so.*.*.*
+%attr(755,root,root) %ghost /%{_lib}/libasound.so.2
+%dir %{_libdir}/alsa-lib
+%dir %{_libdir}/alsa-lib/smixer
+%attr(755,root,root) %{_libdir}/alsa-lib/smixer/smixer-ac97.so
+%attr(755,root,root) %{_libdir}/alsa-lib/smixer/smixer-hda.so
+%attr(755,root,root) %{_libdir}/alsa-lib/smixer/smixer-sbase.so
 %{_datadir}/alsa
+%dir %{_sysconfdir}/alsa
+%config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/asound.conf
+%config(noreplace) %verify(not md5 mtime size) /etc/modprobe.d/alsa-base.conf
 
 %files devel
 %defattr(644,root,root,755)
-%doc doc/doxygen/html/*
-%attr(755,root,root) %{_libdir}/lib*.so
-%{_libdir}/lib*.la
-%{_aclocaldir}/alsa.m4
-%{_includedir}/sys/*.h
+%attr(755,root,root) %{_libdir}/libasound.so
+%{_libdir}/libasound.la
+%{_includedir}/sys/asoundlib.h
 %{_includedir}/alsa
-%{_pkgconfigdir}/*.pc
+%{_aclocaldir}/alsa.m4
+%{_pkgconfigdir}/alsa.pc
 
+%if %{with static_libs}
 %files static
 %defattr(644,root,root,755)
-%{_libdir}/lib*.a
+%{_libdir}/libasound.a
+%endif
+
+%if %{with apidocs}
+%files apidocs
+%defattr(644,root,root,755)
+%doc build-shared/doc/doxygen/html/*
+%endif
+
+%if %{with python}
+%files smixer-python
+%defattr(644,root,root,755)
+%attr(755,root,root) %{_libdir}/alsa-lib/smixer/smixer-python.so
+%endif
This page took 0.111376 seconds and 4 git commands to generate.