]> git.pld-linux.org Git - packages/mpd.git/blame - mpd.spec
- release 4, rebuild against libcdio-2.1.0
[packages/mpd.git] / mpd.spec
CommitLineData
02876c51 1# TODO:
c7dcdf50 2# - add logrotate
424f04d1
KK
3#
4# Conditional build:
de087e61
JB
5%bcond_without mod # MOD support via libmikmod
6%bcond_without pulseaudio # PulseAudio support
ea3b33dc 7%bcond_without audiofile # Audiofile support (WAV and others)
9cf1eba3 8
c7dcdf50 9Summary: Music Player Daemon
6ae29a87 10Summary(pl.UTF-8): Music Player Daemon - demon odtwarzający muzykę
c7dcdf50 11Name: mpd
6687ede3 12Version: 0.21.7
b6f0d296 13Release: 4
dbce58e4 14License: GPL v2+
c7dcdf50 15Group: Applications/Multimedia
5ce9dcc9 16Source0: http://www.musicpd.org/download/mpd/0.21/%{name}-%{version}.tar.xz
6687ede3 17# Source0-md5: 36949edba246faa723fbc8caed0bfa32
31afabcf 18Source1: %{name}.conf
fb6389fb 19Source2: %{name}.init
9cf1eba3 20Source3: %{name}.sysconfig
be963cbe 21Source4: %{name}.tmpfiles
c7dcdf50 22URL: http://www.musicpd.org/
4351e719 23BuildRequires: OpenAL-devel
f756cffc 24BuildRequires: adplug-devel
3523369e 25BuildRequires: alsa-lib-devel >= 0.9.0
a8aa6145 26%{?with_audiofile:BuildRequires: audiofile-devel >= 0.3}
a8aa6145 27BuildRequires: avahi-devel
5ce9dcc9 28BuildRequires: boost-devel >= 1.58
5125f9d8 29BuildRequires: bzip2-devel
a8aa6145
JP
30BuildRequires: curl-devel >= 7.18
31BuildRequires: dbus-devel
5125f9d8 32BuildRequires: doxygen
a8aa6145 33BuildRequires: expat-devel
158342a8 34BuildRequires: faad2-devel >= 2.6.1-5
5ce9dcc9 35BuildRequires: ffmpeg-devel >= 2.4.0
a8aa6145
JP
36BuildRequires: flac-devel >= 1.2.0
37BuildRequires: fluidsynth-devel >= 1.1
296a7717 38BuildRequires: game-music-emu-devel
5ce9dcc9 39BuildRequires: gcc >= 6:5
a8aa6145 40BuildRequires: glib2-devel >= 1:2.28.0
a8aa6145 41BuildRequires: jack-audio-connection-kit-devel >= 0.100
424f04d1 42BuildRequires: lame-libs-devel
c7dcdf50 43BuildRequires: libao-devel >= 0.8.3
5125f9d8 44BuildRequires: libcdio-devel
5ce9dcc9 45BuildRequires: libcdio-paranoia-devel >= 0.4
33e45e33 46BuildRequires: libcue-devel
5ce9dcc9 47BuildRequires: libicu-devel >= 50
c7dcdf50
AF
48BuildRequires: libid3tag-devel
49BuildRequires: libmad-devel
5ce9dcc9 50%{?with_mod:BuildRequires: libmikmod-devel >= 3.2}
a8aa6145 51BuildRequires: libmms-devel >= 0.4
5125f9d8 52BuildRequires: libmodplug-devel
5ce9dcc9 53BuildRequires: libmpdclient-devel >= 2.9
ad4050a4 54BuildRequires: libmpg123-devel
5ce9dcc9 55BuildRequires: libnfs-devel >= 1.11
c7dcdf50 56BuildRequires: libogg-devel
a8aa6145 57BuildRequires: libsamplerate-devel >= 0.1.3
38f95112 58BuildRequires: libshout-devel
fb2724cc 59BuildRequires: libsidplay2-devel >= 2.1.1-5
a8aa6145
JP
60BuildRequires: libsmbclient-devel >= 0.2
61BuildRequires: libsndfile-devel
62BuildRequires: libstdc++-devel >= 0.2
63BuildRequires: libupnp-devel
c7dcdf50 64BuildRequires: libvorbis-devel
387493e6 65BuildRequires: libwrap-devel
6687ede3 66BuildRequires: meson >= 0.49.0
735ff9d7 67BuildRequires: musepack-devel
5ce9dcc9 68BuildRequires: ninja
a8aa6145 69BuildRequires: opus-devel
3523369e 70BuildRequires: pkgconfig >= 1:0.9.0
a8aa6145 71%{?with_pulseaudio:BuildRequires: pulseaudio-devel >= 0.9.16}
5ce9dcc9 72BuildRequires: rpmbuild(macros) >= 1.727
a8aa6145
JP
73BuildRequires: shine-devel >= 3.1
74BuildRequires: soxr-devel
5ce9dcc9 75BuildRequires: sphinx-pdg
ad4050a4 76BuildRequires: sqlite3-devel >= 3.7.3
a8aa6145 77BuildRequires: systemd-devel
4351e719 78BuildRequires: twolame-devel
5125f9d8
AF
79BuildRequires: wavpack-devel
80BuildRequires: wildmidi-devel
81BuildRequires: xmlto
f756cffc 82BuildRequires: yajl-devel >= 2.0
c7dcdf50 83BuildRequires: zlib-devel
a8aa6145 84BuildRequires: zziplib-devel >= 0.13
6ba39ac6 85Requires(post,postun): gtk-update-icon-cache
195b8128 86Requires(post,preun,postun): systemd-units >= 38
ad4050a4
JP
87Requires: alsa-lib >= 0.9.0
88%{?with_audiofile:Requires: audiofile >= 0.3}
89Requires: curl-libs >= 7.18
90Requires: faad2-libs >= 2.6.1-5
5ce9dcc9 91Requires: ffmpeg-libs >= 2.4.0
ad4050a4
JP
92Requires: flac >= 1.2.0
93Requires: fluidsynth >= 1.1
94Requires: glib2 >= 1:2.28.0
6ba39ac6 95Requires: hicolor-icon-theme
ad4050a4
JP
96Requires: jack-audio-connection-kit-libs >= 0.100
97Requires: libao >= 0.8.3
5ce9dcc9
JP
98Requires: libcdio-paranoia >= 0.4
99Requires: libicu >= 50
100%{?with_mod:Requires: libmikmod >= 3.2}
ad4050a4 101Requires: libmms >= 0.4
5ce9dcc9
JP
102Requires: libmpdclient >= 2.9
103Requires: libnfs >= 1.11
ad4050a4
JP
104Requires: libsamplerate >= 0.1.3
105Requires: libsidplay2 >= 2.1.1-5
106Requires: libsmbclient >= 0.2
107%{?with_pulseaudio:Requires: pulseaudio-libs >= 0.9.16}
108Requires: shine >= 3.1
109Requires: sqlite3 >= 3.7.3
195b8128 110Requires: systemd-units >= 38
ad4050a4
JP
111Requires: yajl >= 2.0
112Requires: zziplib >= 0.13
31afabcf
ZU
113Provides: group(mpd)
114Provides: user(mpd)
c7dcdf50
AF
115BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
116
117%description
87d7b893
JB
118Music Player Daemon (MPD) allows remote access for playing music (MP3,
119Ogg Vorbis, FLAC, AAC, Mod, and wave files) and managing playlists.
120MPD is designed for integrating a computer into a stereo system that
121provides control for music playback over a local network. It is also
122makes a great desktop music player, especially if you are a console
123junkie, like frontend options, or restart X often.
124
31afabcf
ZU
125%description -l hu.UTF-8
126Music Player Daemon (MPD)-vel lehetővé válik távoli zenelejátszás
127(MP3, Ogg Vorbis, FLAC, AAC, Mod és wav fájlok) és lejátszási listák
128menedzselése. Az MPD a számítógépben egy zenelejátszó, amelyet
129irányíthatsz helyi hálózaton keresztül. Egyben egy zseniális desktop
130zenelejátszó is, különösen a konzol-mániásoknak, vagy azoknak, akik
131sűrűn indítják újra az X-et.
132
f7293765
JR
133%description -l pl.UTF-8
134Music Player Daemon (MPD) pozwala na zdalny dostęp do odtwarzania
135muzyki (plików MP3, Ogg Vorbis, FLAC, AAC, Mod i wave) oraz
136zarządzania playlistami. MPD jest zaprojektowany do integrowania
137komputera w system stereo umożliwiający sterowanie odtwarzaniem muzyki
138w sieci lokalnej. Służy także za dobry odtwarzacz muzyki dla
139komputerów biurkowych, zwłaszcza dla miłośników konsoli, różnych opcji
140frontendów albo często restartujących X.
c7dcdf50 141
5412b34a
ER
142%package doc
143Summary: Documentation for Music Player Daemon (MPD)
144Summary(fr.UTF-8): Documentation pour Music Player Daemon (MPD)
145Summary(it.UTF-8): Documentazione di Music Player Daemon (MPD)
146Summary(pl.UTF-8): Podręcznik dla Music Player Daemon (MPD)
147Group: Documentation
5ce9dcc9 148Obsoletes: mpd-apidocs < 0.21
5412b34a
ER
149
150%description doc
151Documentation for Music Player Daemon (MPD).
152
153%description doc -l fr.UTF-8
154Documentation pour Music Player Daemon (MPD).
155
156%description doc -l it.UTF-8
157Documentazione di Music Player Daemon (MPD).
158
159%description doc -l pl.UTF-8
160Dokumentacja do Music Player Daemon (MPD).
161
c7dcdf50 162%prep
99bf80d6 163%setup -q
c7dcdf50
AF
164
165%build
5ce9dcc9
JP
166%meson build \
167 -Dpulse=%{?with_pulseaudio:enabled}%{!?with_pulseaudio:disabled} \
168 -Dmikmod=%{?with_mod:enabled}%{!?with_mod:disabled} \
169 -Dadplug=enabled \
170 -Dalsa=enabled \
171 -Dao=enabled \
172 -Daudiofile=%{?with_audiofile:enabled}%{!?with_audiofile:disabled} \
173 -Dbzip2=enabled \
174 -Dcdio-paranoia=enabled \
175 -Dcurl=enabled \
176 -Ddatabase=true \
177 -Ddocumentation=true \
178 -Ddsd=true \
179 -Dexpat=enabled \
180 -Dffmpeg=enabled \
181 -Dfifo=true \
182 -Dflac=enabled \
183 -Dfluidsynth=enabled \
184 -Dgme=enabled \
185 -Dhttpd=true \
186 -Dicu=enabled \
187 -Did3=enabled \
188 -Dinotify=true \
189 -Dipv6=enabled \
190 -Diso9660=enabled \
191 -Djack=enabled \
192 -Dlame-encoder=enabled \
193 -Dlibmpdclient=enabled \
194 -Dlibwrap=enabled \
195 -Dlsr=enabled \
196 -Dmad=enabled \
197 -Dmikmod=enabled \
198 -Dmms=enabled \
199 -Dmodplug=enabled \
200 -Dmpcdec=disabled \
201 -Dnfs=enabled \
202 -Dopenal=enabled \
203 -Dopus=enabled \
204 -Doss=enabled \
205 -Dpipe=true \
206 -Drecorder=true \
207 -Dsidplay=enabled \
208 -Dshine-encoder=enabled \
209 -Dshout=enabled \
210 -Dsmbclient=enabled \
211 -Dsndfile=enabled \
212 -Dsoundcloud=enabled \
213 -Dsoxr=enabled \
214 -Dsqlite=enabled \
215 -Ddaemon=true \
216 -Dsystemd=enabled \
217 -Dtcp=true \
218 -Dtwolame-encoder=enabled \
219 -Dupnp=enabled \
220 -Dun=enabled \
221 -Dvorbis=enabled \
222 -Dvorbis-encoder=enabled \
223 -Dwave_encoder=true \
224 -Dwavpack=enabled \
225 -Dwildmidi=enabled \
226 -Dzlib=enabled \
227 -Dzzip=enabled \
228 -Dzeroconf=avahi \
229 -Dsystemd_system_unit_dir=%{systemdunitdir} \
230 -Dsystemd_user_unit_dir=%{systemduserunitdir}
231%meson_build -C build
c7dcdf50
AF
232
233%install
234rm -rf $RPM_BUILD_ROOT
9cf1eba3 235install -d $RPM_BUILD_ROOT{%{_sysconfdir},/etc/{rc.d/init.d,sysconfig}} \
be963cbe 236 $RPM_BUILD_ROOT{/var/lib/mpd/playlists,/var/log/mpd,/var/run/mpd} \
fb2724cc 237 $RPM_BUILD_ROOT%{systemdtmpfilesdir}
c7dcdf50 238
5ce9dcc9 239%meson_install -C build
fb44ab11 240
9cf1eba3
ER
241cp -p %{SOURCE1} $RPM_BUILD_ROOT%{_sysconfdir}
242install -p %{SOURCE2} $RPM_BUILD_ROOT/etc/rc.d/init.d/mpd
243cp -p %{SOURCE3} $RPM_BUILD_ROOT/etc/sysconfig/mpd
387493e6 244cp -p %{SOURCE4} $RPM_BUILD_ROOT%{systemdtmpfilesdir}/%{name}.conf
c7dcdf50 245
424f04d1 246touch $RPM_BUILD_ROOT/var/lib/mpd/mpd.db
4351e719
JP
247touch $RPM_BUILD_ROOT/var/lib/mpd/mpdstate
248touch $RPM_BUILD_ROOT/var/lib/mpd/sticker.sql
424f04d1 249touch $RPM_BUILD_ROOT/var/log/mpd/mpd.log
424f04d1 250
1ac45cec 251%{__rm} -r $RPM_BUILD_ROOT%{_docdir}/mpd
5125f9d8 252
c7dcdf50
AF
253%clean
254rm -rf $RPM_BUILD_ROOT
255
31afabcf
ZU
256%pre
257%groupadd -g 204 mpd
fb2724cc 258%useradd -u 204 -r -d /var/lib/mpd -s /bin/false -c "Music Player Daemon (MPD) user" -G audio -g mpd mpd
31afabcf 259
fb6389fb 260%post
4351e719 261for f in mpd.log; do
424f04d1
KK
262 if [ ! -f /var/log/%{name}/$f ]; then
263 touch /var/log/%{name}/$f
264 chown mpd:mpd /var/log/%{name}/$f
265 chmod 644 /var/log/%{name}/$f
266 fi
267done
fb6389fb 268/sbin/chkconfig --add mpd
a8aa6145 269%systemd_post %{name}.service %{name}.socket
6ba39ac6 270%update_icon_cache hicolor
fb6389fb
ZU
271
272%preun
273if [ "$1" = "0" ]; then
274 %service mpd stop
99bf80d6 275 /sbin/chkconfig --del mpd
fb6389fb 276fi
a8aa6145 277%systemd_preun %{name}.service %{name}.socket
fb6389fb 278
31afabcf
ZU
279%postun
280if [ "$1" = "0" ]; then
281 %userremove mpd
282 %groupremove mpd
283fi
a8b30e82 284%systemd_reload
6ba39ac6 285%update_icon_cache hicolor
a8b30e82
AF
286
287%triggerpostun -- %{name} < 0.16.6-1
288%systemd_trigger %{name}.service
31afabcf 289
c7dcdf50
AF
290%files
291%defattr(644,root,root,755)
27045b64 292%doc AUTHORS NEWS README.md doc/mpdconf.example
c7dcdf50 293%attr(755,root,root) %{_bindir}/*
fb44ab11
JB
294%config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/mpd.conf
295%attr(754,root,root) /etc/rc.d/init.d/mpd
9cf1eba3 296%config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/mpd
fb2724cc 297%{systemdtmpfilesdir}/%{name}.conf
a8b30e82 298%{systemdunitdir}/mpd.service
a8aa6145 299%{systemdunitdir}/mpd.socket
711cad09 300%{systemduserunitdir}/mpd.service
424f04d1
KK
301%dir %attr(770,root,mpd) /var/lib/%{name}
302%dir %attr(770,root,mpd) /var/lib/%{name}/playlists
303%dir %attr(751,root,root) /var/log/%{name}
304%dir %attr(770,root,mpd) /var/run/%{name}
305%attr(644,mpd,mpd) %ghost /var/lib/%{name}/mpd.db
4351e719
JP
306%attr(644,mpd,mpd) %ghost /var/lib/%{name}/mpdstate
307%attr(644,mpd,mpd) %ghost /var/lib/%{name}/sticker.sql
424f04d1 308%attr(644,mpd,mpd) %ghost /var/log/%{name}/mpd.log
6ba39ac6 309%{_iconsdir}/hicolor/scalable/apps/mpd.svg
c7dcdf50 310%{_mandir}/man1/mpd.1*
80d0dd8f 311%{_mandir}/man5/mpd.conf.5*
5412b34a
ER
312
313%files doc
314%defattr(644,root,root,755)
5ce9dcc9 315%doc build/doc/html
This page took 0.107067 seconds and 4 git commands to generate.