summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorAdrián Pérez de Castro2015-11-30 18:55:33 +0200
committerAdrián Pérez de Castro2015-11-30 18:55:33 +0200
commitafc9ba0c94376fc560fbf9d3033ce3e307a2db29 (patch)
treeef5046268e2876975147634475a3a3e0778ddb22
downloadaur-afc9ba0c94376fc560fbf9d3033ce3e307a2db29.tar.gz
Initial import
-rw-r--r--.SRCINFO16
-rw-r--r--PKGBUILD45
2 files changed, 61 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO
new file mode 100644
index 00000000000..486ec344f38
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,16 @@
+# Generated by mksrcinfo v8
+# Mon Nov 30 16:55:27 UTC 2015
+pkgbase = cockroachdb-git
+ pkgdesc = A Scalable, Geo-Replicated, Transactional Datastore
+ pkgver = r6125.ga46df17
+ pkgrel = 1
+ url = https://github.com/cockroachdb/cockroach
+ arch = x86_64
+ license = Apache
+ makedepends = go
+ depends = gcc-libs
+ source = cockroachdb-git::git+https://github.com/cockroachdb/cockroach
+ sha512sums = SKIP
+
+pkgname = cockroachdb-git
+
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 00000000000..445bce1faca
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,45 @@
+pkgname='cockroachdb-git'
+pkgdesc='A Scalable, Geo-Replicated, Transactional Datastore'
+pkgver=r6125.ga46df17
+pkgrel=1
+license='Apache'
+url='https://github.com/cockroachdb/cockroach'
+source=("${pkgname}::git+${url}")
+sha512sums=('SKIP')
+arch=('x86_64')
+depends=('gcc-libs')
+makedepends=('go')
+
+
+pkgver () {
+ cd "${pkgname}"
+ (
+ 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)"
+ ) | sed 's/alpha\.//'
+}
+
+prepare () {
+ export GOPATH="$(pwd)/go"
+ rm -rf "${GOPATH}/src/github.com/cockroachdb/cockroach"
+ mkdir -p "${GOPATH}/src/github.com/cockroachdb"
+ mv "${pkgname}" "${GOPATH}/src/github.com/cockroachdb/cockroach"
+}
+
+build () {
+ export GOPATH="$(pwd)/go"
+ cd "${GOPATH}/src/github.com/cockroachdb/cockroach"
+
+ # Do not use "make release", is the LDFLAGS added by the Makefile
+ # result in linkage errors.
+ make .bootstrap
+ TAGS=( $(./build/depvers.sh) release )
+ go build -tags "${TAGS[*]}" -v -i -o cockroach
+}
+
+package () {
+ export GOPATH="$(pwd)/go"
+ cd "${GOPATH}/src/github.com/cockroachdb/cockroach"
+ install -Dm755 cockroach "${pkgdir}/usr/bin/cockroach"
+}