summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: aaa38d8600cb643e52108f778c77ce36d76d068a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
# Maintainer: Charles Delfly <charles@delfly.fr>
pkgname=openfortigui
pkgver=0.9.10
pkgrel=1
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://hadler.me/linux/openfortigui/"
license=('GPL3')
groups=()
depends=('qt5-base' 'qtkeychain' 'qt5-translations' 'openssl' 'ppp' 'sudo')
makedepends=('gcc' 'git' 'make' 'patch')
provides=()
conflicts=()
replaces=()
options=()
install=
source=("git+https://github.com/theinvisible/$pkgname.git#tag=v$pkgver-$pkgrel" "user-env.patch")
noextract=()
md5sums=('SKIP' '7f1e96dea4ce324b59b8190640f22c43')

prepare() {
    cd "$srcdir/$pkgname"
    cd openfortigui
    git submodule init
    git submodule update
    cd ..
    patch -p1 < ../user-env.patch
}

build() {
    cd "$srcdir/$pkgname"
    qmake
    make
}

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/
    chmod 640 $pkgdir/etc/sudoers.d
    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/
}