summarylogtreecommitdiffstats
path: root/PKGBUILD
diff options
context:
space:
mode:
authorKyle Westhaus2019-07-27 20:15:18 -0400
committerKyle Westhaus2019-07-27 20:15:18 -0400
commite5c6ed413574359bc49892be031c5b317af3c198 (patch)
tree6c954afec23549b0b3fa51399474775e97b6d1cd /PKGBUILD
parent69cbf2ccf09325e698ff5a7e4f7a9dc4e42647dd (diff)
downloadaur-e5c6ed413574359bc49892be031c5b317af3c198.tar.gz
Updates licenses, dependencies, maintainer info, automatic , and golang build options
Diffstat (limited to 'PKGBUILD')
-rw-r--r--PKGBUILD44
1 files changed, 33 insertions, 11 deletions
diff --git a/PKGBUILD b/PKGBUILD
index 47871f200e37..3bf8cd04d0a3 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -1,25 +1,47 @@
-# Maintainer: John Trengrove <john@retrofilter.com>
+# Maintainer: Kyle Westhaus <kwesthaus+aur at gmail dot com>
+# Maintainer: Kevin Orr <kevinorr54+aur at gmail dot com>
+# Contributor: Kaley Main <kaleypoole17 at gmail dot com>
+# Contributor: John Trengrove <john at retrofilter dot com>
pkgname=dgraph-git
-pkgver=20170711
+pkgver=v1.0.12.rc3.r628.gcf7c1e630
pkgrel=1
-pkgdesc='a low latency, high throughput, native and distributed graph database'
-arch=('x86_64' 'i686')
+pkgdesc='Low latency, high throughput, native and distributed graph database'
+arch=('x86_64')
url='https://github.com/dgraph-io/dgraph'
-license=('APACHE')
-conflicts=('dgraph dgraph-bin')
+license=('APACHE' 'custom:DCL')
+makedepends=('go' 'git')
provides=('dgraph')
-options=('!strip' '!emptydirs')
-depends=('go')
+conflicts=('dgraph' 'dgraph-bin')
+source=("$pkgname::git+$url")
+sha256sums=('SKIP')
+
+prepare() {
+ mkdir -p "$srcdir/tmpgopath/src/github.com/dgraph-io/"
+ ln -rTsf "$srcdir/$pkgname" "$srcdir/tmpgopath/src/github.com/dgraph-io/dgraph"
+}
+
+pkgver() {
+ cd "$srcdir/$pkgname"
+ git describe --long | sed 's/\([^-]*-g\)/r\1/;s/-/./g'
+}
build() {
- GOPATH="$srcdir" go get -v github.com/dgraph-io/dgraph/cmd/...
+ cd "$srcdir"
+
+ GOPATH="$(pwd)/tmpgopath" go install \
+ -buildmode=pie \
+ -gcflags "all=-trimpath=$PWD" \
+ -asmflags "all=-trimpath=$PWD" \
+ -ldflags "-X github.com/dgraph-io/dgraph/x.lastCommitSHA=$(git --git-dir ./$pkgname/.git rev-parse --short HEAD) -X 'github.com/dgraph-io/dgraph/x.lastCommitTime=$(git --git-dir ./$pkgname/.git log -1 --format=%ci)' -X github.com/dgraph-io/dgraph/x.dgraphVersion=$(git --git-dir ./$pkgname/.git describe --always --tags) -X github.com/dgraph-io/dgraph/x.gitBranch=$(git --git-dir ./$pkgname/.git rev-parse --abbrev-ref HEAD) -extldflags '$LDFLAGS -Wl,-z,relro,-z,now'" \
+ -v "./tmpgopath/src/github.com/dgraph-io/dgraph/dgraph/..."
}
package() {
cd "$srcdir"
- for binary in dgraph dgraphloader postingiterator; do
- install -Dm755 bin/$binary "$pkgdir/usr/bin/$binary"
+ install -Dm644 "$pkgname/licenses/DCL.txt" "$pkgdir/usr/share/licenses/$pkgname/DCL.txt"
+ for binary in dgraph; do
+ install -Dm755 "tmpgopath/bin/$binary" "$pkgdir/usr/bin/$binary"
done
}