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