2017-08-25 08:51:42 +02:00
|
|
|
#
|
|
|
|
# spec file for package mpd
|
|
|
|
#
|
2018-01-02 10:58:39 +01:00
|
|
|
# Copyright (c) 2018 SUSE LINUX GmbH, Nuernberg, Germany.
|
2017-08-25 08:51:42 +02:00
|
|
|
# Copyright (c) 2012 Pascal Bleser <pascal.bleser@opensuse.org>
|
|
|
|
#
|
|
|
|
# All modifications and additions to the file contributed by third parties
|
|
|
|
# remain the property of their copyright owners, unless otherwise agreed
|
|
|
|
# upon. The license for this file, and modifications and additions to the
|
|
|
|
# file, is the same license as for the pristine package itself (unless the
|
|
|
|
# license for the pristine package is not an Open Source License, in which
|
|
|
|
# case the license is the MIT License). An "Open Source License" is a
|
|
|
|
# license that conforms to the Open Source Definition (Version 1.9)
|
|
|
|
# published by the Open Source Initiative.
|
|
|
|
|
|
|
|
# Please submit bugfixes or comments via http://bugs.opensuse.org/
|
|
|
|
#
|
|
|
|
|
|
|
|
|
|
|
|
%bcond_with faad
|
|
|
|
|
|
|
|
%if !%{defined _userunitdir}
|
|
|
|
%define _userunitdir /usr/lib/systemd/user
|
|
|
|
%endif
|
|
|
|
Name: mpd
|
2018-01-02 10:58:39 +01:00
|
|
|
Version: 0.20.14
|
2017-08-25 08:51:42 +02:00
|
|
|
Release: 0
|
|
|
|
Summary: Music Player Daemon
|
2018-01-02 10:58:39 +01:00
|
|
|
License: GPL-3.0+
|
2017-08-25 08:51:42 +02:00
|
|
|
Group: Productivity/Multimedia/Sound/Players
|
2018-01-02 10:58:39 +01:00
|
|
|
URL: https://www.musicpd.org/
|
|
|
|
Source: https://www.musicpd.org/download/mpd/0.20/mpd-%{version}.tar.xz
|
2017-08-25 08:51:42 +02:00
|
|
|
Source2: README.%{name}
|
|
|
|
Source3: mpd-user.conf
|
|
|
|
# PATCH-FEATURE-OPENSUSE mpd-mpdconf_suse.patch --
|
|
|
|
Patch0: %{name}-mpdconf_suse.patch
|
|
|
|
Patch1: mpd-configh.patch
|
|
|
|
BuildRequires: autoconf
|
2018-01-02 10:58:39 +01:00
|
|
|
BuildRequires: automake
|
2017-08-25 08:51:42 +02:00
|
|
|
BuildRequires: pkg-config
|
|
|
|
BuildRequires: libboost_headers-devel
|
|
|
|
#uildRequires: cdrkit-cdrtools-compat
|
|
|
|
%if 0%{?suse_version} > 1320
|
|
|
|
BuildRequires: gcc
|
|
|
|
BuildRequires: gcc-c++
|
|
|
|
%else
|
|
|
|
# Leap 42.2+ / SLE12SP2Backports
|
|
|
|
BuildRequires: gcc6
|
|
|
|
BuildRequires: gcc6-c++
|
|
|
|
%endif
|
|
|
|
BuildRequires: libcue-devel
|
|
|
|
BuildRequires: libmikmod-devel
|
|
|
|
# MPD_ENABLE_AUTO_LIB
|
|
|
|
BuildRequires: pkgconfig(bzip2)
|
|
|
|
%if %{with faad}
|
|
|
|
BuildRequires: faad2-devel
|
|
|
|
%endif
|
|
|
|
BuildRequires: libmp3lame-devel
|
|
|
|
# MPD_ENABLE_AUTO_PKG
|
|
|
|
BuildRequires: pkgconfig(alsa) >= 0.9.0
|
|
|
|
BuildRequires: pkgconfig(ao)
|
|
|
|
BuildRequires: pkgconfig(audiofile) >= 0.3
|
|
|
|
BuildRequires: pkgconfig(avahi-client)
|
|
|
|
BuildRequires: pkgconfig(dbus-1)
|
|
|
|
BuildRequires: pkgconfig(expat)
|
|
|
|
BuildRequires: pkgconfig(flac) >= 1.2
|
|
|
|
BuildRequires: pkgconfig(fluidsynth) >= 1.1
|
|
|
|
BuildRequires: pkgconfig(icu-i18n)
|
|
|
|
BuildRequires: pkgconfig(id3tag)
|
|
|
|
BuildRequires: pkgconfig(jack) >= 0.100
|
|
|
|
BuildRequires: pkgconfig(libavcodec) >= 53.25
|
|
|
|
BuildRequires: pkgconfig(libavformat) >= 53.17
|
|
|
|
BuildRequires: pkgconfig(libavutil) >= 51.17
|
|
|
|
BuildRequires: pkgconfig(libcdio_paranoia)
|
|
|
|
BuildRequires: pkgconfig(libcurl) >= 7.18
|
|
|
|
BuildRequires: pkgconfig(libgme)
|
|
|
|
BuildRequires: pkgconfig(libiso9660)
|
|
|
|
BuildRequires: pkgconfig(libmms) >= 0.4
|
|
|
|
BuildRequires: pkgconfig(libmodplug)
|
|
|
|
BuildRequires: pkgconfig(libmpdclient) >= 2.2
|
|
|
|
BuildRequires: pkgconfig(libmpg123)
|
2018-01-02 10:58:39 +01:00
|
|
|
BuildRequires: pkgconfig(libnfs)
|
2017-08-25 08:51:42 +02:00
|
|
|
BuildRequires: pkgconfig(libpulse) >= 0.9.16
|
|
|
|
BuildRequires: pkgconfig(libsystemd)
|
|
|
|
BuildRequires: pkgconfig(libupnp)
|
|
|
|
BuildRequires: pkgconfig(mad)
|
|
|
|
BuildRequires: pkgconfig(ogg)
|
|
|
|
BuildRequires: pkgconfig(openal)
|
|
|
|
BuildRequires: pkgconfig(opus)
|
|
|
|
BuildRequires: pkgconfig(samplerate) >= 0.1.3
|
|
|
|
BuildRequires: pkgconfig(shine) >= 3.1
|
|
|
|
BuildRequires: pkgconfig(shout)
|
|
|
|
BuildRequires: pkgconfig(smbclient) >= 0.2
|
|
|
|
BuildRequires: pkgconfig(sndfile)
|
|
|
|
BuildRequires: pkgconfig(soxr)
|
|
|
|
BuildRequires: pkgconfig(sqlite3) >= 3.7.3
|
|
|
|
BuildRequires: pkgconfig(twolame)
|
|
|
|
BuildRequires: pkgconfig(vorbis)
|
|
|
|
BuildRequires: pkgconfig(vorbisenc)
|
|
|
|
BuildRequires: pkgconfig(wavpack)
|
|
|
|
# soundcloud
|
|
|
|
#uildRequires: pkgconfig(yajl) >= 2.0
|
|
|
|
BuildRequires: pkgconfig(zlib)
|
|
|
|
BuildRequires: pkgconfig(zziplib) >= 0.13
|
|
|
|
#
|
|
|
|
%if %{suse_version} > 1320
|
|
|
|
BuildRequires: group(audio)
|
|
|
|
Requires(pre): group(audio)
|
|
|
|
%endif
|
|
|
|
Requires(pre): pwdutils
|
|
|
|
Requires(pre): shadow
|
|
|
|
Requires(pre): %fillup_prereq
|
|
|
|
%{?systemd_requires}
|
|
|
|
|
|
|
|
%description
|
|
|
|
A daemon for playing music (mp3, ogg vorbis, flac, and wav). Music is
|
|
|
|
played through the server's audio device. The daemon stores info
|
|
|
|
about all available music, and this info can be easily searched and
|
|
|
|
retrieved. Player control, info retrieval, and playlist management
|
|
|
|
can all be managed remotely. There a bunch of clients to control mpd:
|
|
|
|
for Gnome, KDE, console and Apache (PHP).
|
|
|
|
|
|
|
|
Please read README.mpd how to configure it.
|
|
|
|
|
|
|
|
%prep
|
|
|
|
%setup -q
|
|
|
|
%patch0 -p1
|
|
|
|
%patch1 -p1
|
|
|
|
|
|
|
|
%build
|
|
|
|
%if 0%{?suse_version} > 1320
|
|
|
|
export CC=gcc
|
|
|
|
export CXX=g++
|
|
|
|
%else
|
|
|
|
# Leap 42.2+ / SLE12SP2Backports
|
|
|
|
export CC=gcc-6
|
|
|
|
export CXX=g++-6
|
|
|
|
%endif
|
2017-08-28 12:47:01 +02:00
|
|
|
NOCONFIGURE=1 ./autogen.sh
|
2017-08-25 08:51:42 +02:00
|
|
|
%configure \
|
|
|
|
--disable-sidplay \
|
|
|
|
--disable-aac \
|
|
|
|
\
|
|
|
|
--enable-syslog \
|
|
|
|
--enable-eventfd \
|
|
|
|
--enable-signalfd \
|
|
|
|
--enable-poll \
|
|
|
|
--enable-epoll \
|
|
|
|
--enable-database \
|
|
|
|
--enable-daemon \
|
|
|
|
--enable-debug \
|
|
|
|
--disable-documentation \
|
|
|
|
--enable-dsd \
|
|
|
|
--enable-fifo \
|
|
|
|
--enable-httpd-output \
|
|
|
|
--enable-inotify \
|
|
|
|
--enable-ipv6 \
|
|
|
|
--enable-largefile \
|
|
|
|
--disable-soundcloud \
|
|
|
|
--disable-libwrap \
|
|
|
|
--enable-mikmod \
|
|
|
|
--enable-openal \
|
|
|
|
--disable-oss \
|
|
|
|
--disable-osx \
|
|
|
|
--enable-pipe-output \
|
|
|
|
--enable-recorder-output \
|
|
|
|
--enable-shout \
|
|
|
|
--enable-solaris-output \
|
|
|
|
--enable-tcp \
|
|
|
|
--disable-test \
|
|
|
|
--enable-un \
|
|
|
|
--enable-vorbis \
|
|
|
|
--enable-wave-encoder \
|
|
|
|
--disable-werror \
|
|
|
|
--enable-icu \
|
|
|
|
--enable-iconv \
|
|
|
|
--enable-systemd-daemon \
|
|
|
|
--enable-libmpdclient \
|
|
|
|
--enable-expat \
|
|
|
|
--enable-id3 \
|
|
|
|
--enable-sqlite \
|
|
|
|
--enable-lsr \
|
|
|
|
--enable-soxr \
|
|
|
|
--enable-curl \
|
|
|
|
--enable-smbclient \
|
|
|
|
--enable-nfs \
|
|
|
|
--enable-cdio-paranoia \
|
|
|
|
--enable-mms \
|
|
|
|
--enable-webdav \
|
|
|
|
--enable-cue \
|
|
|
|
--enable-neighbor-plugins \
|
|
|
|
--enable-iso9660 \
|
|
|
|
--enable-zlib \
|
|
|
|
--enable-bzip2 \
|
|
|
|
--enable-upnp \
|
|
|
|
--enable-zzip \
|
|
|
|
--disable-adplug \
|
|
|
|
--enable-audiofile \
|
|
|
|
%if %{with faad}
|
|
|
|
--enable-aac \
|
|
|
|
%endif
|
|
|
|
--enable-ffmpeg \
|
|
|
|
--enable-flac \
|
|
|
|
--enable-fluidsynth \
|
|
|
|
--enable-gme \
|
|
|
|
--enable-mad \
|
|
|
|
--enable-mpg123 \
|
|
|
|
--enable-modplug \
|
|
|
|
--enable-opus \
|
|
|
|
--enable-sndfile \
|
|
|
|
--disable-mpc \
|
|
|
|
--enable-wavpack \
|
|
|
|
--disable-wildmidi \
|
|
|
|
--enable-shine-encoder \
|
|
|
|
--enable-vorbis-encoder \
|
|
|
|
--enable-lame-encoder \
|
|
|
|
--enable-twolame-encoder \
|
|
|
|
--enable-alsa \
|
|
|
|
--disable-roar \
|
|
|
|
--disable-sndio \
|
|
|
|
--disable-haiku \
|
|
|
|
--enable-jack \
|
|
|
|
--enable-ao \
|
|
|
|
--enable-pulse \
|
|
|
|
\
|
|
|
|
--with-boost=yes \
|
|
|
|
--enable-systemd-daemon \
|
|
|
|
--with-systemdsystemunitdir=%_unitdir \
|
|
|
|
--with-systemduserunitdir=%_userunitdir
|
|
|
|
make %{?_smp_mflags}
|
|
|
|
|
|
|
|
%install
|
|
|
|
%make_install docdir=%{_docdir}/%{name}
|
|
|
|
find %{buildroot} -ls
|
|
|
|
# missing dirs
|
|
|
|
install -d \
|
|
|
|
%{buildroot}%{_localstatedir}/lib/%{name}/playlists \
|
|
|
|
%{buildroot}%{_sbindir}
|
|
|
|
# additional docs
|
|
|
|
install -m 0644 %{SOURCE2} README.mpd
|
|
|
|
# copy example mpd.conf
|
|
|
|
install -Dm0644 %{buildroot}%{_docdir}/%{name}/mpdconf.example %{buildroot}/etc/mpd.conf
|
|
|
|
cp -a "%{SOURCE3}" "%{buildroot}%{_docdir}/%{name}/"
|
|
|
|
ln -s service %{buildroot}%{_sbindir}/rcmpd
|
|
|
|
|
|
|
|
%pre
|
|
|
|
# add mpd user only when installing first time
|
|
|
|
getent passwd mpd >/dev/null || useradd -r -g audio -d /var/lib/mpd -s /sbin/nologin -c "user for mpd" mpd
|
|
|
|
%service_add_pre mpd.service
|
|
|
|
|
|
|
|
%post
|
|
|
|
%service_add_post mpd.service
|
|
|
|
|
|
|
|
%preun
|
|
|
|
%service_del_preun mpd.service
|
|
|
|
|
|
|
|
%postun
|
|
|
|
%service_del_postun mpd.service
|
|
|
|
|
|
|
|
%files
|
|
|
|
%doc AUTHORS COPYING NEWS README.md README.mpd
|
|
|
|
%config(noreplace) /etc/%{name}.conf
|
|
|
|
%{_bindir}/%{name}
|
|
|
|
%{_sbindir}/rcmpd
|
|
|
|
%attr(0755,mpd,audio) %{_localstatedir}/lib/%{name}
|
2018-01-02 10:58:39 +01:00
|
|
|
%{_mandir}/man1/%{name}.1%{ext_man}
|
|
|
|
%{_mandir}/man5/%{name}.conf.5%{ext_man}
|
2017-08-25 08:51:42 +02:00
|
|
|
%dir %{_docdir}/%{name}
|
|
|
|
%doc %{_docdir}/%{name}
|
|
|
|
%{_unitdir}/mpd.service
|
|
|
|
%{_unitdir}/mpd.socket
|
|
|
|
%{_userunitdir}/mpd.service
|
|
|
|
|
|
|
|
%changelog
|