Name: mpdscribble
Version: 0.18.1
Release: 1%{?dist}
Summary: A mpd client which submits information about tracks being played to Last.fm
Group: Applications/Multimedia
License: GPLv2+
URL: http://mpd.wikia.com/wiki/Client:Mpdscribble
Source0: http://downloads.sourceforge.net/musicpd/%{name}-%{version}.tar.bz2
Source1: %{name}.init.d
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
BuildRequires: glib2-devel libsoup-devel
Requires(post): chkconfig
Requires(preun): chkconfig
Requires(preun): initscripts
%description
mpdscribble is a music player daemon (mpd) client which submits information
about tracks being played to Last.fm (formerly audioscrobbler)
%prep
%setup -q
%build
%configure
make %{?_smp_mflags}
%install
rm -rf $RPM_BUILD_ROOT
make install DESTDIR=$RPM_BUILD_ROOT
#init scripts
install -D -m 0755 %{SOURCE1} $RPM_BUILD_ROOT/%{_sysconfdir}/rc.d/init.d/%{name}
%clean
rm -rf $RPM_BUILD_ROOT
%post
if [ $1 = 1 ]; then
chkconfig --add %{name}
fi
%preun
if [ $1 = 0 ]; then
service %{name} stop > /dev/null 2>&1
/sbin/chkconfig --del %{name}
fi
%files
%defattr(-,root,root,-)
%doc AUTHORS COPYING NEWS README
%config(noreplace) %{_sysconfdir}/mpdscribble.conf
%{_bindir}/mpdscribble
%{_mandir}/man1/mpdscribble.1.gz
%{_sysconfdir}/rc.d/init.d/%{name}
%exclude %{_datadir}/doc/*
%changelog
* Mon Oct 26 2009 Jaroslaw Gorny <jaroslaw dot gorny at gmail dot com> - 0.18.1-1
- Version bumped to 0.18.1
- init-script added
* Tue Feb 03 2009 Jaroslaw Gorny <jaroslaw dot gorny at gmail dot com> - 0.16-1
- Version bumped to 0.16
- There's a systemwide config file now
* Sun Dec 21 2008 Jaroslaw Gorny <jaroslaw dot gorny at gmail dot com> - 0.13-1
- Initial RPM