0
0
mirror of https://github.com/termux/termux-packages.git synced 2025-03-04 09:28:54 +00:00
Termux Github Actions 677cb2a4dc bump(main/sing-box): 1.11.4
This commit has been automatically submitted by Github Actions.
2025-02-24 19:23:34 +00:00

48 lines
1.5 KiB
Bash

TERMUX_PKG_HOMEPAGE=https://sing-box.sagernet.org
TERMUX_PKG_DESCRIPTION="The universal proxy platform"
TERMUX_PKG_LICENSE="GPL-3.0"
TERMUX_PKG_MAINTAINER="kay9925@outlook.com"
TERMUX_PKG_VERSION="1.11.4"
TERMUX_PKG_SRCURL="https://github.com/SagerNet/sing-box/archive/refs/tags/v${TERMUX_PKG_VERSION}.tar.gz"
TERMUX_PKG_SHA256=633e40e2a64937069ada9d8d96dec1a5d735095d44eb3cbea105ee05f4616fc6
TERMUX_PKG_BUILD_IN_SRC=true
TERMUX_PKG_AUTO_UPDATE=true
termux_step_make() {
termux_setup_golang
local tags="with_gvisor,with_quic,with_wireguard,with_utls,with_clash_api"
local ldflags="\
-w -s \
-X 'github.com/sagernet/sing-box/constant.Version=${TERMUX_PKG_VERSION}' \
"
export CGO_ENABLED=1
go build \
-trimpath \
-tags "${tags}" \
-ldflags="${ldflags}" \
-o "${TERMUX_PKG_NAME}" \
./cmd/sing-box
}
termux_step_make_install() {
install -Dm700 ./${TERMUX_PKG_NAME} ${TERMUX_PREFIX}/bin
install -Dm644 /dev/null "${TERMUX_PREFIX}/share/bash-completion/completions/sing-box.bash"
install -Dm644 /dev/null "${TERMUX_PREFIX}/share/fish/vendor_completions.d/sing-box.fish"
install -Dm644 /dev/null "${TERMUX_PREFIX}/share/zsh/site-functions/_sing-box"
}
termux_step_create_debscripts() {
cat <<- EOF > ./postinst
#!${TERMUX_PREFIX}/bin/sh
sing-box completion bash > ${TERMUX_PREFIX}/share/bash-completion/completions/sing-box.bash
sing-box completion fish > ${TERMUX_PREFIX}/share/fish/vendor_completions.d/sing-box.fish
sing-box completion zsh > ${TERMUX_PREFIX}/share/zsh/site-functions/_sing-box
EOF
}