termux-packages/packages/mpd/build.sh

46 lines
1.6 KiB
Bash
Raw Normal View History

2018-02-12 20:19:51 +01:00
TERMUX_PKG_HOMEPAGE=https://www.musicpd.org
TERMUX_PKG_DESCRIPTION="Music player daemon"
2019-01-21 13:53:58 +01:00
TERMUX_PKG_LICENSE="GPL-2.0"
TERMUX_PKG_MAINTAINER="@termux"
2021-06-22 16:32:16 +02:00
TERMUX_PKG_VERSION=0.22.8
2021-10-13 13:41:44 +02:00
TERMUX_PKG_REVISION=3
TERMUX_PKG_SRCURL=https://github.com/MusicPlayerDaemon/MPD/archive/v$TERMUX_PKG_VERSION.tar.gz
2021-06-22 16:32:16 +02:00
TERMUX_PKG_SHA256=08065b26f2d19fea1a4bdf81903511b6d8e1357c5047be43ff2a7c5a495cdb85
TERMUX_PKG_DEPENDS="libc++, libcurl, libexpat, libid3tag, libopus, pulseaudio, libmpdclient, openal-soft, libvorbis, libsqlite, ffmpeg, libmp3lame, libbz2, libogg, libnfs, zlib"
2019-01-07 02:04:31 +01:00
TERMUX_PKG_BUILD_DEPENDS="boost"
TERMUX_PKG_EXTRA_CONFIGURE_ARGS="
2019-01-03 00:49:06 +01:00
-Dalsa=disabled
-Dao=disabled
-Depoll=false
-Diconv=disabled
-Dicu=disabled
-Dmad=disabled
-Dpcre=disabled
-Dsndio=disabled
"
TERMUX_PKG_CONFFILES="etc/mpd.conf"
TERMUX_PKG_SERVICE_SCRIPT=("mpd" "if [ -f \"$TERMUX_ANDROID_HOME/.mpd/mpd.conf\" ]; then CONFIG=\"$TERMUX_ANDROID_HOME/.mpd/mpd.conf\"; else CONFIG=\"$TERMUX_PREFIX/etc/mpd.conf\"; fi\nexec mpd --stdout --no-daemon \$CONFIG 2>&1")
termux_step_pre_configure() {
# Certain packages are not safe to build on device because their
# build.sh script deletes specific files in $TERMUX_PREFIX.
if $TERMUX_ON_DEVICE_BUILD; then
termux_error_exit "Package '$TERMUX_PKG_NAME' is not safe for on-device builds."
fi
CXXFLAGS+=" -DTERMUX -UANDROID"
2019-12-30 01:05:41 +01:00
LDFLAGS+=" -lOpenSLES"
2019-01-03 00:49:06 +01:00
rm -f $TERMUX_PREFIX/etc/mpd.conf
2020-08-09 01:30:56 +02:00
export BOOST_ROOT=$TERMUX_PREFIX
}
termux_step_post_make_install() {
install -Dm600 $TERMUX_PKG_SRCDIR/doc/mpdconf.example $TERMUX_PREFIX/etc/mpd.conf
}
termux_step_create_debscripts() {
2017-08-15 07:09:08 +02:00
echo "#!$TERMUX_PREFIX/bin/sh" > postinst
echo 'mkdir -p $HOME/.mpd/playlists' >> postinst
}