diff options
-rw-r--r-- | .SRCINFO | 7 | ||||
-rw-r--r-- | PKGBUILD | 67 |
2 files changed, 34 insertions, 40 deletions
@@ -1,13 +1,11 @@ pkgbase = git-bug-git pkgdesc = Distributed bug tracker embedded in Git - pkgver = 0.4.0.r29.gc92da55 + pkgver = v0.8.0.r187.g20e62977 pkgrel = 1 url = https://github.com/MichaelMure/git-bug arch = x86_64 - arch = i686 license = GPL3 - makedepends = go-pie - makedepends = dep + makedepends = go depends = git optdepends = xdg-utils: open bugs in browser provides = git-bug @@ -16,4 +14,3 @@ pkgbase = git-bug-git sha256sums = SKIP pkgname = git-bug-git - @@ -1,59 +1,56 @@ -# Maintainer: Rafael Ascensão <rafa dot almas at gmail dot com> +# Maintainer: René Wagner <rwa at clttr dot info> +# Contributor: Rafael Ascensão <rafa dot almas at gmail dot com> # Contributor: Jean Lucas <jean@4ray.co> pkgname=git-bug-git -pkgver=0.4.0.r29.gc92da55 +pkgver=v0.8.0.r187.g20e62977 pkgrel=1 pkgdesc='Distributed bug tracker embedded in Git' -arch=('x86_64' 'i686') +arch=('x86_64') url="https://github.com/MichaelMure/${pkgname%-git}" license=('GPL3') depends=('git') -makedepends=('go-pie' 'dep') +makedepends=('go') 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}" +pkgver() { + cd "${srcdir}/${pkgname%-git}" 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() { - export GOPATH="${srcdir}/gopath" - cd "${srcdir}/${_gitbugsrc}" - go generate . - go install \ - -gcflags "all=-trimpath=${PWD}" \ - -asmflags "all=-trimpath=${PWD}" \ - -ldflags "-extldflags ${LDFLAGS}" \ - ./... - } + cd "${srcdir}/${pkgname%-git}" + + export CGO_CPPFLAGS="${CPPFLAGS}" + export CGO_CFLAGS="${CFLAGS}" + export CGO_CXXFLAGS="${CXXFLAGS}" + + local commands_path='github.com/MichaelMure/git-bug/commands' + go generate + go build \ + -mod=readonly \ + -buildmode=pie \ + -trimpath \ + -ldflags "-X ${commands_path}.GitCommit=$(git rev-list -1 HEAD) \ + -X ${commands_path}.GitLastTag=$(git describe --abbrev=0 --tags) \ + -X ${commands_path}.GitExactTag=$(git name-rev --name-only --tags HEAD) \ + -extldflags \"${LDFLAGS}\"" +} check() { - export GOPATH="${srcdir}/gopath" - cd "${srcdir}/${_gitbugsrc}" - go test -bench=. ./... + cd "${srcdir}/${pkgname%-git}" + go test ./... } package() { - 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" + cd "${srcdir}/${pkgname%-git}" + install -Dm755 "${pkgname%-git}" -t "${pkgdir}/usr/bin" + install -Dm644 doc/man/*.1 -t "${pkgdir}/usr/share/man/man1" + install -Dm644 doc/*.md -t "${pkgdir}/usr/share/doc/${pkgname}" + install -Dm644 misc/completion/bash/git-bug -t "${pkgdir}/usr/share/bash-completion/completions" + install -Dm644 misc/completion/zsh/git-bug -T "${pkgdir}/usr/share/zsh/site-functions/_git-bug" } |