termux-packages/packages/shfmt/build.sh
Termux Github Actions ef0d472da2 shfmt: update to 3.3.0
This commit has been automatically submitted by Github Actions.
2021-06-16 12:55:29 +00:00

23 lines
706 B
Bash

TERMUX_PKG_HOMEPAGE=https://github.com/mvdan/sh
TERMUX_PKG_DESCRIPTION="A shell parser and formatter"
TERMUX_PKG_LICENSE="BSD 3-Clause"
TERMUX_PKG_MAINTAINER="@termux"
TERMUX_PKG_VERSION=3.3.0
TERMUX_PKG_SRCURL=https://github.com/mvdan/sh/archive/v${TERMUX_PKG_VERSION}.tar.gz
TERMUX_PKG_SHA256=9bcdbbfd2f6afc4e885838683396483edcd87ef7eb80faa7def6ff0a10e3be4a
termux_step_make_install() {
cd "$TERMUX_PKG_SRCDIR"
termux_setup_golang
export GOPATH="$TERMUX_PKG_BUILDDIR"
mkdir -p "$GOPATH/src/github.com/mvdan"
ln -sf "$TERMUX_PKG_SRCDIR" "$GOPATH/src/github.com/mvdan/sh"
go build -modcacherw \
-ldflags "-X main.version=$TERMUX_PKG_VERSION" \
-o "$TERMUX_PREFIX/bin/shfmt" \
./cmd/shfmt
}