blob: 90a319c5ebaf7af2d74fd45f1e9c9bc705a17293 (
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
|
# Maintainer: spyophobia <76800505+spyophobia@users.noreply.github.com>
pkgname=cloak-obfuscation
_pkgname=Cloak
pkgver=2.9.0
pkgrel=1
pkgdesc='A pluggable transport that works alongside traditional proxy tools like OpenVPN to evade deep-packet-inspection based censorship'
arch=('i686' 'x86_64' 'aarch64')
url="https://github.com/cbeuw/Cloak"
license=('GPL3')
makedepends=('go')
conflicts=('cloak-obfuscation-bin' 'cloak-obfuscation-git')
source=(cloak-obfuscation-${pkgver}.tar.gz::"${url}/archive/refs/tags/v${pkgver}.tar.gz")
sha512sums=('baab36cae7306b6d54c56c616fe1f8af151f8f61887f46c04fcc0f97fbff3bb4e233fe7cab73e3a4bc8fe2e08698ba734a8e90ecf0745d62844df2ecb1fe6ba8')
backup=(
"etc/cloak/ckclient.json"
"etc/cloak/ckserver.json"
)
prepare() {
cd "${_pkgname}-${pkgver}"
mkdir -p build
}
build() {
cd "${_pkgname}-${pkgver}"
export GOPATH="${srcdir}/gopath"
export CGO_ENABLED=0
go build -ldflags "-X main.version=v${pkgver}" -o build ./cmd/...
}
check() {
cd "${_pkgname}-${pkgver}"
go test ./...
}
package() {
cd "${_pkgname}-${pkgver}"
pushd build
install -Dm 755 -t "${pkgdir}/usr/bin" ck-client ck-server
popd
pushd example_config
install -Dm 644 -t "${pkgdir}/etc/cloak" ckclient.json ckserver.json
popd
# prevent permission issues during cleanup
chmod -R u+w "${srcdir}/gopath"
}
|