Sisyphus repository
Last update: 16 april 2021 | SRPMs: 17844 | Visits: 20737380
en ru br
ALT Linux repos
5.0: 0.13.2-alt3
4.1: 0.13.1-alt1
4.0: 0.13.0-alt3
3.0: 0.11.5-alt1.1

Group :: Sound
RPM: mpd

 Main   Changelog   Spec   Patches   Sources   Download   Gear   Bugs and FR  Repocop 

%def_enable ao
%def_enable shout
%def_enable iconv
%def_disable ipv6
%def_disable sun
%def_enable oss
%def_enable alsa
%def_enable jack
%def_enable pulse
%def_enable mvp
%def_enable oggvorbis
%def_enable oggflac
%def_enable flac
%def_enable mp3
%def_enable aac
%def_enable audiofile
%def_enable mod
%def_enable faad
%def_enable mpc
%def_enable id3
%def_enable lsr
%def_without tremor
%define zeroconf avahi
%define mpd_user _mpd
%define mpd_group audio
%define set_disable() %{expand:%%force_disable %{1}} %{expand:%%undefine _enable_%{1}}
%define rpmver_ge() %{expand:%%if %%(rpmvercmp %%{get_version %{1}} %{2}) >= 0}

%if_with tremor
%set_disable shout
%set_disable oggflac
%{!?zeroconf:%define zeroconf no}

%define Name MPD
Name: mpd
Version: 0.13.1
Release: alt1
Summary: Music Player Daemon (%Name) allows remote access for playing music and managing playlists.
License: %gpl2plus
Group: Sound
Source1: %name.conf
Patch: %name-0.13.0-configure.patch
BuildPreReq: rpm-utils

# Automatically added by buildreq on Tue Sep 11 2007

#BuildRequires: gcc-c++ glibc-devel-static jackit-devel libalsa-devel libao-devel libaudiofile-devel libavahi-devel libfaad-devel libflac-devel libid3tag-devel libmad-devel libmikmod-devel libmpcdec-devel libpulseaudio-devel libsamplerate-devel libshout2-devel zlib-devel

BuildRequires: zlib-devel rpm-build-licenses

%{?_enable_alsa:BuildRequires: libalsa-devel >= 0.9.0}
%{?_enable_jack:BuildRequires: jackit-devel}
%{?_enable_ao:BuildRequires: libao-devel}
%{?_enable_shout:BuildRequires: libshout2-devel}
%{?_enable_audiofile:BuildRequires: libaudiofile-devel >= 0.1.7}
%{?_enable_mod:BuildRequires: libmikmod-devel >= 3.1.7}
%{?_enable_faad:BuildRequires: libfaad-devel}
%{?_enable_flac:BuildRequires: libflac-devel >= 1.1.3}
%{?_enable_oggflac:BuildRequires: liboggflac-devel}
%{?_enable_id3:BuildRequires: libid3tag-devel}
%{?_enable_mp3:BuildRequires: libmad-devel}
%{?_enable_mpc:BuildRequires: libmpcdec-devel}
%{?_enable_pulse:BuildRequires: libpulseaudio-devel}
%{?_enable_oggvorbis:BuildRequires: libvorbis-devel}
%{?_enable_lsr:BuildRequires: libsamplerate-devel}
%if %zeroconf == avahi
BuildRequires: libavahi-devel

Music Player Daemon (%Name) allows remote access for playing music
(MP3, Ogg Vorbis, FLAC, AAC, Mod, and wave files) and managing
playlists. %Name 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 you are a
console junkie, like frontend options, or restart X often.

%patch -p1
%rpmver_ge libflac-devel 1.1.3

%define _optlevel 3
%configure \
%ifarch x86_64
   --with-pic \
   %{subst_with tremor} \
   %{subst_enable ao} \
   %{subst_enable shout} \
   %{subst_enable iconv} \
   %{subst_enable ipv6} \
   %{subst_enable sun} \
   %{subst_enable oss} \
   %{subst_enable alsa} \
   %{subst_enable jack} \
   %{subst_enable pulse} \
   %{subst_enable mvp} \
   %{subst_enable oggvorbis} \
   %{subst_enable flac} \
   %{subst_enable oggflac} \
   %{subst_enable mp3} \
   %{subst_enable aac} \
   %{subst_enable audiofile} \
   %{subst_enable mod} \
   %{subst_enable mpc} \
   %{subst_enable id3} \
   %{subst_enable lsr} \
bzip2 --best --keep --force ChangeLog

%make_install DESTDIR=%buildroot docdir=%_docdir/%name-%version install
install -d %buildroot{%_localstatedir/%name/playlists,{/var/run,%_logdir}/%name,%_sysconfdir,%_initdir}
install -m 0644 %SOURCE1 %buildroot%_sysconfdir/%name.conf
sed 's/ at MPD_USER at /%mpd_user/g' %SOURCE2 > %buildroot%_sysconfdir/%name.sys.conf
chmod 640 %buildroot%_sysconfdir/%name.sys.conf
sed 's/ at MPD_USER at /%mpd_user/g' %SOURCE3 > %buildroot%_initdir/%name
chmod 755 %buildroot%_initdir/%name

/usr/sbin/useradd -r -n -s /dev/null -d %_localstatedir/%name -g %mpd_group -c "Music Player Daemon (%Name)" %mpd_user 2> /dev/null ||:

%post_service %name ||:

%preun_service %name ||:

%doc AUTHORS ChangeLog.* README TODO UPGRADING doc/{%{name}conf.example,COMMANDS}
%config(noreplace) %_sysconfdir/%name.conf
%config(noreplace) %_sysconfdir/%name.sys.conf
%attr(755,%mpd_user,%mpd_group) %dir %_localstatedir/%name
%attr(755,%mpd_user,%mpd_group) %dir %_localstatedir/%name/playlists
%attr(755,%mpd_user,%mpd_group) %dir /var/run/%name
%attr(755,%mpd_user,%mpd_group) %dir %_logdir/%name


Full changelog you can see here

design & coding: Vladimir Lettiev aka crux © 2004-2005, Andrew Avramenko aka liks © 2007-2008
current maintainer: Michael Shigorin