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