blob: 1adfc617591983232d0d477c5b070cb3fa28a9df (
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
57
|
# Maintainer: database64128 <free122448@hotmail.com>
_pkgname=shadowsocks-go
pkgname=$_pkgname-git
pkgver=1.11.1.r0.ga2168a2
pkgrel=1
pkgdesc="A versatile and efficient proxy platform for secure communications"
arch=('x86_64' 'aarch64')
url="https://github.com/database64128/$_pkgname"
license=('AGPL-3.0-or-later')
makedepends=('git' 'go')
optdepends=(
'shadowsocks-go-domain-sets: commonly used domain sets'
'shadowsocks-go-geolite2-country: MaxMind GeoLite2 country database'
)
provides=("$_pkgname")
conflicts=("$_pkgname")
backup=(
"etc/$_pkgname/config.json"
"etc/$_pkgname/server.json"
"etc/$_pkgname/client.json"
"etc/$_pkgname/upsks.json"
)
source=("$_pkgname::git+$url.git?signed")
b2sums=('SKIP')
validpgpkeys=(
'4DCED15E346E2923B931D6F71CA27546BEDB8B01' # Ian Chen (database64128) <free122448@hotmail.com>
)
pkgver() {
cd $_pkgname
git describe --long | sed 's/^v//;s/\([^-]*-g\)/r\1/;s/-/./g'
}
build() {
cd $_pkgname
export CGO_CPPFLAGS="${CPPFLAGS}"
export CGO_CFLAGS="${CFLAGS}"
export CGO_CXXFLAGS="${CXXFLAGS}"
export CGO_LDFLAGS="${LDFLAGS}"
export GOFLAGS="-buildmode=pie -trimpath"
go build -ldflags='-s -w -linkmode=external' ./cmd/$_pkgname
go build -ldflags='-s -w -linkmode=external' ./cmd/$_pkgname-domain-set-converter
}
package() {
cd $_pkgname
install -Dm644 docs/$_pkgname.service "$pkgdir"/usr/lib/systemd/system/$_pkgname.service
install -Dm644 docs/$_pkgname@.service "$pkgdir"/usr/lib/systemd/system/$_pkgname@.service
install -d "$pkgdir"/etc/$_pkgname
install -Dm644 docs/config.json "$pkgdir"/etc/$_pkgname/config.json
install -Dm644 docs/server.json "$pkgdir"/etc/$_pkgname/server.json
install -Dm644 docs/client.json "$pkgdir"/etc/$_pkgname/client.json
install -Dm644 docs/upsks.json "$pkgdir"/etc/$_pkgname/upsks.json
install -Dm755 $_pkgname "$pkgdir"/usr/bin/$_pkgname
install -Dm755 $_pkgname-domain-set-converter "$pkgdir"/usr/bin/$_pkgname-domain-set-converter
}
|