summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: a3a66f51bb8beaec504fc4569ced3860f05be67f (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
60
61
62
63
64
65
66
67
68
69
70
71
# Maintainer: Mario Finelli <mario at finel dot li>
# Contributor: Bartłomiej Piotrowski <bpiotrowski@archlinux.org>

pkgname=networkmanager-fortisslvpn
pkgver=1.4.0
pkgrel=4
pkgdesc="NetworkManager VPN plugin for Fortinet SSLVPN"
url="https://wiki.gnome.org/Projects/NetworkManager"
arch=(x86_64)
license=(GPL)
_pppver=2.5.0
depends=(
  libnm
  libsecret
  openfortivpn
  "ppp=$_pppver"
)
makedepends=(
  git
  libnma
  libnma-gtk4
  python
)
optdepends=(
  'libnma-gtk4: GUI support (GTK 4)'
  'libnma: GUI support (GTK 3)'
)
_commit=308987d45faee919e54547eb7ff0120c32c5a84e  # tags/1.4.0^0
source=("git+https://gitlab.gnome.org/GNOME/NetworkManager-fortisslvpn.git#commit=$_commit")
b2sums=('SKIP')

pkgver() {
  cd NetworkManager-fortisslvpn
  git describe --tags | sed 's/-dev/dev/;s/[^-]*-g/r&/;s/-/+/g'
}

prepare() {
  cd NetworkManager-fortisslvpn

  # ppp 2.5.0
  git cherry-pick -n 084ef529c5fb8169 8773f772d39f8eee d59819b5d26db44f

  # https://aur.archlinux.org/packages/networkmanager-fortisslvpn#comment-934156
  sed -i 's/"--no-routes"/"--pppd-accept-remote"/g' src/nm-fortisslvpn-service.c

  autoreconf -fvi
}

build() {
  local configure_options=(
    --prefix=/usr
    --sysconfdir=/etc
    --localstatedir=/var
    --libexecdir=/usr/lib
    --disable-static
    --with-gtk4
    --with-pppd-plugin-dir=/usr/lib/pppd/$_pppver
  )

  cd NetworkManager-fortisslvpn
  ./configure "${configure_options[@]}"
  sed -i -e 's/ -shared / -Wl,-O1,--as-needed\0/g' libtool
  make
}

package() {
  cd NetworkManager-fortisslvpn
  make DESTDIR="$pkgdir" install dbusservicedir=/usr/share/dbus-1/system.d
}

# vim:set sw=2 sts=-1 et: