mirror of
https://github.com/ivabus/pantry
synced 2024-11-10 02:25:18 +03:00
+sing-box.app (#4294)
* new file: projects/sing-box.sagernet.org/config.json new file: projects/sing-box.sagernet.org/package.yml * rename * go version --------- Co-authored-by: Jacob Heider <jacob@pkgx.dev>
This commit is contained in:
parent
af708fd95d
commit
e50fb97030
8
projects/sing-box.app/config.json
Normal file
8
projects/sing-box.app/config.json
Normal file
|
@ -0,0 +1,8 @@
|
||||||
|
{
|
||||||
|
"log": {
|
||||||
|
"disabled": false,
|
||||||
|
"level": "info",
|
||||||
|
"output": "box.log",
|
||||||
|
"timestamp": true
|
||||||
|
}
|
||||||
|
}
|
40
projects/sing-box.app/package.yml
Normal file
40
projects/sing-box.app/package.yml
Normal file
|
@ -0,0 +1,40 @@
|
||||||
|
distributable:
|
||||||
|
url: https://github.com/SagerNet/sing-box/archive/v{{version}}.tar.gz
|
||||||
|
strip-components: 1
|
||||||
|
display-name: sing-box
|
||||||
|
versions:
|
||||||
|
github: SagerNet/sing-box
|
||||||
|
build:
|
||||||
|
dependencies:
|
||||||
|
go.dev: ^1.20
|
||||||
|
script:
|
||||||
|
- go build $GO_ARGS -ldflags="$LDFLAGS" ./cmd/sing-box
|
||||||
|
env:
|
||||||
|
GO_ARGS:
|
||||||
|
- -trimpath
|
||||||
|
- -o="{{prefix}}/bin/sing-box"
|
||||||
|
LDFLAGS:
|
||||||
|
- -s
|
||||||
|
- -w
|
||||||
|
- -X github.com/sagernet/sing-box/constant.Version={{version}}
|
||||||
|
linux:
|
||||||
|
LDFLAGS:
|
||||||
|
- -buildmode=pie
|
||||||
|
provides:
|
||||||
|
- bin/sing-box
|
||||||
|
test:
|
||||||
|
dependencies:
|
||||||
|
linux:
|
||||||
|
gitlab.com/procps-ng/procps: '*'
|
||||||
|
script:
|
||||||
|
- sing-box version | grep {{version}}
|
||||||
|
- sing-box check -c $PWD/config.json
|
||||||
|
- sing-box run &
|
||||||
|
- sleep 1
|
||||||
|
- cat box.log | grep 'sing-box started'
|
||||||
|
- $KILL sing-box
|
||||||
|
env:
|
||||||
|
darwin:
|
||||||
|
KILL: killall
|
||||||
|
linux:
|
||||||
|
KILL: pkill
|
Loading…
Reference in a new issue