summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 22873e3e7f098fbdc344156ead2c7b47dcd48e8f (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
# Maintainer: Silvio Fricke <silvio fricke@gmail.com>
# Contributor: Michel Wohlert <michel.wohlert@gmail.com>

pkgname=networkmanager-fortisslvpn-git
pkgver=1.2.11.dev.r16.g565ad51
pkgrel=1
pkgdesc='NetworkManager VPN plugin for fortisslvpn - git checkout'
arch=('i686' 'x86_64')
license=('GPL')
url='https://git.gnome.org/browse/network-manager-fortisslvpn'
depends=('networkmanager' 'nm-connection-editor' 'openfortivpn' 'libsecret')
makedepends=('git' 'intltool' 'python' 'xorgproto' 'pkg-config' 'appstream-glib')
provides=('networkmanager-fortisslvpn')
conflicts=('networkmanager-fortisslvpn')
source=('network-manager-fortisslvpn::git+https://gitlab.gnome.org/GNOME/NetworkManager-fortisslvpn.git')
sha256sums=('SKIP')

pkgver() {
        cd network-manager-fortisslvpn/

        if GITTAG="$(git describe --abbrev=0 --tags 2>/dev/null)"; then
                printf '%s.r%s.g%s' \
                        "$(sed -e "s/^${pkgname%%-git}//" -e 's/^[-_/a-zA-Z]\+//' -e 's/[-_+]/./g' <<< ${GITTAG})" \
                        "$(git rev-list --count ${GITTAG}..)" \
                        "$(git log -1 --format='%h')"
        else
                printf '0.r%s.g%s' \
                        "$(git rev-list --count master)" \
                        "$(git log -1 --format='%h')"
        fi
}
build() {
        cd network-manager-fortisslvpn/

        ./autogen.sh
        ./configure --prefix=/usr \
                --sysconfdir=/etc \
                --localstatedir=/var \
                --libexecdir=/usr/lib/networkmanager \
                --enable-more-warnings=yes \
                --disable-static
        make
}

package() {
        cd network-manager-fortisslvpn/

        make DESTDIR="${pkgdir}" install

        chmod a+rx "${pkgdir}"/var/lib/NetworkManager-fortisslvpn
}