diff options
author | neodarz <neodarz@neodarz.net> | 2017-11-18 16:26:13 +0100 |
---|---|---|
committer | neodarz <neodarz@neodarz.net> | 2017-11-18 16:26:56 +0100 |
commit | d1dce10ee3af03a7e0196c91b6a345c27cd453a8 (patch) | |
tree | a66d097a9165d326811a3f269003f370d4d37e9c /PKGBUILD | |
download | grv-git-d1dce10ee3af03a7e0196c91b6a345c27cd453a8.tar.xz grv-git-d1dce10ee3af03a7e0196c91b6a345c27cd453a8.zip |
Initial commit
Diffstat (limited to 'PKGBUILD')
-rw-r--r-- | PKGBUILD | 39 |
1 files changed, 39 insertions, 0 deletions
diff --git a/PKGBUILD b/PKGBUILD new file mode 100644 index 0000000..be98b5d --- /dev/null +++ b/PKGBUILD @@ -0,0 +1,39 @@ +# Maintainer: neodarz <neodarz@neodarz.net> + +_pkgname=grv +pkgname=$_pkgname-git +pkgver=r227.4ecb757 +pkgrel=2 +pkgdesc="terminal interface for viewing git repositories" +arch=('i686' 'x86_64') +url="https://github.com/rgburke/$_pkgname" +license=('GPL-3.0') +depends=(ncurses readline curl) +makedepends=(cmake go) +provides=("$_pkgname") +conflicts=("$_pkgname") +source=("git+https://github.com/rgburke/$_pkgname.git") +noextract=() +md5sums=('SKIP') + +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)" + ) +} + +build() { + export GOROOT=/usr/lib/go + export GOPATH="$srcdir" + go get -d github.com/rgburke/grv/cmd/$_pkgname + cd $GOPATH/src/github.com/rgburke/$_pkgname + make +} + +package() { + export GOROOT="$GOPATH" + install -Dm755 "$(pwd)/src/github.com/rgburke/grv/grv" "$pkgdir/usr/bin/$_pkgname" +} + |