Files
termux-packages/packages/clash/build.sh
termux-pacman-bot 81aba4366f clash: update to 1.11.8
This commit has been automatically submitted by Github Actions.
2022-08-26 18:27:04 +00:00

30 lines
902 B
Bash

TERMUX_PKG_HOMEPAGE=https://github.com/Dreamacro/clash
TERMUX_PKG_DESCRIPTION="A rule-based tunnel in Go"
TERMUX_PKG_LICENSE="GPL-3.0"
TERMUX_PKG_MAINTAINER="Philipp Schmitt <philipp@schmitt.co>"
TERMUX_PKG_VERSION="1.11.8"
TERMUX_PKG_SRCURL="https://github.com/Dreamacro/clash/archive/refs/tags/v${TERMUX_PKG_VERSION}.tar.gz"
TERMUX_PKG_SHA256=573fcf59648a4eee6ac8cd0a0d4717cc55f350beb866923749d343f17ff77f11
TERMUX_PKG_BUILD_IN_SRC=true
TERMUX_PKG_AUTO_UPDATE=true
termux_step_make() {
termux_setup_golang
mkdir ./gopath
export GOPATH="$PWD/gopath"
GOBUILD=CGO_ENABLED=0 \
go build \
-trimpath \
-ldflags "-X 'github.com/Dreamacro/clash/constant.Version=${TERMUX_PKG_VERSION}'
-X 'github.com/Dreamacro/clash/constant.BuildTime=$(date -u)'
-w -s -buildid='" \
-o "clash.bin" \
main.go
}
termux_step_make_install() {
mv ./clash.bin "${TERMUX_PREFIX}/bin/clash"
}