3 # - the author seazed to maintain this project, yet this is the only scrobbler for mpd I've found; look for s/b maintaining it
5 Summary: Scrobbler for mpd
6 Summary(pl.UTF-8): Scrobbler dla mpd
12 Source0: http://downloads.sourceforge.net/musicpd/%{name}-%{version}.tar.gz
13 # Source0-md5: 79792ed39b882857db0ec91e0f46628d
15 Source2: %{name}.sysconfig
16 Patch0: %{name}-path.patch
17 URL: http://mpd.wikia.com/wiki/Client:Mpdscribble
18 BuildRequires: autoconf >= 2.59
19 BuildRequires: automake
20 BuildRequires: glib2-devel >= 2.0
21 BuildRequires: libmpdclient-devel >= 2.0
22 BuildRequires: libsoup-devel >= 2.2
23 BuildRequires: pkgconfig
24 Requires(post,preun): /sbin/chkconfig
25 Requires: rc-scripts >= 0.4.0.10
26 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
29 Mpdscribble is a music player daemon client which submits information
30 about tracks being played to audioscrobbler.
32 %description -l pl.UTF-8
33 Mpdscrible to klient demona odtwarzania muzyki, który wysyła
34 informacje o odtwarzanych utworach do audioscrobblera.
46 --with-http-client=soup
50 rm -rf $RPM_BUILD_ROOT
52 $RPM_BUILD_ROOT%{_sysconfdir}/mpdscribble \
53 $RPM_BUILD_ROOT/etc/sysconfig \
54 $RPM_BUILD_ROOT/etc/rc.d/init.d \
55 $RPM_BUILD_ROOT/var/{log,cache/%{name}}
58 DESTDIR=$RPM_BUILD_ROOT
60 install %{SOURCE1} $RPM_BUILD_ROOT/etc/rc.d/init.d/mpdscribble
61 install %{SOURCE2} $RPM_BUILD_ROOT/etc/sysconfig/mpdscribble
63 install -d $RPM_BUILD_ROOT/var/log/mpdscribble
64 touch $RPM_BUILD_ROOT/var/log/mpdscribble/%{name}.log
65 touch $RPM_BUILD_ROOT/var/cache/%{name}/%{name}.cache
68 rm -rf $RPM_BUILD_ROOT
71 /sbin/chkconfig --add %{name}
72 %service %{name} restart
75 if [ "$1" = "0" ]; then
77 /sbin/chkconfig --del %{name}
81 %defattr(644,root,root,755)
82 %doc AUTHORS NEWS README
83 %attr(755,root,root) %{_bindir}/%{name}
84 %dir %{_sysconfdir}/mpdscribble
85 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/mpdscribble/mpdscribble.conf
86 %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/%{name}
87 %attr(754,root,root) /etc/rc.d/init.d/%{name}
88 %{_mandir}/man1/mpdscribble.1*
89 %dir /var/log/mpdscribble
90 %attr(640,root,root) %ghost /var/log/mpdscribble/%{name}.log
91 %dir %attr(750,root,root) /var/cache/%{name}
92 /var/cache/%{name}/%{name}.cache