diff options
author | Mark Wagie | 2022-02-19 12:18:52 -0700 |
---|---|---|
committer | Mark Wagie | 2022-02-19 12:18:52 -0700 |
commit | b33afc996959781b17445949e442729f553316b6 (patch) | |
tree | 5882397998e5f9523c237825522ab0208ba2b308 | |
parent | bbd5e280945038d1f17909ed2a1d2466905d6555 (diff) | |
download | aur-b33afc996959781b17445949e442729f553316b6.tar.gz |
download dependencies in prepare() for offline building
-rw-r--r-- | .SRCINFO | 2 | ||||
-rw-r--r-- | PKGBUILD | 17 |
2 files changed, 9 insertions, 10 deletions
@@ -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 @@ -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() { |