blob: a060088278210c303126586f7ed0cb041f0781e9 (
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
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
|
# Contributor: kpcyrd <git@rxv.cc>
# Maintainer: kpcyrd <git@rxv.cc>
pkgname=meek
pkgver=0.30
pkgrel=0
pkgdesc="A pluggable transport proxy written in Go"
url="https://trac.torproject.org/projects/tor/wiki/doc/meek"
arch="all"
license="CC0-1.0"
depends="meek-server meek-client"
makedepends="glide go libcap"
subpackages="$pkgname-doc
$pkgname-client
$pkgname-server
"
# no test suite available
options="!check"
source="$pkgname-$pkgver.tar.gz::https://gitweb.torproject.org/pluggable-transports/$pkgname.git/snapshot/$pkgname-$pkgver.tar.gz
glide.lock
glide.yaml
"
builddir="$srcdir/src/$pkgname"
prepare() {
mkdir -p ${builddir%/*}
mv "$srcdir/$pkgname-$pkgver" "$builddir"
cd "$builddir"
cp "$srcdir"/glide.yaml "$srcdir"/glide.lock .
export GOPATH="$srcdir"
glide install --skip-test
default_prepare
}
build() {
cd "$builddir"
export GOPATH="$srcdir"
go build -v -ldflags "-s -w" \
-o meek-client/meek-client ./meek-client/...
go build -v -ldflags "-s -w" \
-o meek-server/meek-server ./meek-server/...
}
package() {
cd "$builddir"
install -Dm 755 meek-client/meek-client "$pkgdir/usr/bin/meek-client"
install -Dm 755 meek-server/meek-server "$pkgdir/usr/bin/meek-server"
setcap 'cap_net_bind_service=+ep' "$pkgdir/usr/bin/meek-server"
mkdir -p "$pkgdir/usr/share/man/man1"
install -Dm644 doc/*.1 -t "$pkgdir/usr/share/man/man1"
install -Dm644 COPYING "$pkgdir/usr/share/licenses/$pkgname/COPYING"
install -Dm644 README "$pkgdir/usr/share/doc/$pkgname/README"
install -Dm644 meek-client/torrc \
"$pkgdir/usr/share/doc/$pkgname/torrc.meek-client"
install -Dm644 meek-server/torrc \
"$pkgdir/usr/share/doc/$pkgname/torrc.meek-server"
}
client() {
pkgdesc="meek pluggable transport proxy client"
depends=ca-certificates
install -Dm755 "$builddir"/meek-client/meek-client \
"$subpkgdir"/usr/bin/meek-client
}
server() {
pkgdesc="meek pluggable transport proxy server"
depends=
install -Dm 755 "$builddir"/meek-server/meek-server \
"$subpkgdir/usr/bin/meek-server"
setcap 'cap_net_bind_service=+ep' "$subpkgdir/usr/bin/meek-server"
}
glide_init() {
abuild clean deps unpack prepare
cd "$builddir"
export GOPATH="$srcdir"
rm -f glide.yaml glide.lock
glide init --non-interactive
glide update
cp glide.yaml glide.lock "$startdir"
cd "$startdir" && abuild checksum clean
}
sha512sums="5dd989d6800f4aaca9e5f66acf325afbb4fea70a8347a1fdff77381b28d5b9762f9d7a45b4375086d9167e1a407e53aa1d1b3203eaa09e3f8e36f2a9805dcc3d meek-0.30.tar.gz
ccbd369ec5319ed6057c2d980e77612c1f1c2ec8f63a24f8e4dba3ee4f6c2b041050d49753c96f9f7e4d1c759ce0f023fa620250022a1699fbf45893e71fa555 glide.lock
6c04650f2b09db98f3fdce52cc4a2720f16ea3cdf6165dd75ea4f20785138a42635ad608c64b749767a58933ed5115ed720a3a03005f0a426ea1e5e379ff26cd glide.yaml"
|