summarylogtreecommitdiffstats
path: root/PKGBUILD
diff options
context:
space:
mode:
Diffstat (limited to 'PKGBUILD')
-rw-r--r--PKGBUILD30
1 files changed, 12 insertions, 18 deletions
diff --git a/PKGBUILD b/PKGBUILD
index 0fa52e3c9760..47fd1c3bb957 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -1,9 +1,11 @@
# Maintainer: Caleb Maclennan <caleb@alerque.com>
# Maintainer: Simon Legner <Simon.Legner@gmail.com>
# Contributor: Jeremy Asuncion <jeremyasuncion808@gmail.com>
+# Contributor: Simon Reiser <simonfxr@gmail.com>
-pkgname=lab-git
-pkgver=0.12.0.r7.g9032be9
+_pkgname=lab
+pkgname=${_pkgname}-git
+pkgver=0.15.2.r1.gb2da778
_branch=master
pkgrel=1
pkgdesc="A hub-like tool for GitLab (git $_branch branch)"
@@ -12,33 +14,25 @@ url="https://zaquestion.github.io/lab/"
license=('custom:Unlicense')
depends=('git')
optdepends=('hub')
-makedepends=('git' 'go' 'dep')
-conflicts=("${pkgname%-git}" "${pkgname%-git}-bin")
-source=("git://github.com/zaquestion/${pkgname%-git}.git#branch=$_branch")
+makedepends=('git' 'go')
+conflicts=("$_pkgname" "${_pkgname}-bin")
+source=("git://github.com/zaquestion/${_pkgname}.git#branch=$_branch")
sha512sums=('SKIP')
-_gourl="github.com/zaquestion/${pkgname%-git}"
+_gourl="github.com/zaquestion/$_pkgname"
pkgver() {
- cd "${pkgname%-git}"
+ cd "$_pkgname"
git describe --long --tags | sed 's/^v//;s/\([^-]*-g\)/r\1/;s/-/./g'
}
-prepare() {
- export GOPATH="$srcdir/go"
- mkdir -p "$GOPATH"
- mkdir -p "$(dirname "$GOPATH/src/$_gourl")"
- ln --no-target-directory -fs "$srcdir/${pkgname%-git}" "$GOPATH/src/$_gourl"
-}
-
build () {
export GOPATH="$srcdir/go"
- cd "$GOPATH/src/$_gourl"
- dep ensure
- go build -ldflags "-X \"main.version=$pkgver\"" "$_gourl"
+ mkdir -p "$GOPATH"
+ make -C "$srcdir/$_pkgname" build
}
package() {
- cd "${pkgname%-git}"
+ cd "$_pkgname"
install -Dm644 LICENSE "$pkgdir/usr/share/licenses/$pkgname"/LICENSE
install -Dm755 lab "$pkgdir"/usr/bin/lab
}