2022-03-06 01:09:07 +01:00
|
|
|
TERMUX_PKG_HOMEPAGE=https://github.com/cloudflare/cloudflared
|
|
|
|
TERMUX_PKG_DESCRIPTION="A tunneling daemon that proxies traffic from the Cloudflare network to your origins"
|
|
|
|
TERMUX_PKG_LICENSE="Apache-2.0"
|
|
|
|
TERMUX_PKG_MAINTAINER="@termux"
|
2022-03-10 22:03:40 +01:00
|
|
|
TERMUX_PKG_VERSION=2022.3.1
|
2022-03-06 01:09:07 +01:00
|
|
|
TERMUX_PKG_SRCURL=https://github.com/cloudflare/cloudflared/archive/refs/tags/${TERMUX_PKG_VERSION}.tar.gz
|
2022-03-10 22:03:40 +01:00
|
|
|
TERMUX_PKG_SHA256=e3459bc83d9749d89d93e6ab2dcbc51872568d1fb144d7ab7d3656b29785e364
|
2022-03-06 01:09:07 +01:00
|
|
|
TERMUX_PKG_BUILD_IN_SRC=true
|
|
|
|
|
|
|
|
termux_step_make() {
|
|
|
|
termux_setup_golang
|
|
|
|
|
|
|
|
go mod init || :
|
|
|
|
go mod tidy
|
|
|
|
go mod vendor
|
|
|
|
|
|
|
|
local _VERSION=$TERMUX_PKG_VERSION
|
|
|
|
local _DATE=$(date -u '+%Y-%m-%d-%H%M UTC')
|
|
|
|
go build -ldflags "-X \"main.Version=$_VERSION\" -X \"main.BuildTime=$_DATE\"" \
|
|
|
|
./cmd/cloudflared
|
|
|
|
}
|
|
|
|
|
|
|
|
termux_step_make_install() {
|
|
|
|
install -Dm700 -t $TERMUX_PREFIX/bin cloudflared
|
|
|
|
}
|