summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorMark Wagie2022-02-19 12:01:09 -0700
committerMark Wagie2022-02-19 12:01:09 -0700
commit59203dd4d7c44bc17f36bb2828367b3f9e6a83b7 (patch)
treeeec6d2e2e67856d7a92d6f8df4b10c54e6a62bda
parent6063fa2e6db927076af18e79acbae698c8347014 (diff)
downloadaur-59203dd4d7c44bc17f36bb2828367b3f9e6a83b7.tar.gz
download dependencies in prepare() for offline building
-rw-r--r--.SRCINFO2
-rw-r--r--PKGBUILD24
2 files changed, 14 insertions, 12 deletions
diff --git a/.SRCINFO b/.SRCINFO
index 5a4957439067..6c17b490ea4b 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -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
diff --git a/PKGBUILD b/PKGBUILD
index 88e03df457cd..5edd57d84dc3 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -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
}