2013-08-19 09:02:30 +02:00
|
|
|
# Template file for 'mpd'
|
|
|
|
pkgname=mpd
|
2015-02-08 09:25:38 +01:00
|
|
|
version=0.19.9
|
|
|
|
revision=1
|
2013-08-19 09:02:30 +02:00
|
|
|
build_style=gnu-configure
|
2014-11-04 12:19:43 +01:00
|
|
|
configure_args="--enable-opus --enable-mikmod --enable-neighbor-plugins
|
2013-11-09 09:28:41 +01:00
|
|
|
--enable-soundcloud --enable-pipe-output --disable-twolame-encoder
|
2014-09-12 08:21:21 +02:00
|
|
|
--disable-sidplay --enable-bzip2 --enable-zzip $(vopt_enable jack)
|
|
|
|
$(vopt_enable lame lame-encoder) $(vopt_enable mpcdec mpc)
|
|
|
|
$(vopt_enable pulseaudio pulse) $(vopt_enable wavpack)"
|
2013-08-19 09:02:30 +02:00
|
|
|
hostmakedepends="pkg-config"
|
2013-10-30 07:44:18 +01:00
|
|
|
makedepends="
|
|
|
|
ffmpeg-devel>=2.1 libmodplug-devel libmad-devel libcurl-devel faad2-devel
|
2014-10-12 09:04:27 +02:00
|
|
|
sqlite-devel libmms-devel avahi-glib-libs-devel libid3tag-devel boost-devel
|
2014-10-15 11:12:39 +02:00
|
|
|
yajl-devel>=2.0.4 libogg-devel libflac-devel libsoup-devel bzip2-devel icu-devel>=54
|
2013-08-19 09:02:30 +02:00
|
|
|
libmikmod-devel libsndfile-devel alsa-lib-devel mpg123-devel libsamplerate-devel
|
2015-01-31 11:20:05 +01:00
|
|
|
libcdio-paranoia-devel zziplib-devel libmpdclient-devel opus-devel samba-devel libnfs-devel
|
2014-11-04 12:19:43 +01:00
|
|
|
libupnp-devel $(vopt_if jack jack-devel) $(vopt_if lame lame-devel)
|
|
|
|
$(vopt_if mpcdec libmpcdec-devel) $(vopt_if pulseaudio pulseaudio-devel)
|
|
|
|
$(vopt_if wavpack wavpack-devel)"
|
2014-01-01 16:10:11 +01:00
|
|
|
conf_files="/etc/mpd.conf"
|
|
|
|
system_accounts="mpd"
|
|
|
|
mpd_homedir="/var/lib/mpd"
|
|
|
|
make_dirs="/var/lib/mpd/playlists 0755 mpd mpd"
|
2013-08-19 09:02:30 +02:00
|
|
|
short_desc="Flexible, powerful, server-side application for playing music"
|
|
|
|
maintainer="Juan RP <xtraeme@gmail.com>"
|
2014-08-12 09:29:28 +02:00
|
|
|
license="GPL-2"
|
2013-08-19 09:02:30 +02:00
|
|
|
homepage="http://www.musicpd.org/"
|
2014-10-20 15:42:53 +02:00
|
|
|
distfiles="http://www.musicpd.org/download/mpd/${version%.*}/mpd-${version}.tar.xz"
|
2015-02-08 09:25:38 +01:00
|
|
|
checksum=47851423053cd38cfad65be5985b41b7cd5bdbe8d0d13378e11748a28b19f26f
|
2013-08-19 09:02:30 +02:00
|
|
|
|
2013-11-09 09:28:41 +01:00
|
|
|
# Package build options
|
2014-05-20 13:50:20 +02:00
|
|
|
build_options="jack lame mpcdec pulseaudio systemd wavpack"
|
2014-07-28 17:26:47 +02:00
|
|
|
build_options_default="pulseaudio"
|
2013-11-09 09:28:41 +01:00
|
|
|
|
2014-05-20 13:50:20 +02:00
|
|
|
if [ "$build_option_systemd" ]; then
|
2014-07-31 08:29:05 +02:00
|
|
|
configure_args+=" --enable-systemd-daemon --with-systemdsystemunitdir=/usr/lib/systemd/system"
|
2014-05-20 13:50:20 +02:00
|
|
|
makedepends+=" systemd-devel"
|
2014-07-31 08:29:05 +02:00
|
|
|
systemd_services="mpd.service on"
|
2014-05-20 13:50:20 +02:00
|
|
|
else
|
|
|
|
configure_args+=" --disable-systemd-daemon"
|
|
|
|
fi
|
|
|
|
|
2014-08-12 09:29:28 +02:00
|
|
|
pre_configure() {
|
|
|
|
sed -i '/^doc_DATA =/s,doc/mpdconf.example,,' Makefile.in
|
|
|
|
}
|
2014-07-31 08:29:05 +02:00
|
|
|
post_install() {
|
2014-08-12 09:29:28 +02:00
|
|
|
vconf doc/mpdconf.example mpd.conf
|
|
|
|
vsconf doc/mpdconf.example
|
2014-07-31 08:29:05 +02:00
|
|
|
sed \
|
|
|
|
-e '/^#playlist_directory/c playlist_directory "/var/lib/mpd/playlists"' \
|
|
|
|
-e '/^#db_file/c db_file "/var/lib/mpd/mpd.db"' \
|
|
|
|
-e '/^#pid_file/c pid_file "/run/mpd/mpd.pid"' \
|
|
|
|
-e '/^#state_file/c state_file "/var/lib/mpd/mpdstate"' \
|
|
|
|
-e '/^#user/c user "mpd"' \
|
|
|
|
-i ${DESTDIR}/etc/mpd.conf
|
|
|
|
|
2014-10-13 17:32:36 +02:00
|
|
|
vsv mpd
|
|
|
|
|
2014-07-31 08:29:05 +02:00
|
|
|
if [ "$build_option_systemd" ]; then
|
|
|
|
vinstall ${FILESDIR}/tmpfiles.d 644 usr/lib/tmpfiles.d mpd.conf
|
2014-09-29 09:23:39 +02:00
|
|
|
install -Dm644 ${DESTDIR}/usr/lib/systemd/{system,user}/mpd.service
|
|
|
|
sed '/\[Service\]/a User=mpd' -i ${DESTDIR}/usr/lib/systemd/system/mpd.service
|
|
|
|
sed '/WantedBy=/c WantedBy=default.target' -i ${DESTDIR}/usr/lib/systemd/{system,user}/mpd.service
|
2014-07-31 08:29:05 +02:00
|
|
|
fi
|
|
|
|
}
|