summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authoredward-p2019-05-12 21:14:59 +0800
committeredward-p2019-05-12 21:14:59 +0800
commitf525f093519296ca0b58ddfd41b992fb36e41271 (patch)
tree7bee03c9fd84c19f66e6a57458525543fdee2cbf
downloadaur-f525f093519296ca0b58ddfd41b992fb36e41271.tar.gz
init commit
-rw-r--r--.SRCINFO18
-rw-r--r--10-build-in-src.patch11
-rw-r--r--PKGBUILD40
3 files changed, 69 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO
new file mode 100644
index 000000000000..b6340ec471e7
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,18 @@
+pkgbase = go-stun-git
+ pkgdesc = A go implementation of the STUN client (RFC 3489 and RFC 5389)
+ pkgver = r116.be486d1
+ pkgrel = 1
+ url = https://github.com/ccding/go-stun
+ arch = x86_64
+ license = Apache
+ makedepends = go
+ makedepends = git
+ provides = go-stun
+ conflicts = go-stun
+ source = git+https://github.com/ccding/go-stun.git
+ source = 10-build-in-src.patch
+ sha256sums = SKIP
+ sha256sums = 1cc32a4bace519635092657b861fbf4d02753ec7480790c738f133fba97cc4fd
+
+pkgname = go-stun-git
+
diff --git a/10-build-in-src.patch b/10-build-in-src.patch
new file mode 100644
index 000000000000..fa49444181f9
--- /dev/null
+++ b/10-build-in-src.patch
@@ -0,0 +1,11 @@
+--- a/main.go
++++ b/main.go
+@@ -20,7 +20,7 @@ import (
+ "flag"
+ "fmt"
+
+- "github.com/ccding/go-stun/stun"
++ "./stun"
+ )
+
+ func main() {
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 000000000000..d057ac4ac1dc
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,40 @@
+# Maintainer: Edward Pacman <edward@edward-p.xyz>
+
+pkgname=go-stun-git
+pkgver=r116.be486d1
+pkgrel=1
+pkgdesc="A go implementation of the STUN client (RFC 3489 and RFC 5389)"
+arch=('x86_64')
+url="https://github.com/ccding/go-stun"
+license=('Apache')
+source=("git+https://github.com/ccding/go-stun.git"
+ "10-build-in-src.patch")
+makedepends=("go" "git")
+provides=(go-stun)
+conflicts=(go-stun)
+sha256sums=('SKIP'
+ '1cc32a4bace519635092657b861fbf4d02753ec7480790c738f133fba97cc4fd')
+
+pkgver() {
+ cd "$srcdir/go-stun"
+ ( set -o pipefail
+ git describe --long 2>/dev/null | sed 's/\([^-]*-g\)/r\1/;s/-/./g' ||
+ printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)"
+ )
+}
+
+
+prepare(){
+ cd "${srcdir}/go-stun"
+ patch -Np1 < ../10-build-in-src.patch
+}
+
+build(){
+ cd "${srcdir}/go-stun"
+ go build
+}
+
+package() {
+ cd "${srcdir}/go-stun"
+ install -Dm755 go-stun "${pkgdir}/usr/bin/go-stun"
+}