%bcond_without alsa # support OSS, not ALSA
%bcond_without libwrap # without hosts.{access,deny} support
+%define _noautoprov libesd.so.0
+
Summary: The Enlightened Sound Daemon
Summary(es): El servidor de sonido del Enlightenment
Summary(fr): Démon audio de Enlightment
Summary(uk): óÅÒ×ÅÒ, ÝÏ ÄÏÚ×ÏÌѤ ͦËÛÉÒÕ×ÁÔÉ ×É×¦Ä ÎÁ Ú×ÕËÏ×ÉÊ ÐÒÉÓÔÒ¦Ê
Name: esound
Version: 0.2.31
-Release: 1
+Release: 2
Epoch: 1
License: GPL
Group: Daemons
Patch0: %{name}-am.patch
Patch1: %{name}-etc_dir.patch
URL: http://www.tux.org/~ricdude/EsounD.html
+Requires: esound-driver
+Provides: libesd.so.0
%{?with_alsa:BuildRequires: alsa-lib-devel}
BuildRequires: audiofile-devel >= 0.2.0
BuildRequires: autoconf
ãÅÊ ÐÁËÅÔ Í¦ÓÔÉÔØ ÓÔÁÔÉÞΦ ¦Â̦ÏÔÅËÉ, ÎÅÏÂȦÄΦ ÄÌÑ ÒÏÚÒÏÂËÉ
ÐÒÉËÌÁÄÎÉÈ ÐÒÏÇÒÁÍ, ÝÏ ×ÉËÏÒÉÓÔÏ×ÕÀÔØ esound.
+%package oss
+Summary: EsounD OSS driver
+Summary(pl): Sterownik OSS dla EsoundD
+Group: Libraries
+Requires: %{name} = %{epoch}:%{version}
+Provides: esound-driver
+Conflicts: esound-alsa
+
+%description oss
+EsounD OSS driver.
+
+%description oss -l pl
+Sterownik OSS dla EsoundD.
+
+%package alsa
+Summary: EsounD ALSA driver
+Summary(pl): Sterownik ALSA dla EsoundD
+Group: Libraries
+Requires: %{name} = %{epoch}:%{version}
+Provides: esound-driver
+Conflicts: esound-oss
+
+%description alsa
+EsounD ALSA driver.
+
+%description alsa -l pl
+Sterownik ALSA dla EsoundD.
+
%prep
%setup -q
%patch0 -p1
%{__aclocal}
%{__autoconf}
%{__automake}
+
%configure \
--enable-ipv6 \
--with%{!?with_libwrap:out}-libwrap \
-%if %{with alsa}
- --enable-alsa
-%else
--disable-alsa
-%endif
+%{__make}
+cp -f .libs/libesd.so.%{version} libesd-oss.so.%{version}
+%if %{with alsa}
+%{__make} clean
+%configure \
+ --enable-ipv6 \
+ --with%{!?with_libwrap:out}-libwrap \
+ --enable-alsa
%{__make}
+cp -f .libs/libesd.so.%{version} libesd-alsa.so.%{version}
+%endif
%install
rm -rf $RPM_BUILD_ROOT
DESTDIR=$RPM_BUILD_ROOT \
m4datadir=%{_aclocaldir} \
pkgconfigdir=%{_pkgconfigdir}
+rm -f $RPM_BUILD_ROOT%{_libdir}/libesd.so.*.*
+install libesd-*.so.*.* $RPM_BUILD_ROOT%{_libdir}
%clean
rm -rf $RPM_BUILD_ROOT
%post -p /sbin/ldconfig
%postun -p /sbin/ldconfig
+%post oss
+ln -fs libesd-oss.so.%{version} %{_libdir}/libesd.so.%{version}
+/sbin/ldconfig
+
+%postun oss
+rm -f %{_libdir}/libesd.so.%{version}
+/sbin/ldconfig
+
+%post alsa
+ln -fs libesd-alsa.so.%{version} %{_libdir}/libesd.so.%{version}
+/sbin/ldconfig
+
+%postun alsa
+rm -f %{_libdir}/libesd.so.%{version}
+/sbin/ldconfig
+
+
%files
%defattr(644,root,root,755)
%doc README TIPS docs/html
%attr(755,root,root) %{_bindir}/esdplay
%attr(755,root,root) %{_bindir}/esdrec
%attr(755,root,root) %{_bindir}/esdsample
-%attr(755,root,root) %{_libdir}/lib*.so.*.*
+%attr(755,root,root) %{_libdir}/libesddsp.so.*.*
%{_mandir}/man1/esd.1*
%{_mandir}/man1/esd[a-z]*.1*
%files static
%defattr(644,root,root,755)
%{_libdir}/lib*.a
+
+%files oss
+%defattr(644,root,root,755)
+%attr(755,root,root) %{_libdir}/libesd-oss.so.%{version}
+
+%if %{with alsa}
+%files alsa
+%defattr(644,root,root,755)
+%attr(755,root,root) %{_libdir}/libesd-alsa.so.%{version}
+%endif