summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorMark Wagie2022-02-19 12:18:52 -0700
committerMark Wagie2022-02-19 12:18:52 -0700
commitb33afc996959781b17445949e442729f553316b6 (patch)
tree5882397998e5f9523c237825522ab0208ba2b308
parentbbd5e280945038d1f17909ed2a1d2466905d6555 (diff)
downloadaur-b33afc996959781b17445949e442729f553316b6.tar.gz
download dependencies in prepare() for offline building
-rw-r--r--.SRCINFO2
-rw-r--r--PKGBUILD17
2 files changed, 9 insertions, 10 deletions
diff --git a/.SRCINFO b/.SRCINFO
index 4317e773e9b9..7d5fff954289 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,7 +1,7 @@
pkgbase = wtfutil
pkgdesc = Personal information dashboard for your terminal
pkgver = 0.41.0
- pkgrel = 1
+ pkgrel = 2
url = https://wtfutil.com
arch = x86_64
arch = aarch64
diff --git a/PKGBUILD b/PKGBUILD
index ad0e110cedb1..0b2e0f5dc88f 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -5,7 +5,7 @@
pkgname=wtfutil
pkgver=0.41.0
-pkgrel=1
+pkgrel=2
pkgdesc="Personal information dashboard for your terminal"
arch=('x86_64' 'aarch64' 'armv6h')
url="https://wtfutil.com"
@@ -16,18 +16,19 @@ source=("$pkgname-$pkgver.tar.gz::https://github.com/wtfutil/wtf/archive/v$pkgve
sha256sums=('e01f45aaa7a1e31ab555071763da184d611f87b1800265dc782502da9c985eaf')
prepare() {
- # Prevent creation of a `go` directory in one's home.
- # Sometimes this directory cannot be removed with even `rm -rf` unless
- # one becomes root or changes the write permissions.
+ cd "wtf-$pkgver"
export GOPATH="$srcdir/gopath"
- go clean -modcache
+
+ # download dependencies
+ go mod download -x
}
build() {
cd "wtf-$pkgver"
+ export GOPATH="$srcdir/gopath"
local flags="-s -w -X main.version=${pkgver} -X main.date=$(date +%FT%T%z)"
- go build \
+ go build -v \
-trimpath \
-buildmode=pie \
-mod=readonly \
@@ -38,10 +39,8 @@ build() {
check() {
cd "wtf-$pkgver"
+ export GOPATH="$srcdir/gopath"
go test ./...
-
- # Clean mod cache for makepkg -C
- go clean -modcache
}
package() {