protonvpn

This commit is contained in:
Nathan 2022-02-07 10:59:15 -06:00
parent 5169548082
commit 2579ad0619
8 changed files with 231 additions and 0 deletions

View file

@ -0,0 +1,25 @@
# Maintainer: Nathan <ndowens@artixlinux.org>
_pkgname="gitlog-to-changelog"
pkgname="${_pkgname}"
pkgdesc="Convert git log output to ChangeLog format."
url="https://git.savannah.gnu.org/gitweb/?p=gnulib.git;a=blob_plain;f=build-aux/gitlog-to-changelog"
license=("GPL3")
epoch=0
pkgver=20220127T1849
pkgrel=1
arch=('any')
depends=('perl')
makedepends=('curl')
source=("${_pkgname}::https://git.savannah.gnu.org/gitweb/?p=gnulib.git;a=blob_plain;f=build-aux/gitlog-to-changelog")
sha256sums=('SKIP')
pkgver() {
cd "${srcdir}"
perl "./${_pkgname}" --version | awk '{print $3"T"$4}' | tr -d ':-'
}
package() {
cd "${srcdir}"
install -D -m755 -v "${_pkgname}" "${pkgdir}/usr/bin/${_pkgname}"
}

24
protonvpn-cli/PKGBUILD Normal file
View file

@ -0,0 +1,24 @@
# Maintainer: Nathan <ndowens@artixlinux.org>
pkgname=protonvpn-cli
_gitpkgname=linux-cli
pkgver=3.11.0
pkgrel=1
pkgdesc="Official ProtonVPN Command Line Interface, maintained by the ProtonVPN team."
arch=("any")
url="https://github.com/ProtonVPN/"
license=("GPL3")
groups=("ProtonVPN")
depends=("python-protonvpn-nm-lib" "python-dialog")
makedepends=("python-setuptools")
source=("https://github.com/ProtonVPN/linux-cli/archive/refs/tags/$pkgver.tar.gz")
sha256sums=('b2cc9196cc3bcb6e29326bde72c8230f04f6d51e6aea4fbf221cc4064361d972')
build() {
cd "$_gitpkgname-$pkgver"
python setup.py build
}
package() {
cd "$_gitpkgname-$pkgver"
python setup.py install --root="$pkgdir" --optimize=1
}

31
protonvpn-gui/PKGBUILD Normal file
View file

@ -0,0 +1,31 @@
#Maintainer: Nathan <ndowens@artixlinux.org>
pkgname=protonvpn-gui
_gitpkgname=linux-app
pkgver=1.7.0
pkgrel=1
pkgdesc="Official ProtonVPN Graphical User Interface, maintained by the ProtonVPN team."
arch=("any")
url="https://github.com/ProtonVPN/"
license=("GPL3")
groups=("ProtonVPN")
depends=("python-protonvpn-nm-lib" "python-gobject" "python-psutil" "gtk3" "python-cairo" "webkit2gtk")
optdepends=("libappindicator-gtk3")
makedepends=("python-setuptools")
source=("https://github.com/ProtonVPN/linux-app/archive/refs/tags/$pkgver.tar.gz")
sha256sums=('59115d756c007c94dc5c498b726576ec2b4db4149abbe17c546dc7cee7f57286')
build() {
cd "$_gitpkgname-$pkgver"
python setup.py build
}
package() {
cd "$_gitpkgname-$pkgver"
install -d -m755 "${pkgdir}/usr/share/applications"
install -d -m755 "${pkgdir}/usr/share/icons/hicolor/scalable/apps/"
cp protonvpn.desktop "${pkgdir}/usr/share/applications/protonvpn.desktop"
cp ./protonvpn_gui/assets/icons/protonvpn-logo.png "${pkgdir}/usr/share/icons/hicolor/scalable/apps/"
python setup.py install --root="$pkgdir" --optimize=1
}

View file

@ -0,0 +1,61 @@
From 9d61e2924eadca20008a66d616bc36074a98db9a Mon Sep 17 00:00:00 2001
From: Nathan <ndowens@artixlinux.org>
Date: Mon, 7 Feb 2022 10:51:14 -0600
Subject: [PATCH] remove systemd
---
protonvpn_nm_lib/core/dbus/dbus_reconnect.py | 17 -----------------
protonvpn_nm_lib/core/subprocess_wrapper.py | 2 +-
2 files changed, 1 insertion(+), 18 deletions(-)
diff --git a/protonvpn_nm_lib/core/dbus/dbus_reconnect.py b/protonvpn_nm_lib/core/dbus/dbus_reconnect.py
index 49abc48..462d900 100644
--- a/protonvpn_nm_lib/core/dbus/dbus_reconnect.py
+++ b/protonvpn_nm_lib/core/dbus/dbus_reconnect.py
@@ -120,10 +120,6 @@ class DbusReconnect:
int: indicates the status of the daemon process
"""
logger.info("Checking daemon reconnector status")
- check_daemon = subprocess.run(
- ["systemctl", "status", "--user", "protonvpn_reconnect"],
- stdout=subprocess.PIPE, stderr=subprocess.PIPE
- )
decoded_stdout = check_daemon.stdout.decode()
if (
check_daemon.returncode == 3
@@ -159,19 +155,6 @@ class DbusReconnect:
if command not in self.DAEMON_COMMANDS:
raise Exception("Invalid daemon command \"{}\"".format(command))
- call_daemon = subprocess.run(
- ["systemctl", command.value, "--user", "protonvpn_reconnect"],
- stdout=subprocess.PIPE, stderr=subprocess.PIPE
- )
- if command == DaemonReconnectorEnum.DAEMON_RELOAD:
- call_daemon = subprocess.run(
- [
- "systemctl",
- "--user",
- DaemonReconnectorEnum.DAEMON_RELOAD.value
- ],
- stdout=subprocess.PIPE, stderr=subprocess.PIPE
- )
decoded_stdout = call_daemon.stdout.decode()
decoded_stderr = call_daemon.stderr.decode().strip("\n")
diff --git a/protonvpn_nm_lib/core/subprocess_wrapper.py b/protonvpn_nm_lib/core/subprocess_wrapper.py
index 96634f6..5a8098e 100644
--- a/protonvpn_nm_lib/core/subprocess_wrapper.py
+++ b/protonvpn_nm_lib/core/subprocess_wrapper.py
@@ -18,7 +18,7 @@ class SubprocessWrapper:
is effectivtly a layer on top of subprocess.
"""
- _acceptable_binaries = {"nmcli", "systemctl", "clear", "xdg-open"}
+ _acceptable_binaries = {"nmcli", "clear", "xdg-open"}
PIPE = _subprocess.PIPE
STDOUT = _subprocess.STDOUT
DEVNULL = _subprocess.DEVNULL
--
2.35.1

