blob: 959c4f8d0bf354ad523a11647fa26a45f85056c9 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
|
# Maintainer: adityaphra <aditya.phra@gmail.com>
pkgname="sing-box-beta-bin"
_pkgver="1.5.0-beta.9"
pkgver="${_pkgver/-/.}"
pkgrel="1"
pkgdesc="The universal proxy platform (beta binary version)."
provides=("sing-box")
conflicts=("sing-box" "sing-box-beta" "sing-box-git" "sing-box-bin")
arch=("x86_64" "armv7h" "aarch64")
url="https://github.com/SagerNet/sing-box"
license=("GPL3")
optdepends=("sing-geosite: sing-geosite database"
"sing-geoip: sing-geoip database")
backup=("etc/sing-box/config.json")
source=("sing-box.service"
"sing-box@.service"
"sing-box.sysusers"
"sing-box.tmpfiles"
"config.json")
source_x86_64=("sing-box-$_pkgver-x86_64.tar.gz::$url/releases/download/v$_pkgver/sing-box-$_pkgver-linux-amd64.tar.gz")
source_armv7h=("sing-box-$_pkgver-armv7h.tar.gz::$url/releases/download/v$_pkgver/sing-box-$_pkgver-linux-armv7.tar.gz")
source_aarch64=("sing-box-$_pkgver-aarch64.tar.gz::$url/releases/download/v$_pkgver/sing-box-$_pkgver-linux-arm64.tar.gz")
sha512sums=('b5e5b8dad736b628a2761cc883b7e8439d604b5b1612447020ac7c143747e57acaf7dc8211cb50beb9d727f6d618cbe481874d012837fb3b2f089cd08299e1d2'
'84dbbd0e7a9f67072bcfd836440ad002c2a46ebb0c9cb54310e13774b63890b6245e13472574e226cfe278c2f9d586fa28f3441a0defca0d35c3653684d07d97'
'0541f144ee33bb4cb182231794065babae530260b95bff26cbeb5491ab856d40e247895d130629f9dbef58dcd6652f0c69d3e28f57f3bae916d36294565399b0'
'c97518ba1e9b865239cedbba7bf6c5b9af0e0c873972fa6df7169aac43a8b500f9d063b382530faa326c0b5f135876cb9eb601a7922a6d0f53adaa9ba27e6816'
'a3eb0e5789f04069fc7fd55ff09c437e394ae370110a43d6a1000759a524ac7d1b9f8b664656c2c9fb94fc9eca4852fb338a24186d9e3da30aed02773edbab86')
sha512sums_x86_64=('c5c489bf66fab1ebbe176c20c2b1daea6425af834fb49fa62994a578763bb2c6b0b6614d320beb9e443aaad4b3444c9b75c040ba4e4412032f4104ca8501f3dc')
sha512sums_armv7h=('9e2723b0ee0cec5d50bba18766a8097246ba3f9b3938831db99bd93abeddeb9a692e6c0a7f1360da8a54c8e6042ca1ff1e5a567cb868964c75b1492d86c4509d')
sha512sums_aarch64=('bd2ba121e361186cc01a3fcef4d62126074eea77124b821ef4c23559fa0dbeb74d1c0f6cabfaaa74d327f20b6418d46eed46655bd7b435673ade18ce9304b99f')
package() {
declare -A ARCH_MAP
ARCH_MAP=( [x86_64]="amd64" [armv7h]="armv7" [aarch64]="arm64" )
cd "$srcdir"
install -Dm644 sing-box.service -t "$pkgdir/usr/lib/systemd/system"
install -Dm644 sing-box@.service -t "$pkgdir/usr/lib/systemd/system"
install -Dm644 sing-box.sysusers "$pkgdir/usr/lib/sysusers.d/sing-box.conf"
install -Dm644 sing-box.tmpfiles "$pkgdir/usr/lib/tmpfiles.d/sing-box.conf"
install -Dm644 config.json -t "$pkgdir/etc/sing-box"
cd "sing-box-$_pkgver-linux-${ARCH_MAP[$CARCH]}"
./sing-box completion bash |
install -Dm644 /dev/stdin "$pkgdir/usr/share/bash-completion/completions/sing-box"
./sing-box completion fish |
install -Dm644 /dev/stdin "$pkgdir/usr/share/fish/vendor_completions.d/sing-box.fish"
./sing-box completion zsh |
install -Dm644 /dev/stdin "$pkgdir/usr/share/zsh/site-functions/_sing-box"
install -Dm755 sing-box -t "$pkgdir/usr/bin"
install -Dm644 LICENSE -t "$pkgdir/usr/share/licenses/sing-box"
}
|