2020-11-06 22:30:24 +01:00
|
|
|
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>"
|
2021-09-20 18:18:58 +02:00
|
|
|
TERMUX_PKG_VERSION=1.7.1
|
2021-10-06 13:26:37 +02:00
|
|
|
TERMUX_PKG_REVISION=2
|
2020-11-06 22:30:24 +01:00
|
|
|
TERMUX_PKG_SRCURL="https://github.com/Dreamacro/clash/archive/v${TERMUX_PKG_VERSION}.tar.gz"
|
2021-09-20 18:18:58 +02:00
|
|
|
TERMUX_PKG_SHA256=18c2ef10df608392435a1277d3f2e256c65bec3662bf0a6c325f02be6deb4fce
|
2020-11-06 22:30:24 +01:00
|
|
|
TERMUX_PKG_BUILD_IN_SRC=true
|
|
|
|
|
|
|
|
termux_step_make() {
|
|
|
|
termux_setup_golang
|
|
|
|
|
|
|
|
mkdir ./gopath
|
|
|
|
export GOPATH="$PWD/gopath"
|
2021-07-10 16:00:18 +02:00
|
|
|
|
2020-11-06 22:30:24 +01:00
|
|
|
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"
|
|
|
|
}
|