summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorRafael Ascensão2020-06-08 21:51:21 +0100
committerRafael Ascensão2020-06-08 21:51:21 +0100
commit6b7367dfd0505231c7b78b58049c1fc30177a289 (patch)
tree937ca40620c13fcdd186d62210f5d538f1cc6f24
parent61f56f19e11744319b16373ce9f08d8971812bc5 (diff)
downloadaur-6b7367dfd0505231c7b78b58049c1fc30177a289.tar.gz
Conform to the new guidelines for go packages
With the removal of go-pie package the guidelines for go packages have changed. Update PKGBUILD to comply.
-rw-r--r--.SRCINFO4
-rw-r--r--PKGBUILD28
2 files changed, 15 insertions, 17 deletions
diff --git a/.SRCINFO b/.SRCINFO
index 55e321ec1978..d0aacc656b23 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,11 +1,11 @@
pkgbase = git-bug-git
pkgdesc = Distributed bug tracker embedded in Git
- pkgver = 0.7.0.r6.g05c968ca
+ pkgver = 0.7.1.r21.g5029cc1e
pkgrel = 1
url = https://github.com/MichaelMure/git-bug
arch = x86_64
license = GPL3
- makedepends = go-pie
+ makedepends = go
depends = git
optdepends = xdg-utils: open bugs in browser
provides = git-bug
diff --git a/PKGBUILD b/PKGBUILD
index 47973fa3f898..6fdfe6542310 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -2,14 +2,14 @@
# Contributor: Jean Lucas <jean@4ray.co>
pkgname=git-bug-git
-pkgver=0.7.0.r6.g05c968ca
+pkgver=0.7.1.r21.g5029cc1e
pkgrel=1
pkgdesc='Distributed bug tracker embedded in Git'
arch=('x86_64')
url="https://github.com/MichaelMure/${pkgname%-git}"
license=('GPL3')
depends=('git')
-makedepends=('go-pie')
+makedepends=('go')
optdepends=('xdg-utils: open bugs in browser')
provides=('git-bug')
conflicts=('git-bug')
@@ -21,30 +21,28 @@ pkgver() {
git describe --long --tags | sed -r 's/([^-]*-g)/r\1/; s/-/./g'
}
-prepare() {
- cd "${srcdir}/${pkgname%-git}"
- export GOPATH=${srcdir}
- go mod vendor -v
-}
-
build() {
cd "${srcdir}/${pkgname%-git}"
- export GOPATH=${srcdir}
- commands_path='github.com/MichaelMure/git-bug/commands'
+
+ 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=vendor \
+ -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}"
- }
+ -extldflags \"${LDFLAGS}\""
+}
check() {
cd "${srcdir}/${pkgname%-git}"
- export GOPATH=${srcdir}
- go test -mod=vendor -bench=. ./...
+ go test ./...
}
package() {