File esound.spec of Package esound
%if 0%{?mdkversion} || 0%{?mgaversion} || 0%{?pclinuxos}
%define libesd %{_lib}esd
%else
%define libesd libesd
%endif
Summary: The Enlightened Sound Daemon
Name: esound
Version: 0.2.41
Release: 1%{?dist}
%if 0%{?suse_version}
License: LGPL-2.0-or-later
%else
License: LGPLv2+
%endif
Group: System/Servers
URL: ftp://ftp.gnome.org/pub/GNOME/sources/esound/
Source0: ftp://ftp.gnome.org/pub/GNOME/sources/esound/esound-0.2.41.tar.bz2
# (fc) 0.2.28 default options : increase spawn process waiting time, release device after 2s of inactivity
Patch0: esound-0.2.37-defaultoptions.patch
# From Fedora 28
Patch4: esound-0.2.38-drain.patch
Patch6: esound-0.2.38-fix-open-macro.patch
Patch7: remove-confusing-spew.patch
# default to nospawn, so we can kill the esd.conf file
Patch8: esound-nospawn.patch
Patch9: esound-0.2.41-libm.patch
BuildRequires: autoconf automake libtool
BuildRequires: docbook-utils
%if 0%{?rhel} || 0%{?fedora}
BuildRequires: docbook-dtd412-xml
%endif
# AUDIOFILE support
BuildRequires: pkgconfig(audiofile)
# ALSA support
%if 0%{?suse_version}
BuildRequires: alsa-devel
%else
BuildRequires: alsa-lib-devel
%endif
%description
EsounD (the Enlightened Sound Daemon) is a server process that allows multiple
applications to share a single sound card. For example, when you're listening
to music from your CD and you receive a sound-related event from ICQ, your
applications won't have to jockey for the attention of your sound card.
Install esound if you'd like to let sound applications share your
audio device. You'll also need to install the audiofile package.
##########
%package daemon
Summary: EsounD daemon
Group: System Environment/Daemons
%description daemon
EsounD, the Enlightened Sound Daemon, is a server process that mixes
several audio streams for playback by a single audio device. For
example, if you're listening to music on a CD and you receive a
sound-related event from IM client, the two applications won't have to
queue for the use of your sound card.
The daemon functionality was replaced with PulseAudio (PA) and the binary
was dropped from Fedora in October 2007. However, on PA-disabled systems
the daemon functionality was completely missing and therefore
reintroduced to Fedora in June 2013 in form of subpackage.
The daemon cannot run on PA-enabled systems.
%files daemon
%defattr(-,root,root,-)
%{_bindir}/esd
%{_mandir}/man1/esd.1*
##########
%package tools
Summary: Commandline tools to talk to the EsounD daemon
Group: System Environment/Base
%description tools
The esound-tools package includes commandline utilities
for controlling the EsounD daemon.
%files tools
%defattr(-,root,root,-)
%{_bindir}/esdcat
%{_bindir}/esdctl
%{_bindir}/esddsp
%{_bindir}/esdfilt
%{_bindir}/esdloop
%{_bindir}/esdmon
%{_bindir}/esdplay
%{_bindir}/esdrec
%{_bindir}/esdsample
%{_mandir}/man1/esdcat.1*
%{_mandir}/man1/esdctl.1*
%{_mandir}/man1/esddsp.1*
%{_mandir}/man1/esdfilt.1*
%{_mandir}/man1/esdloop.1*
%{_mandir}/man1/esdmon.1*
%{_mandir}/man1/esdplay.1*
%{_mandir}/man1/esdrec.1*
%{_mandir}/man1/esdsample.1*
# temporarily disable doc build due to xml catalog issues
%exclude %doc %{_datadir}/doc/esound
##########
%package -n %{libesd}0
Summary: Libraries for EsounD
Group: System/Libraries
%description -n %{libesd}0
These are the libraries for EsounD.
%files -n %{libesd}0
%defattr(-,root,root,-)
%{_libdir}/libesd.so.*
%post -n %{libesd}0
/sbin/ldconfig || :
%postun -n %{libesd}0
/sbin/ldconfig || :
##########
%package -n %{libesd}dsp0
Summary: Libraries for EsounD
Group: System/Libraries
%description -n %{libesd}dsp0
These are the libraries for EsounD.
%files -n %{libesd}dsp0
%defattr(-,root,root,-)
%{_libdir}/libesddsp.so.*
%post -n %{libesd}dsp0
/sbin/ldconfig || :
%postun -n %{libesd}dsp0
/sbin/ldconfig || :
##########
%package -n libesd0-devel
Summary: Includes and more to develop EsounD applications
Group: Development/C
Requires: %{libesd}0 = %{version}-%{release}
Requires: %{libesd}dsp0 = %{version}-%{release}
Provides: esound-devel = %{version}-%{release}
Provides: libesd-devel = %{version}-%{release}
%description -n libesd0-devel
Libraries, include files and other resources you can use to develop EsounD
applications.
%files -n libesd0-devel
%defattr(-,root,root,-)
%{_bindir}/esd-config
%{_includedir}/*
%{_datadir}/aclocal/*
%{_libdir}/lib*.so
%{_libdir}/pkgconfig/*
%{_mandir}/man1/esd-config.1*
%post -n libesd0-devel
/sbin/ldconfig || :
%postun -n libesd0-devel
/sbin/ldconfig || :
##########
%if 0%{?pclinuxos} || 0%{?suse_version} && 0%{?opensuse_bs} == 0
%debug_package
%endif
##########
%prep
%setup -q
%patch0 -p1 -b .defaultoptions
%patch4 -p1 -b .drain-race
%patch6 -p1 -b .open-macro
%patch7 -p1 -b .spew
%patch8 -p1 -b .nospawn
%patch9 -p1 -b .jx
%__cp -f "/usr/share/libtool/"*"/ltmain.sh" "ltmain.sh" || %__cp -f "/usr/share/libtool/ltmain.sh" "ltmain.sh"
autoreconf -fiv
%build
%configure \
--disable-dependency-tracking \
--enable-shared \
--disable-static \
--enable-ipv6 \
--enable-local-sound \
--disable-oss \
--enable-alsa \
--disable-arts \
--with-libwrap
EGREP='grep -E' %__make %{?_smp_mflags} || %__make
%install
rm -rf %{buildroot} installed-docs
%__make install DESTDIR=%{?buildroot}
rm -f $RPM_BUILD_ROOT%{_sysconfdir}/esd.conf
rm -f $RPM_BUILD_ROOT%{_libdir}/*.la
%clean
rm -rf %{buildroot}
%changelog