88 lines
2.7 KiB
Plaintext
88 lines
2.7 KiB
Plaintext
# Template file for 'mpd'
|
|
pkgname=mpd
|
|
version=0.18.11
|
|
revision=3
|
|
build_style=gnu-configure
|
|
configure_args="
|
|
--enable-soundcloud --enable-pipe-output --disable-twolame-encoder
|
|
--disable-sidplay --with-systemdsystemunitdir=/usr/lib/systemd/system
|
|
--enable-bzip2 --enable-zzip LDFLAGS="
|
|
hostmakedepends="pkg-config"
|
|
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
|
|
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"
|
|
systemd_services="mpd.service on"
|
|
mpd_homedir="/var/lib/mpd"
|
|
make_dirs="/var/lib/mpd/playlists 0755 mpd mpd"
|
|
short_desc="Flexible, powerful, server-side application for playing music"
|
|
maintainer="Juan RP <xtraeme@gmail.com>"
|
|
license="GPL-3"
|
|
homepage="http://www.musicpd.org/"
|
|
distfiles="http://www.musicpd.org/download/mpd/${version%.*}/mpd-${version}.tar.xz"
|
|
checksum=f0466a92008ba1a030aebef7ee3cf23f3a56a5764aa36f3a4058d2f336df2ad7
|
|
|
|
post_install() {
|
|
vinstall doc/mpdconf.example 644 etc mpd.conf
|
|
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
|
|
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
|
|
}
|
|
|
|
# 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
|
|
configure_args+=" --enable-systemd-daemon"
|
|
makedepends+=" systemd-devel"
|
|
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
|