summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorTimo Kramer2020-06-16 14:11:15 +0200
committerTimo Kramer2020-06-16 14:11:15 +0200
commit667627fea57628805423f5de8a2347acb93f83b4 (patch)
tree13c039a0a8cb52523853af53589716ff927a776b
parentac37b402d0088a0aeb762bf338ddd94466a84143 (diff)
downloadaur-667627fea57628805423f5de8a2347acb93f83b4.tar.gz
switched to go dependency and installing bash and zsh completion
-rw-r--r--.SRCINFO6
-rw-r--r--PKGBUILD22
2 files changed, 23 insertions, 5 deletions
diff --git a/.SRCINFO b/.SRCINFO
index 3628948980c1..933d9ddecd74 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,14 +1,14 @@
pkgbase = mullvad-vpn-cli
pkgdesc = The Mullvad VPN client cli
pkgver = 2020.4
- pkgrel = 1
+ pkgrel = 2
url = https://www.mullvad.net
install = mullvad-vpn-cli.install
arch = x86_64
license = GPL3
makedepends = git
- makedepends = cargo
- makedepends = go-pie
+ makedepends = rust
+ makedepends = go
depends = nss
conflicts = mullvad-vpn
source = git+https://github.com/mullvad/mullvadvpn-app.git#tag=2020.4?signed
diff --git a/PKGBUILD b/PKGBUILD
index 70679c2af947..f58fb2db3106 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -2,13 +2,13 @@
pkgname=mullvad-vpn-cli
pkgver=2020.4
-pkgrel=1
+pkgrel=2
pkgdesc="The Mullvad VPN client cli"
url="https://www.mullvad.net"
arch=('x86_64')
license=('GPL3')
depends=('nss')
-makedepends=('git' 'cargo' 'go-pie')
+makedepends=('git' 'rust' 'go')
conflicts=('mullvad-vpn')
install="${pkgname}.install"
_commit='90b0c06b59a0b9d6cda69924377335f39854b216'
@@ -32,6 +32,8 @@ prepare() {
git config submodule.mullvadvpn-app-binaries.url \
"${srcdir}/mullvadvpn-app-binaries"
git submodule update
+
+ mkdir -p dist-assets/shell-completions
}
build() {
@@ -64,6 +66,14 @@ build() {
# Update relays.json
cargo run -p mullvad-rpc --bin relay_list > dist-assets/relays.json
+
+ # Shell completions
+ cd mullvad-cli
+ for sh in bash zsh; do
+ echo "Generating shell completion script for $sh..."
+ cargo run --release --locked --features shell-completions -- \
+ shell-completions "$sh" ../dist-assets/shell-completions/
+ done
}
check() {
@@ -89,6 +99,14 @@ package() {
# Install CLI binary
install --verbose -D --mode=755 target/release/mullvad -t "${pkgdir}/usr/bin"
+ # Install shell completion zsh
+ install --verbose -D --mode=644 dist-assets/shell-completions/_mullvad -t \
+ "${pkgdir}/usr/local/share/zsh/site-functions"
+
+ # Install shell completion bash
+ install --verbose -D --mode=644 dist-assets/shell-completions/mullvad.bash -t \
+ "${pkgdir}/usr/share/bash-completion/completions"
+
# Install settings.json
install --verbose -D --mode=644 "${srcdir}/settings.json.sample" -t "${pkgdir}/etc/mullvad-vpn"