]> git.pld-linux.org Git - packages/mpd.git/blobdiff - mpd.spec
- updated to 0.17.2
[packages/mpd.git] / mpd.spec
index 8addcc1a430d8d3b9047d5945508c24c75b6fa69..9d3b3307d5c64aa93ccd5cf80704cb19380387f3 100644 (file)
--- a/mpd.spec
+++ b/mpd.spec
@@ -4,22 +4,26 @@
 # Conditional build:
 %bcond_without mod             # enable MOD support
 %bcond_without pulseaudio      # disable PulseAudio support
-#
+%bcond_without audiofile       # Audiofile support (WAV and others)
+
 Summary:       Music Player Daemon
 Summary(hu.UTF-8):     Music Player Daemon
 Summary(pl.UTF-8):     Music Player Daemon - demon odtwarzający muzykę
 Name:          mpd
-Version:       0.15.10
-Release:       2
+Version:       0.17.2
+Release:       1
 License:       GPL v2+
 Group:         Applications/Multimedia
 Source0:       http://downloads.sourceforge.net/musicpd/%{name}-%{version}.tar.bz2
-# Source0-md5: fb18fa3ed5ff7e3719536a6603098df5
+# Source0-md5: 52a5e9ccd37dc94231e80083dcb82d91
 Source1:       %{name}.conf
 Source2:       %{name}.init
+Source3:       %{name}.sysconfig
+Source4:       %{name}.tmpfiles
 URL:           http://www.musicpd.org/
+BuildRequires: OpenAL-devel
 BuildRequires: alsa-lib-devel >= 0.9.0
-BuildRequires: audiofile-devel >= 0.1.7
+%{?with_audiofile:BuildRequires:       audiofile-devel >= 0.1.7}
 BuildRequires: avahi-glib-devel
 BuildRequires: bzip2-devel
 BuildRequires: curl-devel
@@ -28,7 +32,8 @@ BuildRequires:        faad2-devel >= 2.6.1-5
 BuildRequires: ffmpeg-devel
 BuildRequires: flac-devel >= 1.1.0
 BuildRequires: fluidsynth-devel
-BuildRequires: glib2-devel
+BuildRequires: game-music-emu-devel
+BuildRequires: glib2-devel >= 2.12
 BuildRequires: jack-audio-connection-kit-devel >= 0.4
 BuildRequires: lame-libs-devel
 BuildRequires: libao-devel >= 0.8.3
@@ -43,15 +48,20 @@ BuildRequires:      libmpcdec-devel
 BuildRequires: libogg-devel
 BuildRequires: libsamplerate-devel >= 0.0.15
 BuildRequires: libshout-devel
+BuildRequires: libsidplay2-devel >= 2.1.1-5
 BuildRequires: libvorbis-devel
 BuildRequires: pkgconfig >= 1:0.9.0
 %{?with_pulseaudio:BuildRequires:      pulseaudio-devel}
+BuildRequires: rpmbuild(macros) >= 1.629-2
 BuildRequires: sqlite3-devel
+BuildRequires: twolame-devel
 BuildRequires: wavpack-devel
 BuildRequires: wildmidi-devel
 BuildRequires: xmlto
 BuildRequires: zlib-devel
 BuildRequires: zziplib-devel
+Requires(post,preun,postun):   systemd-units >= 38
+Requires:      systemd-units >= 38
 Provides:      group(mpd)
 Provides:      user(mpd)
 BuildRoot:     %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
@@ -81,25 +91,58 @@ w sieci lokalnej. Służy także za dobry odtwarzacz muzyki dla
 komputerów biurkowych, zwłaszcza dla miłośników konsoli, różnych opcji
 frontendów albo często restartujących X.
 
+%package apidocs
+Summary:       MPD API documentation
+Summary(pl.UTF-8):     Dokumentacja API biblioteki API
+Group:         Documentation
+
+%description apidocs
+API and internal documentation for MPD library.
+
+%description apidocs -l pl.UTF-8
+Dokumentacja API biblioteki MPD.
+
+%package doc
+Summary:       Documentation for Music Player Daemon (MPD)
+Summary(fr.UTF-8):     Documentation pour Music Player Daemon (MPD)
+Summary(it.UTF-8):     Documentazione di Music Player Daemon (MPD)
+Summary(pl.UTF-8):     Podręcznik dla Music Player Daemon (MPD)
+Group:         Documentation
+
+%description doc
+Documentation for Music Player Daemon (MPD).
+
+%description doc -l fr.UTF-8
+Documentation pour Music Player Daemon (MPD).
+
+%description doc -l it.UTF-8
+Documentazione di Music Player Daemon (MPD).
+
+%description doc -l pl.UTF-8
+Dokumentacja do Music Player Daemon (MPD).
+
 %prep
 %setup -q
 
 %build
 # ac_cv_* hacks to avoid unwanted linking
+GME_CFLAGS="-I/usr/include/gme" GME_LIBS="-lgme" \
 %configure \
        ac_cv_lib_iconv_main=no \
        ac_cv_lib_nsl_gethostbyname=no \
        %{!?with_pulseaudio:--disable-pulse} \
        %{?with_mod:--enable-mikmod} \
-       --disable-sidplay \
+       --enable-sidplay \
        --enable-alsa \
        --enable-ao \
+       %{?with_audiofile:--enable-audiofile} \
        --enable-bzip2 \
        --enable-cue \
        --enable-curl \
        --enable-documentation \
        --enable-ffmpeg \
        --enable-fluidsynth \
+       --enable-gme \
        --enable-httpd-output \
        --enable-iso9660 \
        --enable-jack \
