2020-06-15 11:39:37 +02:00
|
|
|
TERMUX_PKG_HOMEPAGE=https://github.com/mvdan/sh
|
|
|
|
TERMUX_PKG_DESCRIPTION="A shell parser and formatter"
|
|
|
|
TERMUX_PKG_LICENSE="BSD 3-Clause"
|
2020-12-20 14:16:34 +01:00
|
|
|
TERMUX_PKG_MAINTAINER="@termux"
|
2021-03-17 11:37:29 +01:00
|
|
|
TERMUX_PKG_VERSION=3.2.4
|
2020-06-15 11:39:37 +02:00
|
|
|
TERMUX_PKG_SRCURL=https://github.com/mvdan/sh/archive/v${TERMUX_PKG_VERSION}.tar.gz
|
2021-03-17 11:37:29 +01:00
|
|
|
TERMUX_PKG_SHA256=cab10a689c09689175774c78d7c38e594539c18d4581610bb7927d299d0435d8
|
2020-06-15 11:39:37 +02:00
|
|
|
|
|
|
|
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
|
|
|
|
}
|