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