File esound.spec of Package esound

#
# spec file for package esound (Version 0.2.41)
#
# Copyright (c) 2009 SUSE LINUX Products GmbH, Nuernberg, Germany.
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.

# Please submit bugfixes or comments via http://bugs.opensuse.org/
#

# norootforbuild


Name:           esound
BuildRequires:  alsa-devel audiofile-devel pkg-config tcpd-devel
License:        LGPL v2.0 or later
Group:          System/Sound Daemons
AutoReqProv:    on
Summary:        A sound daemon for Enlightenment and GNOME
Version:        0.2.41
Release:        3
Url:            ftp://ftp.gnome.org/pub/gnome/sources/esound/
Source:         ftp://ftp.gnome.org/pub/gnome/sources/esound/0.2/%{name}-%{version}.tar.bz2
Source1:        esound.init
Source2:        sysconfig.esound
Patch0:         esd-as.patch
# PATCH-FIX-UPSTREAM esound-biarch.patch bgo545534 sbrabec@suse.cz -- fix bi-arch clash
Patch1:         esound-biarch.patch
# PATCH-FIX-UPSTREAM esound-esddsp-no-version-info.patch bgo545534 sbrabec@suse.cz -- move non-standard library to a separate directory
Patch5:         esound-esddsp-no-version-info.patch
BuildRoot:      %{_tmppath}/%{name}-%{version}-build
%define debug_package_requires libesd0 = %{version}

%description
A multiplexing and caching sound daemon. It can use ALSA or OSS for
sound output. Many projects, including Enlightenment and GNOME, use
esound to play and record their sounds.



Authors:
--------
    Carsten Haitzler <raster@redhat.com>
    Drazen Kacar  <dave@srce.hr>
    Elliot Lee  <sopwith@redhat.com>
    John Ellis  <johne@bellatlantic.net>
    Kjartan Maraas  <kmaraas@online.no>
    Raja R Harinath  <harinath@cs.umn.edu>
    Richard Boulton <rjb37@cam.ac.uk>
    Russell Steinthal  <rms39@columbia.edu>
    Scott Heavner  <sdh@po.cwru.edu>
    Timur Bakeyev <mc@bat.ru>
    Yo Ric Dude  <ericmit@ix.netcom.com>

%package -n libesd0
License:        LGPL v2.0 or later
Summary:        A sound daemon for Enlightenment and GNOME
Group:          System/Libraries
Recommends:     %{name}-daemon >= %{version}
# bug437293
%ifarch ppc64
Obsoletes:      esound-64bit
%endif
#

%description -n libesd0
A multiplexing and caching sound daemon. It can use ALSA or OSS for
sound output. Many projects, including Enlightenment and GNOME, use
esound to play and record their sounds.



Authors:
--------
    Carsten Haitzler <raster@redhat.com>
    Drazen Kacar  <dave@srce.hr>
    Elliot Lee  <sopwith@redhat.com>
    John Ellis  <johne@bellatlantic.net>
    Kjartan Maraas  <kmaraas@online.no>
    Raja R Harinath  <harinath@cs.umn.edu>
    Richard Boulton <rjb37@cam.ac.uk>
    Russell Steinthal  <rms39@columbia.edu>
    Scott Heavner  <sdh@po.cwru.edu>
    Timur Bakeyev <mc@bat.ru>
    Yo Ric Dude  <ericmit@ix.netcom.com>

%package daemon
License:        LGPL v2.0 or later
Summary:        A sound daemon for Enlightenment and GNOME
Group:          System/Sound Daemons
PreReq:         %insserv_prereq %fillup_prereq
Obsoletes:      esound < %{version}
# For update from <= 11.0 and SLE <= 10
Provides:       esound:%{_bindir}/esd
# we put the conflict in here as they both provide the same
# and the solver may pick both. p-e-c can not conflict with
# esound-daemon as it also provides it
Conflicts:      pulseaudio-esound-compat

%description daemon
A multiplexing and caching sound daemon. It can use ALSA or OSS for
sound output. Many projects, including Enlightenment and GNOME, use
esound to play and record their sounds.



Authors:
--------
    Carsten Haitzler <raster@redhat.com>
    Drazen Kacar  <dave@srce.hr>
    Elliot Lee  <sopwith@redhat.com>
    John Ellis  <johne@bellatlantic.net>
    Kjartan Maraas  <kmaraas@online.no>
    Raja R Harinath  <harinath@cs.umn.edu>
    Richard Boulton <rjb37@cam.ac.uk>
    Russell Steinthal  <rms39@columbia.edu>
    Scott Heavner  <sdh@po.cwru.edu>
    Timur Bakeyev <mc@bat.ru>
    Yo Ric Dude  <ericmit@ix.netcom.com>

