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