From 21031dde67c6f695c271e2df4a55e279c4760b23 Mon Sep 17 00:00:00 2001 From: Fredrik Fornwall Date: Mon, 10 Apr 2017 22:24:50 +0200 Subject: [PATCH] micro: Add package (fixes #916) --- packages/micro/build.sh | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 packages/micro/build.sh diff --git a/packages/micro/build.sh b/packages/micro/build.sh new file mode 100644 index 000000000..fdfc60832 --- /dev/null +++ b/packages/micro/build.sh @@ -0,0 +1,23 @@ +TERMUX_PKG_HOMEPAGE=https://micro-editor.github.io/ +TERMUX_PKG_DESCRIPTION="Modern and intuitive terminal-based text editor" +TERMUX_PKG_VERSION=1.1.4 +TERMUX_PKG_SHA256=a6b224661ee3657e2e2718a0d69b260087a2514cef354911cce95fd9d684efc2 +TERMUX_PKG_SRCURL=https://github.com/zyedidia/micro/releases/download/v${TERMUX_PKG_VERSION}/micro-${TERMUX_PKG_VERSION}-src.tar.gz +TERMUX_PKG_FOLDERNAME=micro +TERMUX_PKG_BUILD_IN_SRC=yes + +termux_step_make() { + return +} + +termux_step_make_install() { + termux_setup_golang + + local HASH="$(git rev-parse --short HEAD)" + local VERSION="$TERMUX_PKG_VERSION" + local DATE=`date -I` + + go build -ldflags "-s -w -X main.Version=$VERSION -X main.CommitHash=$HASH -X 'main.CompileDate=$DATE'" \ + -o $TERMUX_PREFIX/bin/micro \ + ./cmd/micro +}