summaryrefslogtreecommitdiff
path: root/extra/vpnc/PKGBUILD
blob: 1e1228bbad255f545b66ede41bd169e381b60c0e (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
# $Id: PKGBUILD 142551 2011-11-12 00:27:55Z dreisner $
# Maintainer: Dave Reisner <dreisner@archlinux.org>
# Contributor: Thomas Baechler <thomas@archlinux.org>

pkgname=vpnc
_vpncver=0.5.3
pkgver=$_vpncver.svn472
pkgrel=1
pkgdesc="VPN client for cisco3000 VPN Concentrators"
url="http://www.unix-ag.uni-kl.de/~massar/vpnc/"
license=('GPL')
depends=('libgcrypt' 'openssl' 'iproute2')
optdepends=('openresolv: Let vpnc manage resolv.conf')
arch=('i686' 'x86_64')
source=("ftp://ftp.archlinux.org/other/$pkgname/$pkgname-$pkgver.tar.xz"
        'vpnc.conf')
backup=('etc/vpnc/default.conf')
md5sums=('51c350341ad4e7f8efbba19810b138a3'
         'a3f4e0cc682f437e310a1c86ae198e45')

mktarball() {
  svn co http://svn.unix-ag.uni-kl.de/vpnc/trunk
  pushd trunk
  _svnrev=$(svn info | awk '/^Revision:/ { print $2 }')
  popd

  git clone git://git.infradead.org/users/dwmw2/vpnc-scripts.git
  cp vpnc-scripts/vpnc-script trunk/

  find trunk/ -type d -name .svn -exec rm -rf {} +
  mv trunk "$pkgname-$_vpncver.svn$_svnrev"
  tar cJf "$pkgname-$_vpncver.svn$_svnrev"{.tar.xz,}
}

build() {
  cd "$srcdir/$pkgname-$pkgver"

  # Build hybrid support
  sed -i 's|^#OPENSSL|OPENSSL|g' Makefile

  # fix resolvconf location for community/openresolv
  sed -i 's|/sbin/resolvconf|/usr&|g' vpnc-script

  make PREFIX=/usr
}

package() {
  cd "$srcdir/$pkgname-$pkgver"

  make DESTDIR="$pkgdir" PREFIX=/usr install

  rm -f "$pkgdir"/etc/vpnc/vpnc.conf
  install -D -m644 "$srcdir"/vpnc.conf "$pkgdir"/etc/vpnc/default.conf
}