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