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