From b84eeedd7e7bc3fea04cc0f2ad28f8cd35c4a4ef Mon Sep 17 00:00:00 2001 From: "termux-actions[bot]" Date: Thu, 3 Feb 2022 15:42:01 +0000 Subject: [PATCH] packages/hummin --- packages/hummin/build.sh | 33 +++++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) create mode 100644 packages/hummin/build.sh diff --git a/packages/hummin/build.sh b/packages/hummin/build.sh new file mode 100644 index 0000000000..5ace98fe42 --- /dev/null +++ b/packages/hummin/build.sh @@ -0,0 +1,33 @@ +TERMUX_PKG_HOMEPAGE=https://trantor.is/ +TERMUX_PKG_DESCRIPTION="Command line client for the imperial library of trantor" +TERMUX_PKG_LICENSE="WTFPL" +TERMUX_PKG_MAINTAINER="@termux" +_COMMIT=b117aef9c64348b1ef262a99316f1e51328efe18 +TERMUX_PKG_VERSION=2021.05.18 +TERMUX_PKG_SRCURL=https://gitlab.com/trantor/hummin.git +TERMUX_PKG_GIT_BRANCH=master +TERMUX_PKG_BUILD_IN_SRC=true + +termux_step_post_get_source() { + git fetch --unshallow + git checkout $_COMMIT + + local version="$(git log -1 --format=%cs | sed 's/-/./g')" + if [ "$version" != "$TERMUX_PKG_VERSION" ]; then + echo -n "ERROR: The specified version \"$TERMUX_PKG_VERSION\"" + echo " is different from what is expected to be: \"$version\"" + return 1 + fi +} + +termux_step_make() { + termux_setup_golang + + go mod init || : + go mod tidy + go build +} + +termux_step_make_install() { + install -Dm700 -t $TERMUX_PREFIX/bin hummin +}