0
0
mirror of https://github.com/termux/termux-packages.git synced 2025-09-22 16:49:37 +00:00
Files
termux-packages/packages/kcptun/build.sh
Termux Github Actions 8dcaf277bd bump(main/kcptun): 20250427
This commit has been automatically submitted by Github Actions.
2025-04-27 12:10:40 +00:00

27 lines
1.0 KiB
Bash

TERMUX_PKG_HOMEPAGE=https://github.com/xtaci/kcptun
TERMUX_PKG_DESCRIPTION="A Stable & Secure Tunnel based on KCP with N:M multiplexing and FEC"
TERMUX_PKG_LICENSE="MIT"
TERMUX_PKG_MAINTAINER="@termux"
TERMUX_PKG_VERSION="20250427"
TERMUX_PKG_SRCURL=https://github.com/xtaci/kcptun/archive/refs/tags/v${TERMUX_PKG_VERSION}.tar.gz
TERMUX_PKG_SHA256=345f3df927d9496e1266699e4ab8bea1b559b3874ebea1e240b4cfd3578d2561
TERMUX_PKG_REPLACES="kcptun-client, kcptun-server"
TERMUX_PKG_BREAKS="kcptun-client, kcptun-server"
TERMUX_PKG_BUILD_IN_SRC=true
TERMUX_PKG_AUTO_UPDATE=true
termux_step_make() {
termux_setup_golang
LDFLAGS="-X main.VERSION=${TERMUX_PKG_VERSION#*:} -s -w"
GCFLAGS=""
go build -mod=vendor -ldflags "$LDFLAGS" -gcflags "$GCFLAGS" -o kcptun-client github.com/xtaci/kcptun/client
go build -mod=vendor -ldflags "$LDFLAGS" -gcflags "$GCFLAGS" -o kcptun-server github.com/xtaci/kcptun/server
}
termux_step_make_install() {
install -Dm700 -t "${TERMUX_PREFIX}"/bin kcptun-client
install -Dm700 -t "${TERMUX_PREFIX}"/bin kcptun-server
}