summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: e2e9364ac8c5b34ecb63fbf599b406f7714cce8f (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
# Maintainer: Debasish Patra (depatra) <patradebasish1987@gmail.com>

pkgname=networkmanager-openconnect-useragent-git
pkgver=1.2.9dev+79+g351610a
pkgrel=1
pkgdesc="NetworkManager VPN plugin for OpenConnect with support for custom useragent"
url="https://wiki.gnome.org/Projects/NetworkManager"
arch=(x86_64)
license=(GPL)
provides=(networkmanager-openconnect)
conflicts=(networkmanager-openconnect)
depends=(libnm libsecret openconnect libopenconnect.so)
makedepends=(libnma intltool python git)
optdepends=('libnma: GUI support')
source=("git+https://gitlab.gnome.org/GNOME/NetworkManager-openconnect.git")
sha256sums=('SKIP')

pkgver() {
  cd NetworkManager-openconnect
  git describe --tags | sed 's/-dev/dev/;s/-/+/g'
}

prepare() {
  cd NetworkManager-openconnect
  intltoolize --automake --copy
  autoreconf -fvi
}

build() {
  cd NetworkManager-openconnect
  ./configure --prefix=/usr --with-gtk4=yes --sysconfdir=/etc --localstatedir=/var \
    --libexecdir=/usr/lib --disable-static
  sed -i -e 's/ -shared / -Wl,-O1,--as-needed\0/g' libtool
  make
}

package() {
  cd NetworkManager-openconnect
  make DESTDIR="$pkgdir" install dbusservicedir=/usr/share/dbus-1/system.d
  echo 'u nm-openconnect - "NetworkManager OpenConnect"' |
    install -Dm644 /dev/stdin "$pkgdir/usr/lib/sysusers.d/$pkgname.conf"
}