2 # - add dir to store playlists and songs DB
6 %bcond_with mod # enable MOD support
7 %bcond_without pulse # disable PulseAudio support
9 Summary: Music Player Daemon
10 Summary(hu.UTF-8): Music Player Daemon
11 Summary(pl.UTF-8): Music Player Daemon - demon odtwarzający muzykę
16 Group: Applications/Multimedia
17 Source0: http://dl.sourceforge.net/musicpd/%{name}-%{version}.tar.bz2
18 # Source0-md5: 66817a4b4c05454e6488f6b821f2a6a3
21 URL: http://www.musicpd.org/
22 BuildRequires: alsa-lib-devel >= 0.9.0
23 BuildRequires: audiofile-devel >= 0.1.7
24 BuildRequires: avahi-devel
25 BuildRequires: curl-devel
26 # imho doesn't need ">= 2.6.1" to faad2-devel
27 BuildRequires: faad2-devel
28 BuildRequires: ffmpeg-devel
29 BuildRequires: flac-devel >= 1.1.0
30 BuildRequires: glib2-devel
31 BuildRequires: jack-audio-connection-kit-devel >= 0.4
32 BuildRequires: lame-libs-devel
33 BuildRequires: libao-devel >= 0.8.3
34 BuildRequires: libid3tag-devel
35 BuildRequires: libmad-devel
36 %{?with_mod:BuildRequires: libmikmod-devel >= 3.1.7}
37 BuildRequires: libmpcdec-devel
38 BuildRequires: libogg-devel
39 BuildRequires: libsamplerate-devel >= 0.0.15
40 BuildRequires: libshout-devel
41 BuildRequires: libvorbis-devel
42 BuildRequires: pkgconfig >= 1:0.9.0
43 %{?with_pulse:BuildRequires: pulseaudio-devel}
44 BuildRequires: zlib-devel
47 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
50 Music Player Daemon (MPD) allows remote access for playing music (MP3,
51 Ogg Vorbis, FLAC, AAC, Mod, and wave files) and managing playlists.
52 MPD is designed for integrating a computer into a stereo system that
53 provides control for music playback over a local network. It is also
54 makes a great desktop music player, especially if you are a console
55 junkie, like frontend options, or restart X often.
57 %description -l hu.UTF-8
58 Music Player Daemon (MPD)-vel lehetővé válik távoli zenelejátszás
59 (MP3, Ogg Vorbis, FLAC, AAC, Mod és wav fájlok) és lejátszási listák
60 menedzselése. Az MPD a számítógépben egy zenelejátszó, amelyet
61 irányíthatsz helyi hálózaton keresztül. Egyben egy zseniális desktop
62 zenelejátszó is, különösen a konzol-mániásoknak, vagy azoknak, akik
63 sűrűn indítják újra az X-et.
65 %description -l pl.UTF-8
66 Music Player Daemon (MPD) pozwala na zdalny dostęp do odtwarzania
67 muzyki (plików MP3, Ogg Vorbis, FLAC, AAC, Mod i wave) oraz
68 zarządzania playlistami. MPD jest zaprojektowany do integrowania
69 komputera w system stereo umożliwiający sterowanie odtwarzaniem muzyki
70 w sieci lokalnej. Służy także za dobry odtwarzacz muzyki dla
71 komputerów biurkowych, zwłaszcza dla miłośników konsoli, różnych opcji
72 frontendów albo często restartujących X.
78 # ac_cv_* hacks to avoid unwanted linking
80 ac_cv_lib_iconv_main=no \
81 ac_cv_lib_nsl_gethostbyname=no \
82 %{!?with_pulse:--disable-pulse} \
83 %{?with_mod:--enable-mod} \
88 rm -rf $RPM_BUILD_ROOT
89 install -d $RPM_BUILD_ROOT{%{_sysconfdir},/etc/rc.d/init.d} \
90 $RPM_BUILD_ROOT{/var/lib/mpd/playlists,/var/log/mpd,/var/run/mpd}
93 DESTDIR=$RPM_BUILD_ROOT
95 install %{SOURCE1} $RPM_BUILD_ROOT%{_sysconfdir}
96 install %{SOURCE2} $RPM_BUILD_ROOT/etc/rc.d/init.d/mpd
98 touch $RPM_BUILD_ROOT/var/lib/mpd/mpd.db
99 touch $RPM_BUILD_ROOT/var/log/mpd/mpd.error
100 touch $RPM_BUILD_ROOT/var/log/mpd/mpd.log
101 touch $RPM_BUILD_ROOT/var/run/mpd/mpdstate
104 rm -rf $RPM_BUILD_ROOT
108 %useradd -u 204 -r -d /home/services/mpd -s /bin/false -c "Music Player Daemon (MPD) user" -g audio -G mpd mpd
111 for f in mpd.log mpd.error; do
112 if [ ! -f /var/log/%{name}/$f ]; then
113 touch /var/log/%{name}/$f
114 chown mpd:mpd /var/log/%{name}/$f
115 chmod 644 /var/log/%{name}/$f
118 /sbin/chkconfig --add mpd
121 if [ "$1" = "0" ]; then
123 /sbin/chkconfig --del mpd
127 if [ "$1" = "0" ]; then
133 %defattr(644,root,root,755)
134 %doc AUTHORS NEWS README TODO doc/mpdconf.example UPGRADING doc/protocol.xml
135 %attr(755,root,root) %{_bindir}/*
136 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/mpd.conf
137 %attr(754,root,root) /etc/rc.d/init.d/mpd
138 %dir %attr(770,root,mpd) /var/lib/%{name}
139 %dir %attr(770,root,mpd) /var/lib/%{name}/playlists
140 %dir %attr(751,root,root) /var/log/%{name}
141 %dir %attr(770,root,mpd) /var/run/%{name}
142 %attr(644,mpd,mpd) %ghost /var/lib/%{name}/mpd.db
143 %attr(644,mpd,mpd) %ghost /var/log/%{name}/mpd.error
144 %attr(644,mpd,mpd) %ghost /var/log/%{name}/mpd.log
145 %attr(644,mpd,mpd) %ghost /var/run/%{name}/mpdstate
146 %{_mandir}/man1/mpd.1*
147 %{_mandir}/man5/mpd.conf.5*