summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 27a4d93e8e87a7a443f5579aa2da9d02dac8a5a6 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
# Maintainer: DeedleFake <deedlefake at users dot noreply dot github dot com>
pkgname=upspin-git
pkgver=r1449.2b715455
pkgrel=2
pkgdesc="A global name system of sorts."
arch=(i686 x86_64)
url="https://upspin.io"
license=('BSD')
makedepends=('go>=1.8' 'git')
provides=("${pkgname%-git}")
conflicts=("${pkgname%-git}")
source=("git+https://github.com/upspin/upspin")
md5sums=('SKIP')

pkgver() {
	cd "$srcdir/${pkgname%-git}"

# Git, tags available
	#printf "%s" "$(git describe --long | sed 's/\([^-]*-\)g/r\1/;s/-/./g')"

# Git, no tags available
	printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)"
}

build() {
	cd "$srcdir"

	export GOPATH="$srcdir/gopath"
	mkdir -p "$GOPATH/src"
	mv "$srcdir/${pkgname%-git}" "$GOPATH/src/upspin.io"

	go get -v upspin.io/cmd/...
}

package() {
	cd "$srcdir"

	mkdir -p "$pkgdir/usr"
	cp -a "$srcdir/gopath/bin" "$pkgdir/usr/bin"
}