]>
Commit | Line | Data |
---|---|---|
02876c51 | 1 | # TODO: |
c7dcdf50 | 2 | # - add logrotate |
424f04d1 KK |
3 | # |
4 | # Conditional build: | |
5125f9d8 | 5 | %bcond_without mod # enable MOD support |
d63dca03 | 6 | %bcond_without pulseaudio # disable PulseAudio support |
ea3b33dc | 7 | %bcond_without audiofile # Audiofile support (WAV and others) |
9cf1eba3 | 8 | |
c7dcdf50 | 9 | Summary: Music Player Daemon |
31afabcf | 10 | Summary(hu.UTF-8): Music Player Daemon |
6ae29a87 | 11 | Summary(pl.UTF-8): Music Player Daemon - demon odtwarzający muzykę |
c7dcdf50 | 12 | Name: mpd |
ea3b33dc | 13 | Version: 0.16.5 |
1e8c5a68 | 14 | Release: 3 |
dbce58e4 | 15 | License: GPL v2+ |
c7dcdf50 | 16 | Group: Applications/Multimedia |
25bb7e51 | 17 | Source0: http://downloads.sourceforge.net/musicpd/%{name}-%{version}.tar.bz2 |
ea3b33dc | 18 | # Source0-md5: f7564cff12035f6a1112cce770655df7 |
31afabcf | 19 | Source1: %{name}.conf |
fb6389fb | 20 | Source2: %{name}.init |
9cf1eba3 | 21 | Source3: %{name}.sysconfig |
c7dcdf50 | 22 | URL: http://www.musicpd.org/ |
4351e719 | 23 | BuildRequires: OpenAL-devel |
3523369e | 24 | BuildRequires: alsa-lib-devel >= 0.9.0 |
356a7f8f | 25 | %{?with_audiofile:BuildRequires: audiofile-devel >= 0.1.7} |
5125f9d8 AF |
26 | BuildRequires: avahi-glib-devel |
27 | BuildRequires: bzip2-devel | |
424f04d1 | 28 | BuildRequires: curl-devel |
5125f9d8 | 29 | BuildRequires: doxygen |
158342a8 | 30 | BuildRequires: faad2-devel >= 2.6.1-5 |
424f04d1 | 31 | BuildRequires: ffmpeg-devel |
c7dcdf50 | 32 | BuildRequires: flac-devel >= 1.1.0 |
5125f9d8 | 33 | BuildRequires: fluidsynth-devel |
296a7717 | 34 | BuildRequires: game-music-emu-devel |
4351e719 | 35 | BuildRequires: glib2-devel >= 2.12 |
3523369e | 36 | BuildRequires: jack-audio-connection-kit-devel >= 0.4 |
424f04d1 | 37 | BuildRequires: lame-libs-devel |
c7dcdf50 | 38 | BuildRequires: libao-devel >= 0.8.3 |
5125f9d8 | 39 | BuildRequires: libcdio-devel |
33e45e33 | 40 | BuildRequires: libcue-devel |
c7dcdf50 AF |
41 | BuildRequires: libid3tag-devel |
42 | BuildRequires: libmad-devel | |
424f04d1 | 43 | %{?with_mod:BuildRequires: libmikmod-devel >= 3.1.7} |
415aa00e | 44 | BuildRequires: libmms-devel |
5125f9d8 | 45 | BuildRequires: libmodplug-devel |
8f2c0c52 | 46 | BuildRequires: libmpcdec-devel |
c7dcdf50 | 47 | BuildRequires: libogg-devel |
3523369e | 48 | BuildRequires: libsamplerate-devel >= 0.0.15 |
38f95112 | 49 | BuildRequires: libshout-devel |
c7dcdf50 | 50 | BuildRequires: libvorbis-devel |
3523369e | 51 | BuildRequires: pkgconfig >= 1:0.9.0 |
d63dca03 | 52 | %{?with_pulseaudio:BuildRequires: pulseaudio-devel} |
5125f9d8 | 53 | BuildRequires: sqlite3-devel |
4351e719 | 54 | BuildRequires: twolame-devel |
5125f9d8 AF |
55 | BuildRequires: wavpack-devel |
56 | BuildRequires: wildmidi-devel | |
57 | BuildRequires: xmlto | |
c7dcdf50 | 58 | BuildRequires: zlib-devel |
5125f9d8 | 59 | BuildRequires: zziplib-devel |
31afabcf ZU |
60 | Provides: group(mpd) |
61 | Provides: user(mpd) | |
c7dcdf50 AF |
62 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) |
63 | ||
64 | %description | |
87d7b893 JB |
65 | Music Player Daemon (MPD) allows remote access for playing music (MP3, |
66 | Ogg Vorbis, FLAC, AAC, Mod, and wave files) and managing playlists. | |
67 | MPD is designed for integrating a computer into a stereo system that | |
68 | provides control for music playback over a local network. It is also | |
69 | makes a great desktop music player, especially if you are a console | |
70 | junkie, like frontend options, or restart X often. | |
71 | ||
31afabcf ZU |
72 | %description -l hu.UTF-8 |
73 | Music Player Daemon (MPD)-vel lehetővé válik távoli zenelejátszás | |
74 | (MP3, Ogg Vorbis, FLAC, AAC, Mod és wav fájlok) és lejátszási listák | |
75 | menedzselése. Az MPD a számítógépben egy zenelejátszó, amelyet | |
76 | irányíthatsz helyi hálózaton keresztül. Egyben egy zseniális desktop | |
77 | zenelejátszó is, különösen a konzol-mániásoknak, vagy azoknak, akik | |
78 | sűrűn indítják újra az X-et. | |
79 | ||
f7293765 JR |
80 | %description -l pl.UTF-8 |
81 | Music Player Daemon (MPD) pozwala na zdalny dostęp do odtwarzania | |
82 | muzyki (plików MP3, Ogg Vorbis, FLAC, AAC, Mod i wave) oraz | |
83 | zarządzania playlistami. MPD jest zaprojektowany do integrowania | |
84 | komputera w system stereo umożliwiający sterowanie odtwarzaniem muzyki | |
85 | w sieci lokalnej. Służy także za dobry odtwarzacz muzyki dla | |
86 | komputerów biurkowych, zwłaszcza dla miłośników konsoli, różnych opcji | |
87 | frontendów albo często restartujących X. | |
c7dcdf50 | 88 | |
5412b34a ER |
89 | %package apidocs |
90 | Summary: MPD API documentation | |
91 | Summary(pl.UTF-8): Dokumentacja API biblioteki API | |
92 | Group: Documentation | |
93 | ||
94 | %description apidocs | |
95 | API and internal documentation for MPD library. | |
96 | ||
97 | %description apidocs -l pl.UTF-8 | |
98 | Dokumentacja API biblioteki MPD. | |
99 | ||
100 | %package doc | |
101 | Summary: Documentation for Music Player Daemon (MPD) | |
102 | Summary(fr.UTF-8): Documentation pour Music Player Daemon (MPD) | |
103 | Summary(it.UTF-8): Documentazione di Music Player Daemon (MPD) | |
104 | Summary(pl.UTF-8): Podręcznik dla Music Player Daemon (MPD) | |
105 | Group: Documentation | |
106 | ||
107 | %description doc | |
108 | Documentation for Music Player Daemon (MPD). | |
109 | ||
110 | %description doc -l fr.UTF-8 | |
111 | Documentation pour Music Player Daemon (MPD). | |
112 | ||
113 | %description doc -l it.UTF-8 | |
114 | Documentazione di Music Player Daemon (MPD). | |
115 | ||
116 | %description doc -l pl.UTF-8 | |
117 | Dokumentacja do Music Player Daemon (MPD). | |
118 | ||
c7dcdf50 | 119 | %prep |
99bf80d6 | 120 | %setup -q |
c7dcdf50 AF |
121 | |
122 | %build | |
3523369e | 123 | # ac_cv_* hacks to avoid unwanted linking |
296a7717 | 124 | GME_CFLAGS="-I/usr/include/gme" GME_LIBS="-lgme" \ |
d9401207 | 125 | %configure \ |
3523369e JB |
126 | ac_cv_lib_iconv_main=no \ |
127 | ac_cv_lib_nsl_gethostbyname=no \ | |
d63dca03 | 128 | %{!?with_pulseaudio:--disable-pulse} \ |
5125f9d8 AF |
129 | %{?with_mod:--enable-mikmod} \ |
130 | --disable-sidplay \ | |
131 | --enable-alsa \ | |
132 | --enable-ao \ | |
356a7f8f | 133 | %{?with_audiofile:--enable-audiofile} \ |
5125f9d8 | 134 | --enable-bzip2 \ |
33e45e33 | 135 | --enable-cue \ |
5125f9d8 AF |
136 | --enable-curl \ |
137 | --enable-documentation \ | |
138 | --enable-ffmpeg \ | |
139 | --enable-fluidsynth \ | |
296a7717 | 140 | --enable-gme \ |
5125f9d8 AF |
141 | --enable-httpd-output \ |
142 | --enable-iso9660 \ | |
143 | --enable-jack \ | |
144 | --enable-lame-encoder \ | |
145 | --enable-lastfm \ | |
146 | --enable-lsr \ | |
147 | --enable-mad \ | |
148 | --enable-mms \ | |
149 | --enable-modplug \ | |
150 | --enable-mvp \ | |
4351e719 JP |
151 | --enable-openal \ |
152 | --enable-pipe-output \ | |
153 | --enable-recorder-output \ | |
5125f9d8 AF |
154 | --enable-shout \ |
155 | --enable-sqlite \ | |
4351e719 | 156 | --enable-twolame-encoder \ |
5125f9d8 | 157 | --enable-vorbis-encoder \ |
4351e719 | 158 | --enable-wave-encoder \ |
5125f9d8 AF |
159 | --enable-wavpack \ |
160 | --enable-wildmidi \ | |
4351e719 | 161 | --enable-zzip \ |
5125f9d8 | 162 | --with-zeroconf=avahi \ |
194c7061 | 163 | --without-tremor |
c7dcdf50 AF |
164 | %{__make} |
165 | ||
166 | %install | |
167 | rm -rf $RPM_BUILD_ROOT | |
9cf1eba3 | 168 | install -d $RPM_BUILD_ROOT{%{_sysconfdir},/etc/{rc.d/init.d,sysconfig}} \ |
424f04d1 | 169 | $RPM_BUILD_ROOT{/var/lib/mpd/playlists,/var/log/mpd,/var/run/mpd} |
c7dcdf50 AF |
170 | |
171 | %{__make} install \ | |
172 | DESTDIR=$RPM_BUILD_ROOT | |
fb44ab11 | 173 | |
9cf1eba3 ER |
174 | cp -p %{SOURCE1} $RPM_BUILD_ROOT%{_sysconfdir} |
175 | install -p %{SOURCE2} $RPM_BUILD_ROOT/etc/rc.d/init.d/mpd | |
176 | cp -p %{SOURCE3} $RPM_BUILD_ROOT/etc/sysconfig/mpd | |
c7dcdf50 | 177 | |
424f04d1 | 178 | touch $RPM_BUILD_ROOT/var/lib/mpd/mpd.db |
4351e719 JP |
179 | touch $RPM_BUILD_ROOT/var/lib/mpd/mpdstate |
180 | touch $RPM_BUILD_ROOT/var/lib/mpd/sticker.sql | |
424f04d1 | 181 | touch $RPM_BUILD_ROOT/var/log/mpd/mpd.log |
424f04d1 | 182 | |
1ac45cec | 183 | %{__rm} -r $RPM_BUILD_ROOT%{_docdir}/mpd |
5125f9d8 | 184 | |
c7dcdf50 AF |
185 | %clean |
186 | rm -rf $RPM_BUILD_ROOT | |
187 | ||
31afabcf ZU |
188 | %pre |
189 | %groupadd -g 204 mpd | |
88b08939 | 190 | %useradd -u 204 -r -d /home/services/mpd -s /bin/false -c "Music Player Daemon (MPD) user" -G audio -g mpd mpd |
31afabcf | 191 | |
fb6389fb | 192 | %post |
4351e719 | 193 | for f in mpd.log; do |
424f04d1 KK |
194 | if [ ! -f /var/log/%{name}/$f ]; then |
195 | touch /var/log/%{name}/$f | |
196 | chown mpd:mpd /var/log/%{name}/$f | |
197 | chmod 644 /var/log/%{name}/$f | |
198 | fi | |
199 | done | |
fb6389fb ZU |
200 | /sbin/chkconfig --add mpd |
201 | ||
202 | %preun | |
203 | if [ "$1" = "0" ]; then | |
204 | %service mpd stop | |
99bf80d6 | 205 | /sbin/chkconfig --del mpd |
fb6389fb ZU |
206 | fi |
207 | ||
31afabcf ZU |
208 | %postun |
209 | if [ "$1" = "0" ]; then | |
210 | %userremove mpd | |
211 | %groupremove mpd | |
212 | fi | |
213 | ||
c7dcdf50 AF |
214 | %files |
215 | %defattr(644,root,root,755) | |
5412b34a | 216 | %doc AUTHORS NEWS README doc/mpdconf.example UPGRADING |
c7dcdf50 | 217 | %attr(755,root,root) %{_bindir}/* |
fb44ab11 JB |
218 | %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/mpd.conf |
219 | %attr(754,root,root) /etc/rc.d/init.d/mpd | |
9cf1eba3 | 220 | %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/mpd |
424f04d1 KK |
221 | %dir %attr(770,root,mpd) /var/lib/%{name} |
222 | %dir %attr(770,root,mpd) /var/lib/%{name}/playlists | |
223 | %dir %attr(751,root,root) /var/log/%{name} | |
224 | %dir %attr(770,root,mpd) /var/run/%{name} | |
225 | %attr(644,mpd,mpd) %ghost /var/lib/%{name}/mpd.db | |
4351e719 JP |
226 | %attr(644,mpd,mpd) %ghost /var/lib/%{name}/mpdstate |
227 | %attr(644,mpd,mpd) %ghost /var/lib/%{name}/sticker.sql | |
424f04d1 | 228 | %attr(644,mpd,mpd) %ghost /var/log/%{name}/mpd.log |
c7dcdf50 | 229 | %{_mandir}/man1/mpd.1* |
80d0dd8f | 230 | %{_mandir}/man5/mpd.conf.5* |
5412b34a ER |
231 | |
232 | %files doc | |
233 | %defattr(644,root,root,755) | |
234 | %doc doc/user/* | |
235 | ||
236 | %files apidocs | |
237 | %defattr(644,root,root,755) | |
238 | %doc doc/api doc/developer doc/protocol |