From 514498eb3f9e389d56e2060979504ef1d9618112 Mon Sep 17 00:00:00 2001 From: Martoko Date: Fri, 19 Apr 2019 10:23:35 +0200 Subject: [PATCH] Update to 3.0.0-4 Add dependency on iproute2 as it was added upstream Remove fix for systemd service file paths as upstream places them correctly now Nordvpnd has been split into two services Print message after install informing users about what services to start --- .SRCINFO | 8 +++++--- PKGBUILD | 15 ++++++--------- nordvpn-bin.install | 13 +++++++++++++ 3 files changed, 24 insertions(+), 12 deletions(-) create mode 100644 nordvpn-bin.install diff --git a/.SRCINFO b/.SRCINFO index 91aa863..d7fb0b5 100644 --- a/.SRCINFO +++ b/.SRCINFO @@ -1,18 +1,20 @@ pkgbase = nordvpn-bin pkgdesc = NordVPN CLI tool for Linux - pkgver = 2.2.0_3 + pkgver = 3.0.0_4 pkgrel = 1 url = https://nordvpn.com/download/linux/ + install = nordvpn-bin.install arch = x86_64 license = custom depends = net-tools depends = libxslt depends = iptables depends = procps + depends = iproute2 provides = nordvpn conflicts = openvpn-nordvpn - source = https://repo.nordvpn.com/deb/nordvpn/debian/pool/main/nordvpn_2.2.0-3_amd64.deb - sha256sums = 84fbb3cf9c4c73f3158987e51ea7e9a73bac2ec4e0bafaecec70997bdee07763 + source = https://repo.nordvpn.com/deb/nordvpn/debian/pool/main/nordvpn_3.0.0-4_amd64.deb + sha256sums = a4a9602a9ecc1b29eb4ef9667993bd68999f42fc1962588951845a797d31ecfa pkgname = nordvpn-bin diff --git a/PKGBUILD b/PKGBUILD index 5804acf..afab561 100644 --- a/PKGBUILD +++ b/PKGBUILD @@ -3,26 +3,23 @@ # Maintainer: Martoko pkgname=nordvpn-bin -pkgver=2.2.0_3 +pkgver=3.0.0_4 pkgrel=1 pkgdesc="NordVPN CLI tool for Linux" arch=('x86_64') url="https://nordvpn.com/download/linux/" license=('custom') -depends=('net-tools' 'libxslt' 'iptables' 'procps') +depends=('net-tools' 'libxslt' 'iptables' 'procps' 'iproute2') provides=('nordvpn') conflicts=('openvpn-nordvpn') +install=nordvpn-bin.install source=("https://repo.nordvpn.com/deb/nordvpn/debian/pool/main/nordvpn_${pkgver//_/-}_amd64.deb") -sha256sums=('84fbb3cf9c4c73f3158987e51ea7e9a73bac2ec4e0bafaecec70997bdee07763') +sha256sums=('a4a9602a9ecc1b29eb4ef9667993bd68999f42fc1962588951845a797d31ecfa') package() { bsdtar -O -xf "nordvpn_${pkgver//_/-}_amd64.deb" data.tar.xz | bsdtar -C "${pkgdir}" -xJf - - mv "${pkgdir}/usr/sbin/nordvpnd" "${pkgdir}/usr/bin" + mv "${pkgdir}/usr/sbin/nordvpnsd" "${pkgdir}/usr/bin" + mv "${pkgdir}/usr/sbin/nordvpnud" "${pkgdir}/usr/bin" rm -r "${pkgdir}/usr/sbin" - - mkdir -p "${pkgdir}/usr/lib/systemd/system/" - mv "${pkgdir}/etc/systemd/system/nordvpnd.socket" "${pkgdir}/usr/lib/systemd/system/" - mv "${pkgdir}/etc/systemd/system/nordvpnd.service" "${pkgdir}/usr/lib/systemd/system/" - rm -r "${pkgdir}/etc" } diff --git a/nordvpn-bin.install b/nordvpn-bin.install new file mode 100644 index 0000000..d3de5a7 --- /dev/null +++ b/nordvpn-bin.install @@ -0,0 +1,13 @@ +post_install() { + echo ':: In order to enable nordvpn you have to start two services:' + echo ' sudo systemctl enable --now nordvpnsd' + echo ' systemctl --user enable --now nordvpnud' +} + +post_upgrade() { + if [ $(vercmp $2 3.0.0-4) -lt 0 ]; then + echo ':: In order to enable nordvpn you have to start two services:' + echo ' sudo systemctl enable --now nordvpnsd' + echo ' systemctl --user enable --now nordvpnud' + fi +}