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