33
protonvpn-nm-lib/PKGBUILD Normal file
View file

@ -0,0 +1,33 @@
# Maintainer: Nathan <ndowens@artixlinux.org>
pkgname=python-protonvpn-nm-lib
_gitpkgname=protonvpn-nm-lib
pkgver=3.7.0
pkgrel=2.1
pkgdesc="Official ProtonVPN NetworkManager Library, maintained by the ProtonVPN team."
arch=("any")
url="https://github.com/ProtonVPN"
license=("GPL3")
groups=("ProtonVPN")
depends=("python-proton-client" "networkmanager" "networkmanager-openvpn" "openvpn" "libnm" "dbus" "libsecret" "python-pyxdg" "python-keyring" "python-jinja" "python-distro" "python-dbus" "xdg-utils" "python-gobject")
conflicts=("protonvpn-cli<3.11.0" "protonvpn-cli<1.7.0")
makedepends=("python-setuptools")
source=("https://github.com/ProtonVPN/protonvpn-nm-lib/archive/refs/tags/$pkgver.tar.gz"
"0001-remove-systemd.patch")
sha256sums=('df556d4c3e8d22e39db9a1e6d78263fe591e31866f1f6a50dfd4be677b2f2576'
'a2cb8dff7a4334c5bb8f8fa9cbf0bd5c533c6fc930ff011f0d47116eddfcc4e6')
prepare() {
cd "$_gitpkgname-$pkgver"
patch -Np1 -i ../0001-remove-systemd.patch
}
build() {
cd "$_gitpkgname-$pkgver"
python setup.py build
}
package() {
cd "$_gitpkgname-$pkgver"
python setup.py install --root="$pkgdir" --optimize=1
}

View file

@ -0,0 +1,9 @@
#Maintainer:Nathan <ndowens@artixlinux.org>
pkgname=protonvpn
pkgver=1.0.0
pkgrel=1
pkgdesc="Official ProtonVPN metapackage that installs protonvpn-gui and protonvpn-cli, maintained by the ProtonVPN team."
arch=("any")
url="https://github.com/ProtonVPN/"
license=("GPL3")
depends=("protonvpn-cli" "protonvpn-gui")

22
python-dialog/PKGBUILD Normal file
View file

@ -0,0 +1,22 @@
# Maintainer: Nathan <ndowens@artixlinux.org>
pkgname=python-dialog
pkgver=3.5.3
pkgrel=1
pkgdesc="Python wrapper for dialog"
arch=(any)
url="https://pythondialog.sourceforge.io"
license=('LGPL-2.1')
depends=(python3)
makedepends=('python-setuptools' 'git' 'gitlog-to-changelog-git')
source=("${pkgname}::git+https://git.code.sf.net/p/pythondialog/code.git#tag=v${pkgver}")
sha256sums=('SKIP')
build() {
cd "$pkgname"
python setup.py build
}
package() {
cd "$pkgname"
python setup.py install --skip-build --root="${pkgdir}" --optimize='1'
}

View file

@ -0,0 +1,26 @@
#Maintainer: Nathan <ndowens@artixlinux.org>
pkgname=python-proton-client
_gitpkgname=proton-python-client
pkgver=0.7.1
pkgrel=1
pkgdesc="Official Proton API Python Client, maintained by the Proton(VPN/Mail) team."
arch=("any")
url="https://github.com/ProtonMail/proton-python-client"
license=("GPL3")
groups=("ProtonVPN")
depends=("python-requests" "python-bcrypt" "python-gnupg" "python-pyopenssl" "python-dnspython")
conflicts=("python-protonvpn-nm-lib<3.4.0")
makedepends=("python-setuptools")
source=("https://github.com/ProtonMail/proton-python-client/archive/refs/tags/$pkgver.tar.gz")
sha256sums=('88d2546a922d9053988b5e1863bf6cf965e97b4c643cd879f16bb3f0b5f02b5e')
build() {
cd "$_gitpkgname-$pkgver"
python setup.py build
}
package() {
cd "$_gitpkgname-$pkgver"
python setup.py install --root="$pkgdir" --optimize=1
}