Sisyphus repository
Last update: 21 october 2019 | SRPMs: 17510 | Visits: 15357368
en ru br
ALT Linux repos
S:0.20.23-alt3
D:0.13.0-alt1.1
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
%endif
%{!?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
URL: http://musicpd.org/
Source0: http://musicpd.org/uploads/files/%name-%version.tar.bz2
Source1: %name.conf
Source2: %name.sys.conf.in
Source3: %name.init.in
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
%endif

%description
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.


%prep
%setup
%patch -p1
%rpmver_ge libflac-devel 1.1.3
subst 's/AM_PATH_LIBOGGFLAC/AM_PATH_LIBFLAC/' configure.ac
%endif


%build
%define _optlevel 3
%__autoreconf
%configure \
%ifarch x86_64
   --with-pic \
%endif
   %{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} \
   --with-zeroconf=%zeroconf
%make_build
bzip2 --best --keep --force ChangeLog


%install
%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


%pre
/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
%post_service %name ||:


%preun
%preun_service %name ||:


%files
%doc AUTHORS ChangeLog.* README TODO UPGRADING doc/{%{name}conf.example,COMMANDS}
%config(noreplace) %_sysconfdir/%name.conf
%config(noreplace) %_sysconfdir/%name.sys.conf
%_bindir/*
%_man1dir/*
%_man5dir/*
%_initdir/*
%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


%changelog

Full changelog you can see here

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