%package utils
License:        LGPL v2.0 or later
Summary:        A sound daemon for Enlightenment and GNOME
Group:          Productivity/Multimedia/Sound/Utilities
# For update from <= 11.0 and SLE <= 10
Provides:       esound:%{_bindir}/esddsp

%description utils
A multiplexing and caching sound daemon. It can use ALSA or OSS for
sound output. Many projects, including Enlightenment and GNOME, use
esound to play and record their sounds.



Authors:
--------
    Carsten Haitzler <raster@redhat.com>
    Drazen Kacar  <dave@srce.hr>
    Elliot Lee  <sopwith@redhat.com>
    John Ellis  <johne@bellatlantic.net>
    Kjartan Maraas  <kmaraas@online.no>
    Raja R Harinath  <harinath@cs.umn.edu>
    Richard Boulton <rjb37@cam.ac.uk>
    Russell Steinthal  <rms39@columbia.edu>
    Scott Heavner  <sdh@po.cwru.edu>
    Timur Bakeyev <mc@bat.ru>
    Yo Ric Dude  <ericmit@ix.netcom.com>

%package -n libesd-devel
License:        LGPL v2.0 or later
Summary:        EsounD development package
Group:          Development/Libraries/C and C++
# replaces esound-devel, which existed for <= 11.0 and <= SLED10
Provides:       esound-devel = %{version}
Obsoletes:      esound-devel < %{version}
Requires:       libesd0 = %{version} alsa-devel %(rpm -q --queryformat '%{NAME}' -f %{_libdir}/pkgconfig/audiofile.pc)

%description -n libesd-devel
EsounD development package.



Authors:
--------
    Carsten Haitzler <raster@redhat.com>
    Drazen Kacar  <dave@srce.hr>
    Elliot Lee  <sopwith@redhat.com>
    John Ellis  <johne@bellatlantic.net>
    Kjartan Maraas  <kmaraas@online.no>
    Raja R Harinath  <harinath@cs.umn.edu>
    Richard Boulton <rjb37@cam.ac.uk>
    Russell Steinthal  <rms39@columbia.edu>
    Scott Heavner  <sdh@po.cwru.edu>
    Timur Bakeyev <mc@bat.ru>
    Yo Ric Dude  <ericmit@ix.netcom.com>

%prep
%setup -q
%patch0
%patch1
%patch5 -p1

%build
autoreconf -f -i
%configure\
	--disable-static\
	--with-libwrap\
	--enable-ipv6
make %{?jobs:-j%jobs}

%install
make install DESTDIR=$RPM_BUILD_ROOT
mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}/init.d
cp %{SOURCE1} $RPM_BUILD_ROOT%{_sysconfdir}/init.d/esound
chmod +x $RPM_BUILD_ROOT%{_sysconfdir}/init.d/esound
mkdir -p $RPM_BUILD_ROOT%{_sbindir}
ln -s ../..%{_sysconfdir}/init.d/esound $RPM_BUILD_ROOT%{_sbindir}/rcesound
mkdir -p $RPM_BUILD_ROOT%{_localstatedir}/adm/fillup-templates
cp %{SOURCE2} $RPM_BUILD_ROOT%{_localstatedir}/adm/fillup-templates/
rm $RPM_BUILD_ROOT%{_libdir}/%{name}/*.*a

%post -n libesd0 -p /sbin/ldconfig

%postun -n libesd0 -p /sbin/ldconfig

%post daemon
%{fillup_and_insserv}

%postun daemon
%{insserv_cleanup}

%preun daemon
%{stop_on_removal}

%clean
rm -rf $RPM_BUILD_ROOT

%files -n libesd0
%defattr(-, root, root)
%{_libdir}/*.so.*

%files daemon
%defattr(-, root, root)
%doc README AUTHORS COPYING.LIB NEWS TODO TIPS MAINTAINERS
%{_bindir}/esd
%{_localstatedir}/adm/fillup-templates/*
%doc %{_mandir}/man1/esd.*
%{_sbindir}/*
%config %{_sysconfdir}/esd.conf
%{_sysconfdir}/init.d/*

%files utils
%defattr(-, root, root)
%{_bindir}/esd[a-z]*
%doc %{_mandir}/man1/esd[a-z]*.*
%{_libdir}/%{name}

%files -n libesd-devel
%defattr(-, root, root)
%{_bindir}/esd-config
%{_datadir}/aclocal/*
%{_includedir}/*
%{_libdir}/*.so
%{_libdir}/*.*a
%{_libdir}/pkgconfig/esound.pc
%doc %{_mandir}/man1/esd-config.*

%changelog
openSUSE Build Service is sponsored by