void-packages/srcpkgs/mpd/template

95 lines
2.8 KiB
Text
Raw Normal View History

2013-08-19 07:02:30 +00:00
# Template file for 'mpd'
pkgname=mpd
2014-07-31 06:29:05 +00:00
version=0.18.12
2014-08-12 07:29:28 +00:00
revision=2
2013-08-19 07:02:30 +00:00
build_style=gnu-configure
2013-10-30 06:46:09 +00:00
configure_args="
--enable-soundcloud --enable-pipe-output --disable-twolame-encoder
2014-07-31 06:29:05 +00:00
--disable-sidplay --enable-bzip2 --enable-zzip"
2013-08-19 07:02:30 +00:00
hostmakedepends="pkg-config"
2013-10-30 06:44:18 +00:00
makedepends="
ffmpeg-devel>=2.1 libmodplug-devel libmad-devel libcurl-devel faad2-devel
sqlite-devel libmms-devel avahi-glib-libs-devel libid3tag-devel
yajl-devel>=2.0.4 libogg-devel libflac-devel libsoup-devel bzip2-devel
2013-08-19 07:02:30 +00:00
libmikmod-devel libsndfile-devel alsa-lib-devel mpg123-devel libsamplerate-devel
libcdio-devel zziplib-devel libmpdclient-devel"
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 07:02:30 +00:00
short_desc="Flexible, powerful, server-side application for playing music"
maintainer="Juan RP <xtraeme@gmail.com>"
2014-08-12 07:29:28 +00:00
license="GPL-2"
2013-08-19 07:02:30 +00:00
homepage="http://www.musicpd.org/"
distfiles="http://www.musicpd.org/download/mpd/${version%.*}/mpd-${version}.tar.xz"
2014-07-31 06:29:05 +00:00
checksum=30cd1f6f396a6433f7f27a6c0ec0de5e061cec6ad1bd2f7de9095c16aac0d86c
2013-08-19 07:02:30 +00:00
# Package build options
build_options="jack lame mpcdec pulseaudio systemd wavpack"
build_options_default="pulseaudio"
if [ "$build_option_jack" ]; then
configure_args+=" --enable-jack"
makedepends+=" jack-devel"
else
configure_args+=" --disable-jack"
fi
if [ "$build_option_lame" ]; then
configure_args+=" --enable-lame-encoder"
makedepends+=" lame-devel"
else
configure_args+=" --disable-lame-encoder"
fi
if [ "$build_option_mpcdec" ]; then
configure_args+=" --enable-mpc"
makedepends+=" libmpcdec-devel"
else
configure_args+=" --disable-mpc"
fi
if [ "$build_option_pulseaudio" ]; then
configure_args+=" --enable-pulse"
makedepends+=" pulseaudio-devel"
else
configure_args+=" --disable-pulse"
fi
if [ "$build_option_systemd" ]; then
2014-07-31 06:29:05 +00:00
configure_args+=" --enable-systemd-daemon --with-systemdsystemunitdir=/usr/lib/systemd/system"
makedepends+=" systemd-devel"
2014-07-31 06:29:05 +00:00
systemd_services="mpd.service on"
else
configure_args+=" --disable-systemd-daemon"
fi
if [ "$build_option_wavpack" ]; then
configure_args+=" --enable-wavpack"
makedepends+=" wavpack-devel"
else
configure_args+=" --disable-wavpack"
fi
2014-07-31 06:29:05 +00:00
2014-08-12 07:29:28 +00:00
pre_configure() {
sed -i '/^doc_DATA =/s,doc/mpdconf.example,,' Makefile.in
}
2014-07-31 06:29:05 +00:00
post_install() {
2014-08-12 07:29:28 +00:00
vconf doc/mpdconf.example mpd.conf
vsconf doc/mpdconf.example
2014-07-31 06:29:05 +00: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
if [ "$build_option_systemd" ]; then
vinstall ${FILESDIR}/tmpfiles.d 644 usr/lib/tmpfiles.d mpd.conf
vmkdir usr/lib/systemd/user
ln -s ../system/mpd.service ${DESTDIR}/usr/lib/systemd/user/mpd.service
fi
}