From 130528f19054447eba53ea7ff5c125af309e47c1 Mon Sep 17 00:00:00 2001 From: Henrik Grimler Date: Mon, 12 Aug 2019 22:02:56 +0200 Subject: [PATCH] mpd: add termux-services script --- packages/mpd/build.sh | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/packages/mpd/build.sh b/packages/mpd/build.sh index 1a6a87c89..477db200a 100644 --- a/packages/mpd/build.sh +++ b/packages/mpd/build.sh @@ -2,7 +2,7 @@ TERMUX_PKG_HOMEPAGE=https://www.musicpd.org TERMUX_PKG_DESCRIPTION="Music player daemon" TERMUX_PKG_LICENSE="GPL-2.0" TERMUX_PKG_VERSION=0.21.13 -TERMUX_PKG_REVISION=1 +TERMUX_PKG_REVISION=2 TERMUX_PKG_SRCURL=https://github.com/MusicPlayerDaemon/MPD/archive/v$TERMUX_PKG_VERSION.tar.gz TERMUX_PKG_SHA256=0c71ff34aa4def30cd931977cbfe3deb6ec815a726b8c5343f1b8e5707136ebf TERMUX_PKG_DEPENDS="libc++, libcurl, libid3tag, libopus, libpulseaudio, libmpdclient, openal-soft, libvorbis, libsqlite, ffmpeg, libmp3lame, libbz2, libogg, libnfs, zlib" @@ -34,6 +34,17 @@ termux_step_pre_configure() { termux_step_post_make_install() { install -Dm600 $TERMUX_PKG_SRCDIR/doc/mpdconf.example $TERMUX_PREFIX/etc/mpd.conf + + # 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 } termux_step_create_debscripts() {