@@ -110,43 +153,52 @@ frontendów albo często restartujących X.
        --enable-mms \
        --enable-modplug \
        --enable-mvp \
+       --enable-openal \
+       --enable-pipe-output \
+       --enable-recorder-output \
        --enable-shout \
        --enable-sqlite \
+       --enable-twolame-encoder \
        --enable-vorbis-encoder \
+       --enable-wave-encoder \
        --enable-wavpack \
        --enable-wildmidi \
-       --enable-zip \
+       --enable-zzip \
        --with-zeroconf=avahi \
-       --without-tremor
+       --without-tremor \
+       --with-systemdsystemunitdir=%{systemdunitdir}
 %{__make}
 
 %install
 rm -rf $RPM_BUILD_ROOT
-install -d $RPM_BUILD_ROOT{%{_sysconfdir},/etc/rc.d/init.d} \
-       $RPM_BUILD_ROOT{/var/lib/mpd/playlists,/var/log/mpd,/var/run/mpd}
+install -d $RPM_BUILD_ROOT{%{_sysconfdir},/etc/{rc.d/init.d,sysconfig}} \
+       $RPM_BUILD_ROOT{/var/lib/mpd/playlists,/var/log/mpd,/var/run/mpd} \
+       $RPM_BUILD_ROOT%{systemdtmpfilesdir}
 
 %{__make} install \
        DESTDIR=$RPM_BUILD_ROOT
 
-install %{SOURCE1} $RPM_BUILD_ROOT%{_sysconfdir}
-install %{SOURCE2} $RPM_BUILD_ROOT/etc/rc.d/init.d/mpd
+cp -p %{SOURCE1} $RPM_BUILD_ROOT%{_sysconfdir}
+install -p %{SOURCE2} $RPM_BUILD_ROOT/etc/rc.d/init.d/mpd
+cp -p %{SOURCE3} $RPM_BUILD_ROOT/etc/sysconfig/mpd
+install %{SOURCE4} $RPM_BUILD_ROOT%{systemdtmpfilesdir}/%{name}.conf
 
 touch $RPM_BUILD_ROOT/var/lib/mpd/mpd.db
-touch $RPM_BUILD_ROOT/var/log/mpd/mpd.error
+touch $RPM_BUILD_ROOT/var/lib/mpd/mpdstate
+touch $RPM_BUILD_ROOT/var/lib/mpd/sticker.sql
 touch $RPM_BUILD_ROOT/var/log/mpd/mpd.log
-touch $RPM_BUILD_ROOT/var/run/mpd/mpdstate
 
-rm -rf $RPM_BUILD_ROOT%{_docdir}/mpd
+%{__rm} -r $RPM_BUILD_ROOT%{_docdir}/mpd
 
 %clean
 rm -rf $RPM_BUILD_ROOT
 
 %pre
 %groupadd -g 204 mpd
-%useradd -u 204 -r -d /home/services/mpd -s /bin/false -c "Music Player Daemon (MPD) user" -g audio -G mpd mpd
+%useradd -u 204 -r -d /var/lib/mpd -s /bin/false -c "Music Player Daemon (MPD) user" -G audio -g mpd mpd
 
 %post
-for f in mpd.log mpd.error; do
+for f in mpd.log; do
        if [ ! -f /var/log/%{name}/$f ]; then
                touch /var/log/%{name}/$f
                chown mpd:mpd /var/log/%{name}/$f
@@ -154,32 +206,49 @@ for f in mpd.log mpd.error; do
        fi
 done
 /sbin/chkconfig --add mpd
+%systemd_post %{name}.service
 
 %preun
 if [ "$1" = "0" ]; then
        %service mpd stop
        /sbin/chkconfig --del mpd
 fi
+%systemd_preun %{name}.service
 
 %postun
 if [ "$1" = "0" ]; then
        %userremove mpd
        %groupremove mpd
 fi
+%systemd_reload
+
+%triggerpostun -- %{name} < 0.16.6-1
+%systemd_trigger %{name}.service
 
 %files
 %defattr(644,root,root,755)
-%doc AUTHORS NEWS README doc/mpdconf.example UPGRADING doc/api doc/developer doc/protocol doc/sticker doc/user
+%doc AUTHORS NEWS README doc/mpdconf.example UPGRADING
 %attr(755,root,root) %{_bindir}/*
 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/mpd.conf
 %attr(754,root,root) /etc/rc.d/init.d/mpd
+%config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/mpd
+%{systemdtmpfilesdir}/%{name}.conf
+%{systemdunitdir}/mpd.service
 %dir %attr(770,root,mpd) /var/lib/%{name}
 %dir %attr(770,root,mpd) /var/lib/%{name}/playlists
 %dir %attr(751,root,root) /var/log/%{name}
 %dir %attr(770,root,mpd) /var/run/%{name}
 %attr(644,mpd,mpd) %ghost /var/lib/%{name}/mpd.db
-%attr(644,mpd,mpd) %ghost /var/log/%{name}/mpd.error
+%attr(644,mpd,mpd) %ghost /var/lib/%{name}/mpdstate
+%attr(644,mpd,mpd) %ghost /var/lib/%{name}/sticker.sql
 %attr(644,mpd,mpd) %ghost /var/log/%{name}/mpd.log
-%attr(644,mpd,mpd) %ghost /var/run/%{name}/mpdstate
 %{_mandir}/man1/mpd.1*
 %{_mandir}/man5/mpd.conf.5*
+
+%files doc
+%defattr(644,root,root,755)
+%doc doc/user/*
+
+%files apidocs
+%defattr(644,root,root,755)
+%doc doc/api doc/developer doc/protocol
This page took 0.079728 seconds and 4 git commands to generate.