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