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"
|
2019-12-21 15:49:26 +01:00
|
|
|
TERMUX_PKG_VERSION=0.21.17
|
2017-05-18 00:23:11 +02:00
|
|
|
TERMUX_PKG_SRCURL=https://github.com/MusicPlayerDaemon/MPD/archive/v$TERMUX_PKG_VERSION.tar.gz
|
2019-12-21 15:49:26 +01:00
|
|
|
TERMUX_PKG_SHA256=29ebb534f2a3068d2b51c7e8848f7e7fc1e787f999d12c0992c1fb0de320899c
|
2019-10-07 15:27:31 +02:00
|
|
|
TERMUX_PKG_DEPENDS="libc++, libcurl, 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"
|
2017-05-18 14:03:47 +02:00
|
|
|
TERMUX_PKG_EXTRA_CONFIGURE_ARGS="
|
2019-01-03 00:49:06 +01:00
|
|
|
-Dalsa=disabled
|
|
|
|
-Dao=disabled
|
|
|
|
-Depoll=false
|
|
|
|
-Dexpat=disabled
|
|
|
|
-Diconv=disabled
|
|
|
|
-Dicu=disabled
|
|
|
|
-Dmad=disabled
|
|
|
|
-Dpcre=disabled
|
|
|
|
-Dsndio=disabled
|
2017-05-18 14:03:47 +02:00
|
|
|
"
|
2019-08-21 21:39:17 +02:00
|
|
|
TERMUX_PKG_CONFFILES="etc/mpd.conf var/service/mpd/run var/service/mpd/log/run"
|
2017-05-18 14:03:47 +02:00
|
|
|
|
2017-05-18 00:23:11 +02:00
|
|
|
termux_step_pre_configure() {
|
2019-08-08 14:25:54 +02:00
|
|
|
# Certain packages are not safe to build on device because their
|
|
|
|
# build.sh script deletes specific files in $TERMUX_PREFIX.
|
2019-08-12 17:28:41 +02:00
|
|
|
if $TERMUX_ON_DEVICE_BUILD; then
|
2019-08-08 14:25:54 +02:00
|
|
|
termux_error_exit "Package '$TERMUX_PKG_NAME' is not safe for on-device builds."
|
|
|
|
fi
|
|
|
|
|
2017-05-18 00:23:11 +02:00
|
|
|
CXXFLAGS+=" -DTERMUX -UANDROID"
|
2019-05-18 03:22:19 +02:00
|
|
|
LDFLAGS+=" -llog -lOpenSLES"
|
2019-01-03 00:49:06 +01:00
|
|
|
rm -f $TERMUX_PREFIX/etc/mpd.conf
|
2017-05-18 00:23:11 +02:00
|
|
|
}
|
2017-05-18 14:03:47 +02:00
|
|
|
|
2019-02-08 10:37:29 +01:00
|
|
|
termux_step_post_make_install() {
|
2019-04-09 19:13:58 +02:00
|
|
|
install -Dm600 $TERMUX_PKG_SRCDIR/doc/mpdconf.example $TERMUX_PREFIX/etc/mpd.conf
|
2019-08-12 22:02:56 +02:00
|
|
|
|
|
|
|
# Setup mpd service script
|
|
|
|
mkdir -p $TERMUX_PREFIX/var/service
|
|
|
|
cd $TERMUX_PREFIX/var/service
|
|
|
|
mkdir -p mpd/log
|
|
|
|
echo "#!$TERMUX_PREFIX/bin/sh" > mpd/run
|
|
|
|
echo 'if [ -f "$HOME/.mpd/mpd.conf" ]; then CONFIG="$HOME/.mpd/mpd.conf"; else CONFIG="$PREFIX/etc/mpd.conf"; fi' >> mpd/run
|
|
|
|
echo 'exec mpd --stdout --no-daemon $CONFIG 2>&1' >> mpd/run
|
|
|
|
chmod +x mpd/run
|
|
|
|
touch mpd/down
|
|
|
|
ln -sf $PREFIX/share/termux-services/svlogger mpd/log/run
|
2017-05-18 00:23:11 +02:00
|
|
|
}
|
2017-05-18 14:03:47 +02:00
|
|
|
|
2017-05-18 00:23:11 +02:00
|
|
|
termux_step_create_debscripts() {
|
2017-08-15 07:09:08 +02:00
|
|
|
echo "#!$TERMUX_PREFIX/bin/sh" > postinst
|
2017-05-18 14:03:47 +02:00
|
|
|
echo 'mkdir -p $HOME/.mpd/playlists' >> postinst
|
2017-05-18 00:23:11 +02:00
|
|
|
}
|