Merge pull request #4772 from termux/service-scripts

Add service scripts for mpdscribble and apache2
This commit is contained in:
Henrik Grimler 2020-01-08 21:47:01 +01:00 committed by GitHub
commit ed08aa45e3
4 changed files with 11 additions and 4 deletions

View File

@ -2,7 +2,7 @@ TERMUX_PKG_HOMEPAGE=https://httpd.apache.org
TERMUX_PKG_DESCRIPTION="Apache Web Server"
TERMUX_PKG_LICENSE="Apache-2.0"
TERMUX_PKG_VERSION=2.4.41
TERMUX_PKG_REVISION=2
TERMUX_PKG_REVISION=3
TERMUX_PKG_SRCURL=https://www.apache.org/dist/httpd/httpd-$TERMUX_PKG_VERSION.tar.bz2
TERMUX_PKG_SHA256=133d48298fe5315ae9366a0ec66282fa4040efa5d566174481077ade7d18ea40
TERMUX_PKG_DEPENDS="apr, apr-util, pcre, openssl, libcrypt, libandroid-support, libnghttp2, libexpat, libuuid, zlib"
@ -71,6 +71,7 @@ ac_cv_have_threadsafe_pollset=no
TERMUX_PKG_BUILD_IN_SRC=true
TERMUX_PKG_RM_AFTER_INSTALL="share/apache2/manual etc/apache2/original share/man/man8/suexec.8 libexec/httpd.exp"
TERMUX_PKG_EXTRA_MAKE_ARGS="-s"
TERMUX_PKG_SERVICE_SCRIPT=("httpd" 'exec httpd -DNO_DETACH 2>&1')
termux_step_pre_configure() {
# Certain packages are not safe to build on device because their

View File

@ -3,11 +3,17 @@ TERMUX_PKG_DESCRIPTION="A Music Player Daemon (MPD) client which submits informa
TERMUX_PKG_LICENSE="GPL-2.0"
TERMUX_PKG_MAINTAINER="Henrik Grimler @Grimler91"
TERMUX_PKG_VERSION=0.22
TERMUX_PKG_REVISION=3
TERMUX_PKG_REVISION=4
TERMUX_PKG_SRCURL=https://github.com/MusicPlayerDaemon/mpdscribble/archive/v${TERMUX_PKG_VERSION}.tar.gz
TERMUX_PKG_SHA256=9f6d73e1d0d44bf782c199732acc91bb07efc1c02ae04d037d711860dd8e4012
TERMUX_PKG_DEPENDS="libcurl, mpd, libmpdclient, glib"
TERMUX_PKG_CONFFILES="etc/mpdscribble.conf"
# mpdscribble already puts timestamps in the info printed to stdout so no need for svlogd -tt,
# therefore we override the mpdscribble/log run script
TERMUX_PKG_SERVICE_SCRIPT=(
"mpdscribble" 'if [ -f "$HOME/.mpdscribble/mpdscribble.conf" ]; then CONFIG="$HOME/.mpdscribble/mpdscribble.conf"; else CONFIG="$PREFIX/etc/mpdscribble.conf"; fi\nexec mpdscribble -D --log /proc/self/fd/1 --conf $CONFIG'
"mpdscribble/log" 'mkdir -p "$LOGDIR/sv/mpdscribble"\nexec svlogd "$LOGDIR/sv/mpdscribble"'
)
termux_step_pre_configure () {
NOCONFIGURE=1 ./autogen.sh

View File

@ -2,7 +2,7 @@ TERMUX_PKG_HOMEPAGE=https://transmissionbt.com/
TERMUX_PKG_DESCRIPTION="Easy, lean and powerful BitTorrent client"
TERMUX_PKG_LICENSE="MIT"
TERMUX_PKG_VERSION=2.94
TERMUX_PKG_REVISION=5
TERMUX_PKG_REVISION=6
TERMUX_PKG_SRCURL=https://github.com/transmission/transmission/archive/${TERMUX_PKG_VERSION}.tar.gz
TERMUX_PKG_SHA256=440c2fd0f89b1ab59d8a4b79ecd7bffd61bc000e36fb5b6c8e88142a4fadbb1f
TERMUX_PKG_DEPENDS="libcurl, libevent, miniupnpc, openssl"

View File

@ -25,10 +25,10 @@ termux_step_install_service_scripts() {
fi
chmod +x ${TERMUX_PKG_SERVICE_SCRIPT[$i]}/run
touch ${TERMUX_PKG_SERVICE_SCRIPT[$i]}/down
# Avoid creating service/<service>/log/log/
if [ "${TERMUX_PKG_SERVICE_SCRIPT[$i]: -4}" != "/log" ]; then
touch ${TERMUX_PKG_SERVICE_SCRIPT[$i]}/down
mkdir -p ${TERMUX_PKG_SERVICE_SCRIPT[$i]}/log
ln -sf $TERMUX_PREFIX/share/termux-services/svlogger ${TERMUX_PKG_SERVICE_SCRIPT[$i]}/log/run