diff options
author | Mark Wagie | 2022-02-19 12:01:09 -0700 |
---|---|---|
committer | Mark Wagie | 2022-02-19 12:01:09 -0700 |
commit | 59203dd4d7c44bc17f36bb2828367b3f9e6a83b7 (patch) | |
tree | eec6d2e2e67856d7a92d6f8df4b10c54e6a62bda | |
parent | 6063fa2e6db927076af18e79acbae698c8347014 (diff) | |
download | aur-59203dd4d7c44bc17f36bb2828367b3f9e6a83b7.tar.gz |
download dependencies in prepare() for offline building
-rw-r--r-- | .SRCINFO | 2 | ||||
-rw-r--r-- | PKGBUILD | 24 |
2 files changed, 14 insertions, 12 deletions
@@ -1,7 +1,7 @@ pkgbase = mullvad-vpn-beta pkgdesc = The Mullvad VPN client app for desktop (beta channel) pkgver = 2022.1.beta1 - pkgrel = 2 + pkgrel = 3 url = https://www.mullvad.net install = mullvad-vpn.install arch = x86_64 @@ -12,7 +12,7 @@ _rel=1 pkgver=${_pkgver}.${_channel}${_rel} # stable #pkgver=${_pkgver}.${_channel} -pkgrel=2 +pkgrel=3 pkgdesc="The Mullvad VPN client app for desktop (beta channel)" arch=('x86_64') url="https://www.mullvad.net" @@ -55,11 +55,18 @@ prepare() { cargo fetch --locked --target "$CARCH-unknown-linux-gnu" - # 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. + pushd wireguard/libwg export GOPATH="$srcdir/gopath" - go clean -modcache + mkdir -p "../../build/lib/$CARCH-unknown-linux-gnu" + + go mod download -x + popd + + pushd gui + echo "Installing JavaScript dependencies..." + export npm_config_cache="$srcdir/npm_cache" + npm ci + popd } build() { @@ -76,7 +83,6 @@ build() { echo "Building wireguard-go..." pushd wireguard/libwg - mkdir -p "../../build/lib/$CARCH-unknown-linux-gnu" export GOPATH="$srcdir/gopath" export CGO_CPPFLAGS="${CPPFLAGS}" export CGO_CFLAGS="${CFLAGS}" @@ -86,9 +92,6 @@ build() { go build -v -o "../../build/lib/$CARCH-unknown-linux-gnu"/libwg.a -buildmode c-archive popd - # Clean mod cache for makepkg -C - go clean -modcache - export MULLVAD_ADD_MANIFEST="1" echo "Building Rust code in release mode using $RUSTC_VERSION..." @@ -125,9 +128,8 @@ build() { # Build Electron GUI app pushd gui - echo "Installing JavaScript dependencies..." - npm ci --cache "$srcdir/npm-cache" echo "Packing final release artifact..." + export npm_config_cache="$srcdir/npm_cache" npm run pack:linux popd } |