%define build_plf 0 %{?_with_plf: %{expand: %%global build_plf 1}} %if %build_plf %define distsuffix plf %endif Summary: MPD, the Music Player Daemon Name: mpd Version: 0.13.1 Release: %mkrel 1 License: GPLv2+ Group: Sound URL: http://www.musicpd.org/ Source: http://www.musicpd.org/uploads/files/%{name}-%{version}.tar.bz2 Source1: %{name}.conf Source2: %{name}.init Source3: %{name}.logrotate Source4: README.urpmi Requires(pre): rpm-helper Requires(post): rpm-helper Requires(preun): rpm-helper Requires(postun): rpm-helper BuildRequires: libalsa-devel BuildRequires: libavahi-common-devel BuildRequires: libogg-devel BuildRequires: libvorbis-devel BuildRequires: libflac-devel libflac++-devel BuildRequires: libaudiofile-devel BuildRequires: libmikmod-devel BuildRequires: libmad-devel BuildRequires: libid3tag-devel BuildRequires: libatomic_ops-devel BuildRequires: libshout-devel BuildRequires: libjack-devel BuildRequires: libao-devel BuildRequires: libpulseaudio-devel BuildRequires: libmpcdec-devel %if %build_plf BuildRequires: libfaad2-devel %endif BuildRoot: %{_tmppath}/%{name}-%{version}-buildroot %if %build_plf %description Music Player Daemon (MPD) allows remote access for playing music (MP3, Ogg Vorbis, FLAC, Mod, and wave files) and managing playlists. MPD is designed for integrating a computer into a stereo system that provides control for music playback over a local network. It is also makes a great desktop music player, especially if your a console junkie, like frontend options, or restart X often. This plf version of MPD add AAC files support by using libfaad2_0. %else %description Music Player Daemon (MPD) allows remote access for playing music (MP3, Ogg Vorbis, FLAC, Mod, and wave files) and managing playlists. MPD is designed for integrating a computer into a stereo system that provides control for music playback over a local network. It is also makes a great desktop music player, especially if your a console junkie, like frontend options, or restart X often. %endif %prep %setup -q %build %if %build_plf %configure2_5x --with-alsa-prefix=%{_prefix} --enable-ao %else %configure2_5x --disable-aac --with-alsa-prefix=%{_prefix} --enable-ao %endif %make %install rm -rf %{buildroot} %makeinstall_std mkdir -p %{buildroot}/var/lib/mpd touch %{buildroot}/%{_localstatedir}/mpd/mpd.db touch %{buildroot}/%{_localstatedir}/mpd/mpdstate mkdir -p %{buildroot}/var/log/mpd touch %{buildroot}/var/log/mpd/mpd.log touch %{buildroot}/var/log/mpd/mpd.error mkdir -p %{buildroot}/var/run/mpd mkdir -p %{buildroot}/%{_localstatedir}/mpd/playlists mkdir -p %{buildroot}/%{_localstatedir}/mpd/music install -D %{SOURCE1} %{buildroot}/etc/mpd.conf install -D %{SOURCE2} %{buildroot}/%{_initrddir}/%{name} install -D -m 644 %{SOURCE3} %{buildroot}%{_sysconfdir}/logrotate.d/%{name} install %{SOURCE4} doc/README.urpmi rm -rf %{buildroot}/%{_docdir}/mpd %clean rm -rf %{buildroot} %pre %_pre_useradd %name %{_localstatedir}/%{name} /bin/false usermod -g audio %{name} %post if [ $1 -eq 1 ] then %create_ghostfile %{_localstatedir}/mpd/mpd.db mpd audio 644 %create_ghostfile %{_localstatedir}/mpd/mpdstate mpd audio 644 %create_ghostfile /var/log/mpd/mpd.log mpd audio 644 %create_ghostfile /var/log/mpd/mpd.error mpd audio 644 service %{name} createdb fi #echo If you want to run mpd as a service, please read #echo /usr/share/doc/mpd-%{version}/README.MDK %_post_service %{name} %preun %_preun_service %{name} %postun %_postun_userdel %{name} %files %defattr(-,root,root) %doc README UPGRADING doc/COMMANDS AUTHORS COPYING ChangeLog doc/mpdconf.example doc/*.urpmi %{_bindir}/%{name} %{_mandir}/man1/* %{_mandir}/man5/* %config(noreplace) %{_sysconfdir}/logrotate.d/%{name} %attr(-,mpd,root) %config(noreplace) %{_sysconfdir}/%{name}.conf %config(noreplace) %{_initrddir}/%{name} %defattr(644,mpd,audio) %attr(755,mpd,audio) %dir %{_localstatedir}/mpd %attr(755,mpd,audio) %dir %{_localstatedir}/mpd/music %attr(755,mpd,audio) %dir %{_localstatedir}/mpd/playlists %ghost %{_localstatedir}/mpd/mpd.db %ghost %{_localstatedir}/mpd/mpdstate %attr(755,mpd,audio) %dir /var/log/mpd %attr(755,mpd,audio) %dir /var/run/mpd %ghost /var/log/mpd/mpd.log %ghost /var/log/mpd/mpd.error %changelog * Tue Jan 29 2008 Tomasz Pawel Gajc <tpg@mandriva.org> 0.13.1-1mdv2008.1 + Revision: 159586 - new version - new license policy + Olivier Blin <oblin@mandriva.com> - restore BuildRoot + Thierry Vignaud <tvignaud@mandriva.com> - kill re-definition of %%buildroot on Pixel's request * Sun Jul 22 2007 Gaëtan Lehmann <glehmann@mandriva.org> 0.13.0-5mdv2008.0 + Revision: 54443 - libao must be enable explicitly * Sun Jul 22 2007 Gaëtan Lehmann <glehmann@mandriva.org> 0.13.0-4mdv2008.0 + Revision: 54434 - fix a last mistake in default audio config file * Fri Jul 20 2007 Gaëtan Lehmann <glehmann@mandriva.org> 0.13.0-3mdv2008.0 + Revision: 53808 - allow mpd to create its pmd.pid file, os the service can start with the default config - create the music and playlists directories in the package, so mpd can start with the default config - create the database in postinstall so mpd can start immediately once the package is installed - fix wrong audio config, so mpd can work with the default config - update buildrequires to make all the features of mpd usable - move msec notes at the end of the readme to avoid confusing the user * Mon Jul 16 2007 Tomasz Pawel Gajc <tpg@mandriva.org> 0.13.0-2mdv2008.0 + Revision: 52666 - update mpd.conf file (alsa is a default sound system now) - bunzip Source 1 * Mon May 28 2007 Tomasz Pawel Gajc <tpg@mandriva.org> 0.13.0-1mdv2008.0 + Revision: 32091 - new version - drop P1 and P2 - spec file clean + Erwan Velu <erwan@mandriva.org> - 0.12.2 * Wed Feb 14 2007 Per Ãyvind Karlsen <pkarlsen@mandriva.com> 0.12.1-3mdv2007.0 + Revision: 121192 - fix build with flac 1.1.4 (P2 from svn) * Wed Dec 13 2006 Nicolas Lécureuil <neoclust@mandriva.org> 0.12.1-2mdv2007.1 + Revision: 96051 - Rediff patch 1 and remove patch 0 (merged upstream) * Wed Dec 13 2006 Nicolas Lécureuil <neoclust@mandriva.org> 0.12.1-1mdv2007.1 + Revision: 96050 - New version 0.12.1 + Lenny Cartier <lenny@mandriva.com> - Import mpd * Wed Nov 02 2005 Nicolas Lécureuil <neoclust@mandriva.org> 0.11.5-5mdk - arg!!! a patch is better applied :/ : - so apply patch1 * Wed Nov 02 2005 Nicolas Lécureuil <neoclust@mandriva.org> 0.11.5-4mdk - From Anssi Hannula : - fix build switch (%%define -> %%global) - fix configure check for faad2 (patch1) - fix BuildRequires libfaad2-devel for x86_64 - clean %%pre and %%postun * Thu May 26 2005 Nicolas Lécureuil <neoclust@mandriva.org> 0.11.5-3mdk - Rebuild * Wed Nov 10 2004 Cedric Devillers <brancaleone@altern.org> 0.11.5-2mdk - Patch0 enable interpolation feature of libmikmod2 (much better sound). - Source1 Make it "service-ready" (initscript, global config file, logrotate config, and instructions to run mpd as a service). Thanks to guillomovitch and rgs. * Thu Nov 04 2004 Guillaume Rousse <guillomovitch@mandrake.org> 0.11.5-1mdk - new release - rpmbuildupdate aware - fixed plf build * Tue Aug 10 2004 Cedric Devillers <brancaleone@altern.org> 0.11.4-2mdk - Don't use internal libmad and libid3tag anymore (new BuildRequires added) * Sun Aug 08 2004 Cedric Devillers <brancaleone@altern.org> 0.11.4-1mdk - Initial package - Add plf swith because AAC support need libfaad (wich is in plf)