summarylogtreecommitdiffstats
path: root/PKGBUILD
diff options
context:
space:
mode:
authorRafael Ascensão2018-12-11 23:54:37 +0000
committerRafael Ascensão2018-12-11 23:54:37 +0000
commitb3ebf841a11875079599ed72d0639baf607b5d28 (patch)
tree100f73c259a649a6d6827cb42999e3c0dd4ce218 /PKGBUILD
parent8f84b257d5a95630403a12a2661b1f7161d09468 (diff)
downloadaur-b3ebf841a11875079599ed72d0639baf607b5d28.tar.gz
upgpkg: git-bug-git 0.4.0.r29.gc92da55-1
Diffstat (limited to 'PKGBUILD')
-rw-r--r--PKGBUILD74
1 files changed, 49 insertions, 25 deletions
diff --git a/PKGBUILD b/PKGBUILD
index 9635117feea..8df69b8d473 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -1,35 +1,59 @@
-# Maintainer: Jean Lucas <jean@4ray.co>
+# Maintainer: Rafael Ascensão <rafa dot almas at gmail dot com>
+# Contributor: Jean Lucas <jean@4ray.co>
pkgname=git-bug-git
-pkgver=0.2.0+15+g8abf984
+pkgver=0.4.0.r29.gc92da55
pkgrel=1
-pkgdesc='Distributed bug tracker embedded in Git (git)'
-arch=(i686 x86_64)
-url=https://github.com/MichaelMure/git-bug
-license=(GPL3)
-makedepends=(go)
-provides=(git-bug)
-conflicts=(git-bug git-bug-bin)
-source=(git+$url)
-sha512sums=(SKIP)
-
-pkgver() {
- cd git-bug
- git describe --tags | sed 's/v//;s/-/+/g'
+pkgdesc='Distributed bug tracker embedded in Git'
+arch=('x86_64' 'i686')
+url="https://github.com/MichaelMure/${pkgname%-git}"
+license=('GPL3')
+depends=('git')
+makedepends=('go-pie' 'dep')
+optdepends=('xdg-utils: open bugs in browser')
+provides=('git-bug')
+conflicts=('git-bug')
+source=("git+${url}.git")
+sha256sums=('SKIP')
+
+_gitbugsrc="gopath/src/${url#*://}"
+
+pkgver(){
+ cd "${srcdir}/${_gitbugsrc}"
+ git describe --long --tags | sed -r 's/([^-]*-g)/r\1/; s/-/./g'
+}
+
+prepare() {
+ mkdir -p "${srcdir}/${_gitbugsrc%/*}"
+ ln -rTsf "${srcdir}/${pkgname%-git}" "${srcdir}/${_gitbugsrc}"
+
+ export GOPATH="${srcdir}/gopath"
+ cd "${srcdir}/${_gitbugsrc}"
+ dep ensure
}
build() {
- cd git-bug
- GOPATH="$srcdir"/git-bug go get -v -x github.com/MichaelMure/git-bug
+ export GOPATH="${srcdir}/gopath"
+ cd "${srcdir}/${_gitbugsrc}"
+ go generate .
+ go install \
+ -gcflags "all=-trimpath=${PWD}" \
+ -asmflags "all=-trimpath=${PWD}" \
+ -ldflags "-extldflags ${LDFLAGS}" \
+ ./...
+ }
+
+check() {
+ export GOPATH="${srcdir}/gopath"
+ cd "${srcdir}/${_gitbugsrc}"
+ go test -bench=. ./...
}
package() {
- cd git-bug
- install -D bin/git-bug "$pkgdir"/usr/bin/git-bug
- install -Dm 644 -t "$pkgdir"/usr/share/bash-completion/completions misc/bash_completion/git-bug
- install -Dm 644 misc/zsh_completion/git-bug "$pkgdir"/usr/share/zsh/site-functions/_git-bug
- for f in doc/man/*.1; do gzip -n9f $f; done
- install -Dm 644 -t "$pkgdir"/usr/share/man/man1 doc/man/*.1.gz
- install -Dm 644 -t "$pkgdir"/usr/share/doc/git-bug README.md
- install -Dm 644 -t "$pkgdir"/usr/share/licenses/git-bug LICENSE
+ install -Dm755 "${srcdir}/gopath/bin/${pkgname%-git}" -t "${pkgdir}/usr/bin"
+ cd "${srcdir}/${_gitbugsrc}"
+ install -Dm644 doc/man/*.1 -t "${pkgdir}/usr/share/man/man1"
+ install -Dm644 README.md doc/*.md -t "${pkgdir}/usr/share/doc/${pkgname}"
+ install -Dm644 misc/bash_completion/git-bug -t "${pkgdir}/usr/share/bash-completion/completions"
+ install -Dm644 misc/zsh_completion/git-bug -T "${pkgdir}/usr/share/zsh/site-functions/_git-bug"
}