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