summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorJakub Sztandera2016-02-26 14:21:06 +0100
committerJakub Sztandera2016-02-26 14:21:51 +0100
commit6fd2c03bd565b7c8f4e47e17efc475ada6598ba7 (patch)
treec59cfcfa3ae35665d0956d0aa0c5f7e8b2329084
downloadaur-6fd2c03bd565b7c8f4e47e17efc475ada6598ba7.tar.gz
Package init
-rw-r--r--.SRCINFO18
-rw-r--r--.gitignore3
-rw-r--r--PKGBUILD46
3 files changed, 67 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO
new file mode 100644
index 00000000000..fc7dcf4ea74
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,18 @@
+# Generated by mksrcinfo v8
+# Fri Feb 26 13:21:33 UTC 2016
+pkgbase = gx-go
+ pkgdesc = A tool to use with the gx package manager for packages written in go.
+ pkgver = 0.2.0
+ pkgrel = 1
+ url = https://github.com/whyrusleeping/gx-go
+ arch = i686
+ arch = x86_64
+ arch = armv7h
+ license = MIT
+ makedepends = git
+ makedepends = go
+ source = git+https://github.com/whyrusleeping/gx-go.git
+ md5sums = SKIP
+
+pkgname = gx-go
+
diff --git a/.gitignore b/.gitignore
new file mode 100644
index 00000000000..f6fa8ae771c
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1,3 @@
+gx-go
+gx-go-*
+src
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 00000000000..30a6dcf8c11
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,46 @@
+# Maintainer: Jakub "Kubuxu" Sztandera <kubuxu@protonmail.ch>
+# vim: set expandtab ts=2 sw=2:
+
+pkgname=gx-go
+pkgver=0.2.0
+pkgrel=1
+epoch=
+pkgdesc="A tool to use with the gx package manager for packages written in go."
+arch=('i686' 'x86_64' 'armv7h')
+url="https://github.com/whyrusleeping/$pkgname"
+license=('MIT')
+makedepends=('git' 'go')
+source=("git+${url}.git")
+md5sums=('SKIP')
+
+pkgver_DISABLED() {
+ # Renable after tags are placed in the repo.
+ cd "$srcdir/$pkgname"
+ git describe --long --tags | sed 's/^v//;s/\([^-]*-g\)/r\1/;s/-/./g'
+}
+
+prepare() {
+ mkdir -p "$srcdir"/src/github.com/whyrusleeping/
+ ln -fs "$srcdir/$pkgname" "$srcdir"/src/github.com/whyrusleeping/"$pkgname"
+}
+
+build() {
+ # Required for go get
+ export GOPATH="$srcdir"
+ cd "$srcdir"/src/github.com/whyrusleeping/"$pkgname"
+
+ msg2 'Installing dependencies...'
+ go get -v
+
+ msg2 'Building binary...'
+ go install -v
+}
+
+package() {
+ msg2 'Packaging binary...'
+ install -Dm 755 bin/gx-go "${pkgdir}/usr/bin/gx-go"
+
+ msg2 'Packaging auxiliary files...'
+ cd "$pkgname"
+ install -Dm 644 -t "${pkgdir}/usr/share/licenses/${pkgname}" LICENSE
+}