]> git.pld-linux.org Git - packages/alsa-lib.git/blobdiff - alsa-lib.spec
- updated to 1.0.26
[packages/alsa-lib.git] / alsa-lib.spec
index 3d95eb21d4f2800045378d482d760855434218ce..52a8f4b5172b49f2394c2d72899f8660ee7abc4d 100644 (file)
@@ -1,9 +1,10 @@
 #
 # 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    resmgr          # Resource Manager support
-#
+
 Summary:       Advanced Linux Sound Architecture (ALSA) - Library
 Summary(es.UTF-8):     Advanced Linux Sound Architecture (ALSA) - Biblioteca
 Summary(pl.UTF-8):     Advanced Linux Sound Architecture (ALSA) - Biblioteka
@@ -11,12 +12,12 @@ 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.21a
+Version:       1.0.26
 Release:       1
 License:       LGPL v2.1+
 Group:         Libraries
 Source0:       ftp://ftp.alsa-project.org/pub/lib/%{name}-%{version}.tar.bz2
-# Source0-md5: 914685deb8c23cb4b940a4173cf8efe4
+# Source0-md5: 2dfa35d28471d721e592b616beedf965
 Source1:       %{name}-modprobe.conf
 Source2:       %{name}-asound.conf
 URL:           http://www.alsa-project.org/
@@ -32,6 +33,7 @@ BuildRequires:        python-modules
 %{?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)
 
 %description
@@ -160,6 +162,17 @@ Bibliotecas estáticas para desenvolvimento com a alsa-lib
 %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
+
+%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
@@ -177,32 +190,54 @@ Moduł wiązania Pythona dla interfejsu miksera architektury ALSA.
 
 %build
 %{__libtoolize}
-%{__aclocal}
+%{__aclocal} -I m4
 %{__autoconf}
 %{__autoheader}
 %{__automake}
-%configure \
-       --enable-static \
+configure_opts="\
+       --disable-silent-rules \
        %{!?with_python:--disable-python} \
-       %{?with_resmgr:--enable-resmgr} \
-       %{!?with_static_libs:--disable-static}
+       %{?with_resmgr:--enable-resmgr}
+"
+
+%if %{with static_libs}
+%configure $configure_opts \
+       --disable-shared \
+       --enable-static
+%{__make}
+install -d static
+%{__make} install \
+       DESTDIR=$(pwd)/static
+%{__make} clean
+%endif
+
+%configure $configure_opts \
+       --enable-shared \
+       --disable-static
 
 %{__make}
-%{__make} doc
+
+%{?with_apidocs:%{__make} doc}
 
 %install
 rm -rf $RPM_BUILD_ROOT
-
-install -d $RPM_BUILD_ROOT/etc/{alsa,modprobe.d}
+install -d $RPM_BUILD_ROOT{/%{_lib},%{_sysconfdir}/alsa,/etc/modprobe.d}
 
 %{__make} install \
        DESTDIR=$RPM_BUILD_ROOT
 
+install static/%{_libdir}/libasound.a $RPM_BUILD_ROOT%{_libdir}
+
+mv -f $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/etc/asound.conf
+install %{SOURCE2} $RPM_BUILD_ROOT%{_sysconfdir}/asound.conf
 
-rm -f $RPM_BUILD_ROOT%{_libdir}/alsa-lib/smixer/*.{a,la}
+%{__rm} -f $RPM_BUILD_ROOT%{_libdir}/alsa-lib/smixer/*.{a,la}
 
 %clean
 rm -rf $RPM_BUILD_ROOT
@@ -214,21 +249,20 @@ rm -rf $RPM_BUILD_ROOT
 %defattr(644,root,root,755)
 %doc doc/asoundrc.txt
 %attr(755,root,root) %{_bindir}/aserver
-%attr(755,root,root) %{_libdir}/libasound.so.*.*.*
-%attr(755,root,root) %ghost %{_libdir}/libasound.so.2
+%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
-%{_sysconfdir}/alsa
+%dir %{_sysconfdir}/alsa
 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/asound.conf
-%attr(644,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/modprobe.d/alsa-base.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}/libasound.so
 %{_libdir}/libasound.la
 %{_includedir}/sys/asoundlib.h
@@ -242,6 +276,12 @@ rm -rf $RPM_BUILD_ROOT
 %{_libdir}/libasound.a
 %endif
 
+%if %{with apidocs}
+%files apidocs
+%defattr(644,root,root,755)
+%doc doc/doxygen/html/*
+%endif
+
 %if %{with python}
 %files smixer-python
 %defattr(644,root,root,755)
This page took 0.03917 seconds and 4 git commands to generate.