summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorAdrian Perez de Castro2019-02-05 19:55:58 +0200
committerAdrian Perez de Castro2019-02-05 19:55:58 +0200
commite3d91ff8453fdc29a2ff28c926ea6f710e9c15d0 (patch)
treee2b591161426b5db8f35dd519744eb2025f51517
parent872fb794c75f679803d50c510d797c4326b2d203 (diff)
downloadaur-e3d91ff8453fdc29a2ff28c926ea6f710e9c15d0.tar.gz
Package uses Go 1.11 modules, bring the build into the future
-rw-r--r--.SRCINFO7
-rw-r--r--.gitignore3
-rw-r--r--PKGBUILD35
3 files changed, 32 insertions, 13 deletions
diff --git a/.SRCINFO b/.SRCINFO
index 769a037b084c..f1f6cbdd6cdc 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,15 +1,18 @@
pkgbase = gomuks-git
pkgdesc = A terminal based Matrix client written in Go
- pkgver = r257.c3f30a1
+ pkgver = 0.r280
pkgrel = 1
url = https://github.com/tulir/gomuks
arch = x86_64
arch = i686
license = GPL3
- makedepends = go
+ makedepends = go-pie
+ makedepends = git
depends = glibc
provides = gomuks
conflicts = gomuks
+ source = gomuks-git::git+https://github.com/tulir/gomuks
+ sha512sums = SKIP
pkgname = gomuks-git
diff --git a/.gitignore b/.gitignore
index 4fdb930965a3..9163d9f1384a 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,2 +1,5 @@
+/*.tar
+/*.tar.*
+/gomuks-git/
/pkg/
/src/
diff --git a/PKGBUILD b/PKGBUILD
index 6f96077bf7e3..768c96a944aa 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -1,31 +1,44 @@
# Maintainer: Adrian Perez de Castro <aperez@igalia.com>
pkgname=gomuks-git
pkgdesc='A terminal based Matrix client written in Go'
-pkgver=r270.2fc3378
+pkgver=0.r280
pkgrel=1
url='https://github.com/tulir/gomuks'
license=(GPL3)
arch=(x86_64 i686)
depends=(glibc)
-makedepends=(go git)
+makedepends=(go-pie git)
provides=("${pkgname%-git}")
conflicts=("${provides[@]}")
+source=("${pkgname}::git+${url}")
+sha512sums=(SKIP)
-_gopkg='maunium.net/go/gomuks'
+prepare () {
+ cd "${pkgname}"
+
+ # The Go modules index has some replacements to use locally checked
+ # out modules; so remove those to make sure "go build" below will
+ # ensure that the correct version is always fetched.
+ sed -i -e '/^replace\s/d' go.mod
+}
pkgver () {
- GOPATH="${srcdir}" go get -v -u -d "${_gopkg}"
- cd "src/${_gopkg}"
- ( set -o pipefail
- git describe --long --tags 2>/dev/null | sed 's/\([^-]*-g\)/r\1/;s/-/./g' ||
- printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)"
- )
+ cd "${pkgname}"
+ echo "0.r$(git rev-list --count HEAD)"
}
build () {
- GOPATH="${srcdir}" go get -v "${_gopkg}"
+ cd "${pkgname}"
+ local curdir=$(pwd)
+ go build \
+ -gcflags "all=-trimpath=${curdir}" \
+ -asmflags "all=-trimpath=${curdir}" \
+ -ldflags "-extldflags ${LDFLAGS}" \
+ .
}
package () {
- install -Dm755 "${srcdir}/bin/gomuks" "${pkgdir}/usr/bin/gomuks"
+ cd "${pkgname}"
+ install -Dm755 gomuks "${pkgdir}/usr/bin/gomuks"
+ install -Dm644 README.md "${pkgdir}/usr/share/doc/${pkgname}/README.md"
}