summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorCharles DELFLY2019-08-24 13:08:41 +0700
committerCharles DELFLY2019-08-24 13:08:41 +0700
commiteb08c0e4d610ea5167a2ec61f99428bb3a892172 (patch)
treef9ac2453e1cf6374923abd0051e770c94d127431
parente3ae49ebe06fef2381719a5cd78241cf12766a1a (diff)
downloadaur-eb08c0e4d610ea5167a2ec61f99428bb3a892172.tar.gz
Add lightman patch
-rw-r--r--.SRCINFO4
-rw-r--r--PKGBUILD42
-rw-r--r--user-env.patch19
3 files changed, 44 insertions, 21 deletions
diff --git a/.SRCINFO b/.SRCINFO
index 33c3c612ac01..2fb534f72e7c 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,7 +1,7 @@
pkgbase = openfortigui
pkgdesc = OpenFortiGUI is an open-source VPN-Client to connect to Fortigate VPN-Hardware. It is based on openfortivpn and adds an easy to use and nice GUI on top of it, written in Qt5.
pkgver = 0.8.0
- pkgrel = 1
+ pkgrel = 2
url = https://github.com/theinvisible/openfortigui.git
arch = i686
arch = x86_64
@@ -14,7 +14,9 @@ pkgbase = openfortigui
depends = ppp
depends = sudo
source = git+https://github.com/theinvisible/openfortigui.git#tag=v0.8.0
+ source = user-env.patch
md5sums = SKIP
+ md5sums = be12ed116cb5a39c69e8f0da7ff67db7
pkgname = openfortigui
diff --git a/PKGBUILD b/PKGBUILD
index 37424fba24dc..9041889c8647 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -1,7 +1,7 @@
# Maintainer: Charles Delfly <charles@delfly.fr>
pkgname=openfortigui
pkgver=0.8.0
-pkgrel=1
+pkgrel=2
pkgdesc="OpenFortiGUI is an open-source VPN-Client to connect to Fortigate VPN-Hardware. It is based on openfortivpn and adds an easy to use and nice GUI on top of it, written in Qt5."
arch=('i686' 'x86_64')
url="https://github.com/theinvisible/openfortigui.git"
@@ -14,38 +14,40 @@ conflicts=()
replaces=()
options=()
install=
-source=("git+https://github.com/theinvisible/$pkgname.git#tag=v$pkgver")
+source=("git+https://github.com/theinvisible/$pkgname.git#tag=v$pkgver" "user-env.patch")
#source=("git+https://github.com/theinvisible/$pkgname.git#commit=3f3143ffeeba8671320ac286de64dcfef47820c7")
noextract=()
-md5sums=('SKIP')
+md5sums=('SKIP' 'be12ed116cb5a39c69e8f0da7ff67db7')
prepare() {
- cd "$srcdir/$pkgname"
+ cd "$srcdir/$pkgname"
+ ls -la
+ cd openfortigui
+ git submodule init
+ git submodule update
+ cd ..
+ # patch from lightman to allows the client to run in the user environment (https://aur.archlinux.org/packages/openfortigui/#comment-701294)
+ git apply ../user-env.patch
}
build() {
- cd "$srcdir/$pkgname"
- cd openfortigui
- git submodule init
- git submodule update
- cd ..
- qmake
- make -j4
+ cd "$srcdir/$pkgname"
+ qmake
+ make -j4
}
-
check() {
- cd "$srcdir/$pkgname"
- make -k check
+ cd "$srcdir/$pkgname"
+ make -k check
}
package() {
- cd "$srcdir/$pkgname/openfortigui"
- mkdir -p $pkgdir/usr/bin $pkgdir/usr/share/pixmaps $pkgdir/usr/share/applications $pkgdir/etc/sudoers.d $pkgdir/etc/openfortigui/vpnprofiles
- install -m 755 openfortigui $pkgdir/usr/bin/
- install -m 440 sudo/openfortigui $pkgdir/etc/sudoers.d
- install -m 644 app-entry/openfortigui.png $pkgdir/usr/share/pixmaps/
- install -m 644 app-entry/openfortigui.desktop $pkgdir/usr/share/applications/
+ cd "$srcdir/$pkgname/openfortigui"
+ mkdir -p $pkgdir/usr/bin $pkgdir/usr/share/pixmaps $pkgdir/usr/share/applications $pkgdir/etc/sudoers.d $pkgdir/etc/openfortigui/vpnprofiles
+ install -m 755 openfortigui $pkgdir/usr/bin/
+ install -m 440 sudo/openfortigui $pkgdir/etc/sudoers.d
+ install -m 644 app-entry/openfortigui.png $pkgdir/usr/share/pixmaps/
+ install -m 644 app-entry/openfortigui.desktop $pkgdir/usr/share/applications/
}
diff --git a/user-env.patch b/user-env.patch
new file mode 100644
index 000000000000..1216f02ebf7a
--- /dev/null
+++ b/user-env.patch
@@ -0,0 +1,19 @@
+diff --git a/openfortigui/sudo/openfortigui b/openfortigui/sudo/openfortigui
+index 7b2fb8e..80062e6 100644
+--- a/openfortigui/sudo/openfortigui
++++ b/openfortigui/sudo/openfortigui
+@@ -1 +1 @@
+-%sudo ALL=NOPASSWD: /usr/bin/openfortigui
++%wheel ALL=NOPASSWD:SETENV: /usr/bin/openfortigui
+diff --git a/openfortigui/vpnmanager.cpp b/openfortigui/vpnmanager.cpp
+index baede6b..2f5fd1e 100644
+--- a/openfortigui/vpnmanager.cpp
++++ b/openfortigui/vpnmanager.cpp
+@@ -74,6 +74,7 @@ void vpnManager::startVPN(const QString &name)
+ return;
+
+ QStringList arguments;
++ arguments << "-E";
+ arguments << QCoreApplication::applicationFilePath();
+ arguments << "--start-vpn";
+ arguments << "--vpn-name";