# Packager = Tuxcore <dev@tuxcore.org> 
pkgname=openconnect
pkgver=9.12
pkgrel=2
epoch=1
pkgdesc='Open client for Cisco AnyConnect VPN'
url='https://www.infradead.org/openconnect/'
arch=('x86_64')
license=('LGPL2.1')
depends=('libxml2' 'gnutls' 'libproxy' 'vpnc' 'krb5' 'lz4' 'pcsclite'
         'stoken' 'tpm2-tss' 'oath-toolkit' 'libproxy' 'libp11-kit'
         'xdg-utils'
         libstoken.so libtss2-esys.so libtss2-mu.so libtss2-tctildr.so
         libxml2.so libproxy.so libhogweed.so libp11-kit.so libpskc.so
         libgssapi_krb5.so libpcsclite.so)
makedepends=('intltool' 'python')
checkdepends=('python-flask')
optdepends=('python: tncc-wrapper')
provides=('libopenconnect.so')
options=('!emptydirs')
source=(https://www.infradead.org/openconnect/download/openconnect-${pkgver}.tar.gz{,.asc})
sha256sums=('a2bedce3aa4dfe75e36e407e48e8e8bc91d46def5335ac9564fbf91bd4b2413e'
            'SKIP')

build() {
  cd ${pkgname}-${pkgver}
  PYTHON=/usr/bin/python \
    ./configure \
    --prefix=/usr \
    --sbindir=/usr/bin \
    --libexecdir=/usr/lib \
    --disable-static
  sed -i -e 's/ -shared / -Wl,-O1,--as-needed\0/g' libtool
  make
}

check() {
  cd ${pkgname}-${pkgver}
  make check
}

package() {
  cd ${pkgname}-${pkgver}
  make DESTDIR="${pkgdir}" install
}

# vim: ts=2 sw=2 et:
