summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 4f2d659bd4fd132b759302081b9ca1d99dee765e (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
# Maintainer: asamk
# Contributor: envolution
# Contributor: Olliver Schinagl <oliver@schinagl.nl>
# Contributor: Maxime Gauduin <alucryd@archlinux.org>
# Contributor: Bartłomiej Piotrowski <bpiotrowski@archlinux.org>
pkgname=openfortivpn-git
_pkgname=openfortivpn
pkgver=1.23.0+r4+g27517e0
pkgrel=1
pkgdesc="An open implementation of Fortinet's proprietary PPP+SSL VPN solution"
arch=(x86_64)
url=https://github.com/adrienverge/openfortivpn
license=(GPL-3.0-only)
depends=(
  glibc
  openssl
  ppp
  resolvconf
  systemd-libs
)
makedepends=(
  git
  systemd
)
provides=('openfortivpn')
conflicts=('openfortivpn')
backup=(etc/openfortivpn/config)
source=(git+https://github.com/adrienverge/openfortivpn.git)
sha256sums=('SKIP')

prepare() {
  cd openfortivpn
  autoreconf -fiv
}

pkgver(){
  cd "${srcdir}/openfortivpn"
  ( set -o pipefail
    git describe --long --tags 2>/dev/null | sed 's/\([^-]*-g\)/r\1/;s/-/+/g;s/v//' ||
    printf "r%s+%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)"
  )
}

build() {
  cd openfortivpn
  ./configure \
    --prefix=/usr \
    --sysconfdir=/etc \
    --enable-resolvconf
  make
}

package() {
  make DESTDIR="${pkgdir}" -C openfortivpn install
}

# vim: ts=2 sw=2 et: