db-move: moved gdm from [testing] to [extra] (x86_64)
[arch-packages.git] / vpnc / trunk / PKGBUILD
blob66abfb8d3b07bb7d67bcbf14ec6ef5b341f59631
1 # Maintainer: Levente Polyak <anthraxx[at]archlinux[dot]org>
2 # Contributor: Dave Reisner <dreisner@archlinux.org>
3 # Contributor: Thomas Baechler <thomas@archlinux.org>
5 pkgname=vpnc
6 _vpnc_commit=46b8335b6e0df577fd3c40e87362ed8c5724c8df
7 _vpncscripts_commit=22756827315bc875303190abb3756b5b1dd147ce
8 pkgver=0.5.3.r526.r213
9 pkgrel=1
10 epoch=1
11 pkgdesc='VPN client for cisco3000 VPN Concentrators'
12 url='https://github.com/streambinder/vpnc'
13 arch=('x86_64')
14 license=('GPL')
15 depends=('libgcrypt' 'openssl' 'iproute2' 'which')
16 optdepends=('perl: for pcf2vpnc')
17 makedepends=('git')
18 optdepends=('openresolv: Let vpnc manage resolv.conf')
19 backup=('etc/vpnc/default.conf')
20 source=("vpnc::git+https://github.com/streambinder/vpnc#commit=${_vpnc_commit}"
21         "vpnc-scripts::git+https://gitlab.com/openconnect/vpnc-scripts.git#commit=${_vpncscripts_commit}"
22         git+https://github.com/streambinder/vpnc.wiki.git
23         vpnc.conf
24         vpnc@.service)
25 sha512sums=('SKIP'
26             'SKIP'
27             'SKIP'
28             'ac70712192c01ff638a9badc5cff7105bee5c4fed5d3a3b728e9597661952d156041c82fe1e544e2bab602d193d4105d3689c79c46d964623f6ce38dd89f0ea7'
29             'cafcab676986c1a2e49441f01d61997f1c6b54bbb68661b9af007d4816f8e76eee6b7ac2dfab55b55965fa407e8331c663cf11aa79384c30b0c9049c1477b791')
31 pkgver() {
32   cd ${pkgname}
33   printf "%s.r%s.r%s" "$(grep '^VERSION' Makefile|sed 's|VERSION := ||')" \
34     "$(git -C ../vpnc rev-list --count HEAD)" \
35     "$(git -C ../vpnc-scripts rev-list --count HEAD)"
38 prepare() {
39   cd ${pkgname}
41   git submodule init
42   git config submodule."src/doc".url "${srcdir}/vpnc.wiki"
43   git -c protocol.file.allow=always submodule update --recursive
45   # Build hybrid support
46   sed 's|^#OPENSSL|OPENSSL|g' -i Makefile
47   # fix resolvconf location for community/openresolv
48   sed 's|/sbin/resolvconf|/usr/bin/resolvconf|g' -i ../vpnc-scripts/vpnc-script
49   ln -sf ../../vpnc-scripts/vpnc-script src
50   ln -sf ../../vpnc.conf src
53 build() {
54   make -C ${pkgname}
57 check() {
58   make -C ${pkgname} test
61 package() {
62   cd ${pkgname}
63   install -d "${pkgdir}/usr/share/doc/${pkgname}"
64   make DESTDIR="${pkgdir}" PREFIX=/usr SBINDIR=/usr/bin install
65   install -Dm 755 ../vpnc-scripts/vpnc-script -t "${pkgdir}/etc/vpnc"
66   install -Dm 644 ../vpnc@.service -t "${pkgdir}/usr/lib/systemd/system"
67   install -Dm 644 .github/README.md -t "${pkgdir}/usr/share/doc/${pkgname}"
68   install -Dm 644 LICENSE -t "${pkgdir}/usr/share/licenses/${pkgname}"
71 # vim: ts=2 sw=2 et: