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() { diff --git a/packages/tor/build.sh b/packages/tor/build.sh index 11f80ce4d..9186d7fe8 100644 --- a/packages/tor/build.sh +++ b/packages/tor/build.sh @@ -3,7 +3,7 @@ TERMUX_PKG_DESCRIPTION="The Onion Router anonymizing overlay network" TERMUX_PKG_LICENSE="BSD 3-Clause" TERMUX_PKG_MAINTAINER="Vishal Biswas @vishalbiswas" TERMUX_PKG_VERSION=0.4.0.5 -TERMUX_PKG_REVISION=2 +TERMUX_PKG_REVISION=3 TERMUX_PKG_SRCURL=https://www.torproject.org/dist/tor-$TERMUX_PKG_VERSION.tar.gz TERMUX_PKG_SHA256=b5a2cbf0dcd3f1df2675dbd5ec10bbe6f8ae995c41b68cebe2bc95bffc90696e TERMUX_PKG_DEPENDS="libevent, openssl, liblzma, zlib" @@ -17,4 +17,14 @@ termux_step_pre_configure() { termux_step_post_make_install() { # use default config mv "$TERMUX_PREFIX/etc/tor/torrc.sample" "$TERMUX_PREFIX/etc/tor/torrc" + + # Setup tor service script + mkdir -p $TERMUX_PREFIX/var/service + cd $TERMUX_PREFIX/var/service + mkdir -p tor/log + echo "#!$TERMUX_PREFIX/bin/sh" > tor/run + echo 'exec tor 2>&1' >> tor/run + chmod +x tor/run + touch tor/down + ln -sf $PREFIX/share/termux-services/svlogger tor/log/run } diff --git a/packages/transmission/build.sh b/packages/transmission/build.sh index d34dddd59..360f2c856 100644 --- a/packages/transmission/build.sh +++ b/packages/transmission/build.sh @@ -3,7 +3,7 @@ TERMUX_PKG_DESCRIPTION="Easy, lean and powerful BitTorrent client" TERMUX_PKG_LICENSE="MIT" TERMUX_PKG_DEPENDS="libevent, openssl, libcurl" TERMUX_PKG_VERSION=2.94 -TERMUX_PKG_REVISION=1 +TERMUX_PKG_REVISION=2 TERMUX_PKG_SRCURL=https://github.com/transmission/transmission/archive/${TERMUX_PKG_VERSION}.tar.gz TERMUX_PKG_SHA256=440c2fd0f89b1ab59d8a4b79ecd7bffd61bc000e36fb5b6c8e88142a4fadbb1f TERMUX_PKG_EXTRA_CONFIGURE_ARGS="--disable-gtk --enable-lightweight --cache-file=termux_configure.cache" @@ -17,3 +17,25 @@ termux_step_pre_configure() { echo "ac_cv_search_getmntent=false" >> termux_configure.cache chmod a-w termux_configure.cache } + +termux_step_post_make_install() { + # Setup transmission service script + mkdir -p $TERMUX_PREFIX/var/service + cd $TERMUX_PREFIX/var/service + mkdir -p transmission/log + echo "#!$TERMUX_PREFIX/bin/sh" > transmission/run + echo 'mkdir -p ~/torrent/torrent-files' >> transmission/run + echo 'mkdir -p ~/torrent/download' >> transmission/run + echo 'exec transmission-daemon \' >> transmission/run + echo ' -f \' >> transmission/run + echo ' -c ~/torrent/torrent-files \' >> transmission/run + echo ' -w ~/torrent/download \' >> transmission/run + echo ' 2>&1' >> transmission/run + chmod +x transmission/run + touch transmission/down + + echo "#!$TERMUX_PREFIX/bin/sh" > transmission/log/run + echo 'mkdir -p "$LOGDIR/sv/transmission"' >> transmission/log/run + echo 'exec svlogd "$LOGDIR/sv/transmission"' >> transmission/log/run + chmod +x transmission/log/run +}