]> git.pld-linux.org Git - packages/mpd.git/blob - mpd.spec
- 0.15.1
[packages/mpd.git] / mpd.spec
1 # TODO:
2 # - add logrotate
3 #
4 # Conditional build:
5 %bcond_with     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.1
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:  eec9f5642d4a9c59a0df0a458def3505
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:  curl-devel
25 # imho doesn't need ">= 2.6.1" to faad2-devel
26 BuildRequires:  faad2-devel
27 BuildRequires:  ffmpeg-devel
28 BuildRequires:  flac-devel >= 1.1.0
29 BuildRequires:  glib2-devel
30 BuildRequires:  jack-audio-connection-kit-devel >= 0.4
31 BuildRequires:  lame-libs-devel
32 BuildRequires:  libao-devel >= 0.8.3
33 BuildRequires:  libid3tag-devel
34 BuildRequires:  libmad-devel
35 %{?with_mod:BuildRequires:      libmikmod-devel >= 3.1.7}
36 BuildRequires:  libmpcdec-devel
37 BuildRequires:  libogg-devel
38 BuildRequires:  libsamplerate-devel >= 0.0.15
39 BuildRequires:  libshout-devel
40 BuildRequires:  libvorbis-devel
41 BuildRequires:  pkgconfig >= 1:0.9.0
42 %{?with_pulse:BuildRequires:    pulseaudio-devel}
43 BuildRequires:  zlib-devel
44 Provides:       group(mpd)
45 Provides:       user(mpd)
46 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
47
48 %description
49 Music Player Daemon (MPD) allows remote access for playing music (MP3,
50 Ogg Vorbis, FLAC, AAC, Mod, and wave files) and managing playlists.
51 MPD is designed for integrating a computer into a stereo system that
52 provides control for music playback over a local network. It is also
53 makes a great desktop music player, especially if you are a console
54 junkie, like frontend options, or restart X often.
55
56 %description -l hu.UTF-8
57 Music Player Daemon (MPD)-vel lehetővé válik távoli zenelejátszás
58 (MP3, Ogg Vorbis, FLAC, AAC, Mod és wav fájlok) és lejátszási listák
59 menedzselése. Az MPD a számítógépben egy zenelejátszó, amelyet
60 irányíthatsz helyi hálózaton keresztül. Egyben egy zseniális desktop
61 zenelejátszó is, különösen a konzol-mániásoknak, vagy azoknak, akik
62 sűrűn indítják újra az X-et.
63
64 %description -l pl.UTF-8
65 Music Player Daemon (MPD) pozwala na zdalny dostęp do odtwarzania
66 muzyki (plików MP3, Ogg Vorbis, FLAC, AAC, Mod i wave) oraz
67 zarządzania playlistami. MPD jest zaprojektowany do integrowania
68 komputera w system stereo umożliwiający sterowanie odtwarzaniem muzyki
69 w sieci lokalnej. Służy także za dobry odtwarzacz muzyki dla
70 komputerów biurkowych, zwłaszcza dla miłośników konsoli, różnych opcji
71 frontendów albo często restartujących X.
72
73 %prep
74 %setup -q
75
76 %build
77 # ac_cv_* hacks to avoid unwanted linking
78 %configure \
79         ac_cv_lib_iconv_main=no \
80         ac_cv_lib_nsl_gethostbyname=no \
81         %{!?with_pulse:--disable-pulse} \
82         %{?with_mod:--enable-mod} \
83         --enable-ao
84 %{__make}
85
86 %install
87 rm -rf $RPM_BUILD_ROOT
88 install -d $RPM_BUILD_ROOT{%{_sysconfdir},/etc/rc.d/init.d} \
89         $RPM_BUILD_ROOT{/var/lib/mpd/playlists,/var/log/mpd,/var/run/mpd}
90
91 %{__make} install \
92         DESTDIR=$RPM_BUILD_ROOT
93
94 install %{SOURCE1} $RPM_BUILD_ROOT%{_sysconfdir}
95 install %{SOURCE2} $RPM_BUILD_ROOT/etc/rc.d/init.d/mpd
96
97 touch $RPM_BUILD_ROOT/var/lib/mpd/mpd.db
98 touch $RPM_BUILD_ROOT/var/log/mpd/mpd.error
99 touch $RPM_BUILD_ROOT/var/log/mpd/mpd.log
100 touch $RPM_BUILD_ROOT/var/run/mpd/mpdstate
101
102 %clean
103 rm -rf $RPM_BUILD_ROOT
104
105 %pre
106 %groupadd -g 204 mpd
107 %useradd -u 204 -r -d /home/services/mpd -s /bin/false -c "Music Player Daemon (MPD) user" -g audio -G mpd mpd
108
109 %post
110 for f in mpd.log mpd.error; do
111         if [ ! -f /var/log/%{name}/$f ]; then
112                 touch /var/log/%{name}/$f
113                 chown mpd:mpd /var/log/%{name}/$f
114                 chmod 644 /var/log/%{name}/$f
115         fi
116 done
117 /sbin/chkconfig --add mpd
118
119 %preun
120 if [ "$1" = "0" ]; then
121         %service mpd stop
122         /sbin/chkconfig --del mpd
123 fi
124
125 %postun
126 if [ "$1" = "0" ]; then
127         %userremove mpd
128         %groupremove mpd
129 fi
130
131 %files
132 %defattr(644,root,root,755)
133 %doc AUTHORS NEWS README doc/mpdconf.example UPGRADING doc/protocol.xml
134 %attr(755,root,root) %{_bindir}/*
135 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/mpd.conf
136 %attr(754,root,root) /etc/rc.d/init.d/mpd
137 %dir %attr(770,root,mpd) /var/lib/%{name}
138 %dir %attr(770,root,mpd) /var/lib/%{name}/playlists
139 %dir %attr(751,root,root) /var/log/%{name}
140 %dir %attr(770,root,mpd) /var/run/%{name}
141 %attr(644,mpd,mpd) %ghost /var/lib/%{name}/mpd.db
142 %attr(644,mpd,mpd) %ghost /var/log/%{name}/mpd.error
143 %attr(644,mpd,mpd) %ghost /var/log/%{name}/mpd.log
144 %attr(644,mpd,mpd) %ghost /var/run/%{name}/mpdstate
145 %{_mandir}/man1/mpd.1*
146 %{_mandir}/man5/mpd.conf.5*
This page took 0.071384 seconds and 4 git commands to generate.