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