summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 4cc7da8f5167f5bd5780bf5e246b4b04232d4bab (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
50
51
52
53
54
55
56
57
58
59
# Maintainer: Josef Vybíhal <josef.vybihal@gmail.com>
# Contributor: Charles Delfly <charles@delfly.fr>

pkgname=openfortigui-git
_pkgname="${pkgname%-git}"
pkgver=0.9.8.1.r0.g31eff99
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://github.com/theinvisible/openfortigui.git"
license=('GPL3')
groups=()
depends=('qt5-base' 'qtkeychain' 'qt5-translations' 'openssl' 'ppp' 'sudo')
makedepends=('git')
provides=(openfortigui)
conflicts=(openfortigui)
replaces=()
options=()
install=
source=("git+https://github.com/theinvisible/$_pkgname.git")
noextract=()
b2sums=('SKIP')
#options=(debug !strip)

pkgver() {
  cd "${pkgname%-git}"
  git describe --long --tags | sed 's/^v//;s/\([^-]*-g\)/r\1/;s/-/./g'
}

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

build() {
    cd "$srcdir/${_pkgname}"
    #qmake openfortigui-project.pro -spec linux-g++ CONFIG+=debug CONFIG+=qml_debug
    qmake
    make
}

check() {
    cd "$srcdir/${_pkgname}"
    make -k check
}

package() {
    cd "$srcdir/${_pkgname}/${_pkgname}"
    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/
}