transmission: use new termux_git_clone_src function, specify branch

This commit is contained in:
Henrik Grimler 2020-07-17 14:15:31 +02:00
parent ca34d7345d
commit 0f5cf18c69

View File

@ -2,10 +2,9 @@ TERMUX_PKG_HOMEPAGE=https://transmissionbt.com/
TERMUX_PKG_DESCRIPTION="Easy, lean and powerful BitTorrent client"
TERMUX_PKG_LICENSE="MIT"
TERMUX_PKG_VERSION=3.00
TERMUX_PKG_GIT_BRANCH=$TERMUX_PKG_VERSION
TERMUX_PKG_REVISION=2
TERMUX_PKG_SRCURL=https://github.com/transmission/transmission.git
# lint-packages complains if SHA256 is not set
TERMUX_PKG_SHA256=SKIP_CHECKSUM
TERMUX_PKG_DEPENDS="libcurl, libevent, miniupnpc, openssl"
TERMUX_PKG_EXTRA_CONFIGURE_ARGS="--without-gtk --enable-lightweight --cache-file=termux_configure.cache"
# transmission already puts timestamps in the info printed to stdout so no need for svlogd -tt,
@ -15,26 +14,6 @@ TERMUX_PKG_SERVICE_SCRIPT=(
"transmission/log" 'mkdir -p "$LOGDIR/sv/transmission"\nexec svlogd "$LOGDIR/sv/transmission"'
)
termux_step_extract_package() {
local CHECKED_OUT_FOLDER=$TERMUX_PKG_CACHEDIR/checkout-$TERMUX_PKG_VERSION
if [ ! -d $CHECKED_OUT_FOLDER ]; then
local TMP_CHECKOUT=$TERMUX_PKG_TMPDIR/tmp-checkout
rm -Rf $TMP_CHECKOUT
mkdir -p $TMP_CHECKOUT
git clone --depth 1 \
--branch $TERMUX_PKG_VERSION \
$TERMUX_PKG_SRCURL \
$TMP_CHECKOUT
cd $TMP_CHECKOUT
git submodule update --init --recursive
mv $TMP_CHECKOUT $CHECKED_OUT_FOLDER
fi
rm -rf $TERMUX_PKG_SRCDIR
cp -Rf $CHECKED_OUT_FOLDER $TERMUX_PKG_SRCDIR
}
termux_step_pre_configure() {
CFLAGS+=" -D_POSIX_C_SOURCE=200809L"
./autogen.sh