aboutsummaryrefslogtreecommitdiffstats
path: root/testing/meek
diff options
context:
space:
mode:
authorkpcyrd <git@rxv.cc>2018-04-08 19:36:19 +0200
committerCarlo Landmeter <clandmeter@alpinelinux.org>2018-04-17 08:33:19 +0000
commit09a9e1e77cb2033f483f8d298d79f1c851184ab0 (patch)
treeac9adf859cc269d17e89b7756c6152acf91892e2 /testing/meek
parent7bb43d1ccbd55c0dc19f323256d8cc9c088f9b8b (diff)
downloadaports-09a9e1e77cb2033f483f8d298d79f1c851184ab0.tar.bz2
aports-09a9e1e77cb2033f483f8d298d79f1c851184ab0.tar.xz
testing/meek: new aport
https://trac.torproject.org/projects/tor/wiki/doc/meek A pluggable transport proxy written in Go - Fix license - makedepends libpcap - introduce glide - split into -server and -client - set gopath to srcdir
Diffstat (limited to 'testing/meek')
-rw-r--r--testing/meek/APKBUILD88
-rw-r--r--testing/meek/glide.lock25
-rw-r--r--testing/meek/glide.yaml9
3 files changed, 122 insertions, 0 deletions
diff --git a/testing/meek/APKBUILD b/testing/meek/APKBUILD
new file mode 100644
index 0000000000..a060088278
--- /dev/null
+++ b/testing/meek/APKBUILD
@@ -0,0 +1,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"
diff --git a/testing/meek/glide.lock b/testing/meek/glide.lock
new file mode 100644
index 0000000000..aafbe4dd92
--- /dev/null
+++ b/testing/meek/glide.lock
@@ -0,0 +1,25 @@
+hash: ebadb3f691ad2a4b1d80941e8ba0049959860146e8a5f28bc3eec7d9b4a2bd56
+updated: 2018-04-16T21:02:35.672083878Z
+imports:
+- name: git.torproject.org/pluggable-transports/goptlib.git
+ version: 7d56ec4f381e8b1aedfda360594e35a5731b5337
+- name: golang.org/x/crypto
+ version: f70185d77e8278766928032ee1355e3da47e7181
+ subpackages:
+ - acme
+ - acme/autocert
+- name: golang.org/x/net
+ version: 61147c48b25b599e5b561d2e9c4f3e1ef489ca41
+ subpackages:
+ - http2
+ - http2/hpack
+ - idna
+ - lex/httplex
+- name: golang.org/x/text
+ version: 7922cc490dd5a7dbaa7fd5d6196b49db59ac042f
+ subpackages:
+ - secure/bidirule
+ - transform
+ - unicode/bidi
+ - unicode/norm
+testImports: []
diff --git a/testing/meek/glide.yaml b/testing/meek/glide.yaml
new file mode 100644
index 0000000000..f8f3ae0ead
--- /dev/null
+++ b/testing/meek/glide.yaml
@@ -0,0 +1,9 @@
+package: meek
+import:
+- package: git.torproject.org/pluggable-transports/goptlib.git
+- package: golang.org/x/crypto
+ subpackages:
+ - acme/autocert
+- package: golang.org/x/net
+ subpackages:
+ - http2