aboutsummaryrefslogtreecommitdiffstats
path: root/testing/obfs4proxy/APKBUILD
diff options
context:
space:
mode:
Diffstat (limited to 'testing/obfs4proxy/APKBUILD')
-rw-r--r--testing/obfs4proxy/APKBUILD50
1 files changed, 50 insertions, 0 deletions
diff --git a/testing/obfs4proxy/APKBUILD b/testing/obfs4proxy/APKBUILD
new file mode 100644
index 0000000000..0559bd5f3c
--- /dev/null
+++ b/testing/obfs4proxy/APKBUILD
@@ -0,0 +1,50 @@
+# Contributor: Katie Holly <holly@fuslvz.ws>
+# Maintainer: Katie Holly <holly@fuslvz.ws>
+pkgname=obfs4proxy
+pkgver=0.0.7
+pkgrel=0
+pkgdesc="pluggable transport proxy for Tor, implementing obfs4"
+url="https://gitweb.torproject.org/pluggable-transports/obfs4.git/"
+arch="x86_64 x86"
+license="BSD-3-Clause"
+makedepends="go glide"
+options="!strip !net"
+install=""
+source="$pkgname-$pkgver.tar.gz::https://github.com/Yawning/obfs4/archive/$pkgname-$pkgver.tar.gz
+ glide.yaml
+ glide.lock
+ "
+builddir="$srcdir"/obfs4-$pkgname-$pkgver
+_godir="$srcdir"/go
+_vendordir="$_godir"/src/git.torproject.org/pluggable-transports/obfs4.git
+
+unpack() {
+ default_unpack
+ mkdir -p "$_godir"/bin "$_vendordir" "$builddir/.glide" "$builddir/.glidetmp"
+ rmdir "$_vendordir"
+ ln -sf "$builddir" "$_vendordir"
+ cp "$srcdir"/glide.yaml "$srcdir"/glide.lock "$_vendordir"
+}
+
+build() {
+ cd "$_vendordir"
+ export GOPATH="$_godir"
+ export PATH="$PATH:$GOPATH"
+ GLIDE_HOME="$builddir/.glide" GLIDE_TMP="$builddir/.glidetmp" glide install
+ go build -v -o ./$pkgname-executable ./$pkgname
+}
+
+check() {
+ cd "$_vendordir"
+ go test -short ./...
+}
+
+package() {
+ cd "$builddir"
+ mkdir -p "$pkgdir"/usr/bin
+ install -Dm755 $pkgname-executable "$pkgdir"/usr/bin/$pkgname
+}
+
+sha512sums="57b71138a139b1821cf58c8e1965f207a6164a046bbfc8d6da828351d4f5bf4ecfb63ca5c69dba834c4e3a72362089d2a7fd296278115c0cae1c53c51d1b124d obfs4proxy-0.0.7.tar.gz
+5531b275dc7954b46382f3e01a5d014cc9e06df001c08d80861c6a65e3110d1152219c76231f4ab0f81d95cff3bebcf4b6c687fd65ec8b0980364a716b9a08c2 glide.yaml
+e1a8de9a26d3ae49cf7feb53d16b75c19827a4a04e84a0f44412da25f49152205da17c5be832bd94c0688d7e078679350bd8c0ff9c9fbe3eb9cefed42bedfe2f glide.lock"