blob: d088546283dbb2f4d9de0f6d2d654d3b109c1615 (
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.6.0-beta.4"
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'
'5afe85ede1e8af0f9caa2db7cd03dec3c7aa0a135feefe26f77748742b22402b90f3d8d8172e535b3c1353b136620e6f20d66d2d782ea8687a66b6c4e6c82650'
'a3eb0e5789f04069fc7fd55ff09c437e394ae370110a43d6a1000759a524ac7d1b9f8b664656c2c9fb94fc9eca4852fb338a24186d9e3da30aed02773edbab86')
sha512sums_x86_64=('5befca2a8ad6e965ccb35194904d7898715b371ec14084a656ee49f044a86768dc292eef5090d5c47d47d97eafe6a72cbebcc31cfdf97f1c63ea23f631a1e409')
sha512sums_armv7h=('c78197e21c32c572d108c3a4bbc36f316415d6766f283a3f4bd55c392fbc0ad1fec249f0b307af22d519a1eb181b841ff7bd02a8a14709f86dea44a059a8d63c')
sha512sums_aarch64=('d669a1609fda875b245d6e53defb12157f6e603664c2d7dbb50d6ad350da85c8923b950e31f3fabfd67aec5262b6d7be4f223a83941c894e97323525e0040223')
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"
}
|