File wsndsrv.spec of Package wsndsrv

#
# spec file for package wsndsrv
#
# Copyright (c) 2011 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:           wsndsrv
BuildRequires:  WindowMaker-devel audiofile-devel esound-devel gcc-c++ xorg-x11
License:        BSD 3-Clause
Group:          System/Sound Daemons
Url:            ftp://shadowmere.student.utwente.nl/pub/WindowMaker/
Requires:       wmaker
AutoReqProv:    on
Summary:        Soundserver for Window Maker
Version:        0.4.0
Release:        1204
Source:         ftp://shadowmere.student.utwente.nl/pub/WindowMaker/WSoundServer-%{version}.tar.bz2
Source1:        ftp://shadowmere.student.utwente.nl/pub/WindowMaker/libdockapp-0.4.0.tar.bz2
Source2:        ftp://shadowmere.student.utwente.nl/pub/WindowMaker/wmsdefault.tar.bz2
Patch:          WSoundServer-%{version}.dif
Patch1:         WSoundServer-%{version}-audiofile.dif     
Patch2:         WSoundServer-%{version}-ia64.patch 
Patch3:         WSoundServer-%{version}-noPropList.patch 
Patch4:         WSoundServer-%{version}-build.patch 
Patch5:         WSoundServer-%{version}-warning.patch 
BuildRoot:      %{_tmppath}/%{name}-%{version}-build

%description
A Soundserver for Window Maker.

%prep
%setup -q -n WSoundServer-%{version} -a 1 -a 2
%patch
%patch1
%patch2
%patch3 -p1
%patch4
%patch5
# ---------------------------------------------------------------------------

%build
rm -rf "$RPM_BUILD_ROOT"
pushd libdockapp-0.4.0
	autoreconf -i -f
	CFLAGS="$RPM_OPT_FLAGS" \
	./configure --prefix=/usr --libdir=/usr/%{_lib} --enable-shared=no
	make
popd
DOCKAPPDIR=`echo $PWD/libdockapp*/src`
autoreconf -i -f
CFLAGS="$RPM_OPT_FLAGS" LDFLAGS="-L/usr/%{_lib}" \
./configure --prefix=/usr --mandir=%{_mandir} \
  --with-incs-from="-I/usr/include -I$DOCKAPPDIR" \
  --with-libs-from="-L$DOCKAPPDIR" \
  --libdir=/usr/%{_lib} \
  --enable-shared=no \
  --enable-esd
make
# ---------------------------------------------------------------------------

%install
make DESTDIR=$RPM_BUILD_ROOT mandir=%{_mandir} install
mkdir -p $RPM_BUILD_ROOT/etc/X11/WindowMaker
install -m 644 WMSound $RPM_BUILD_ROOT/etc/X11/WindowMaker/WMSound
install -m 755 -d $RPM_BUILD_ROOT/usr/share/WindowMaker/Sounds
for i in Sounds/*; do
  cp -a $i $RPM_BUILD_ROOT/usr/share/WindowMaker/$i
done

%post
%run_ldconfig

%postun
%run_ldconfig

%clean
rm -rf "$RPM_BUILD_ROOT"

%files
%defattr(-,root,root)
%config(noreplace) /etc/X11/WindowMaker/WMSound
/usr/bin/get-wsound-flags
/usr/bin/getsoundset
/usr/bin/setsoundset
/usr/bin/wsoundplay
/usr/bin/wsoundserver
/usr/include/wsound.h
/usr/%{_lib}/libwsound.a
%attr(644,root,root) /usr/%{_lib}/libwsound.la
%doc %{_mandir}/man1/getsoundset.1x.gz
%doc %{_mandir}/man1/setsoundset.1x.gz
%doc %{_mandir}/man1/wsoundplay.1x.gz
%doc %{_mandir}/man1/wsoundserver.1x.gz
%doc %{_mandir}/man1/get-wsound-flags.1x.gz
/usr/share/WindowMaker/Sounds
%doc AUTHORS
%doc COPYING
%doc ChangeLog
%doc INSTALL
%doc NEWS
%doc README

%changelog
openSUSE Build Service is sponsored by