summarylogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--.SRCINFO18
-rw-r--r--PKGBUILD74
2 files changed, 58 insertions, 34 deletions
diff --git a/.SRCINFO b/.SRCINFO
index 97e1f03ed4eb..060844b0069d 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,19 +1,19 @@
-# Generated by mksrcinfo v8
-# Mon Aug 20 03:12:11 UTC 2018
pkgbase = git-bug-git
- pkgdesc = Distributed bug tracker embedded in Git (git)
- pkgver = 0.2.0+15+g8abf984
+ pkgdesc = Distributed bug tracker embedded in Git
+ pkgver = 0.4.0.r29.gc92da55
pkgrel = 1
url = https://github.com/MichaelMure/git-bug
- arch = i686
arch = x86_64
+ arch = i686
license = GPL3
- makedepends = go
+ makedepends = go-pie
+ makedepends = dep
+ depends = git
+ optdepends = xdg-utils: open bugs in browser
provides = git-bug
conflicts = git-bug
- conflicts = git-bug-bin
- source = git+https://github.com/MichaelMure/git-bug
- sha512sums = SKIP
+ source = git+https://github.com/MichaelMure/git-bug.git
+ sha256sums = SKIP
pkgname = git-bug-git
diff --git a/PKGBUILD b/PKGBUILD
index 9635117feea5..8df69b8d4733 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"
}