1 # Contributor: Bernhard Tittelbach <xro -at- realraum -dot- at>
5 pkgdesc="secure anycast tunneling protocol implementation for flexible and fault-tolerant VPNs"
7 url="http://www.anytun.org/"
10 depends=(boost openssl glibc)
11 #depends=(boost libgcrypt glibc)
12 makedepends=(make gcc)
17 options=(docs zipman ccache distcc)
18 install=anytun.install
19 source=("http://www.anytun.org/download/$pkgname-$pkgver.tar.gz" "boost-mt.patch" "examples.patch")
21 md5sums=('11c817997697bfc5b6e5ef820f8bdc19'
22 'bc8713a0228af46f7692a85e77927871'
23 '8246dd06f1ea5b8560cdd56c7f60a334')
26 local sharedir="/usr/share/${pkgname}-${pkgver}-${pkgrel}"
27 local docdir="/usr/share/doc/${pkgname}-${pkgver}-${pkgrel}"
28 local examplesdir=${docdir}/etc-examples
30 msg "Building Source ..."
31 cd "${srcdir}/${pkgname}-${pkgver}/src" || return 1
32 patch -p0 < ${srcdir}/boost-mt.patch || return 1
33 ./configure --prefix=/usr --sysconfdir=/etc --use-ssl-crypto --examplesdir=${examplesdir} || return 1 # use libssl
34 #./configure --prefix=/usr --sysconfdir=/etc --examplesdir=${examplesdir} || return 1 # use libgcrypt
37 #msg "Building Manpages ..."
38 #make manpage || return 1
40 #msg "Building AnyRTPProxy ..."
41 #make anyrtpproxy || return 1
43 msg "Tweaking example for Arch ..."
44 patch -p0 -d ../etc/anytun/ < ${srcdir}/examples.patch
46 msg "Installing ${pkgname} ..."
47 mkdir -p ${pkgdir}/var/run/anytun ${pkgdir}/var/run/anytun-controld &>/dev/null
48 make install DESTDIR="${pkgdir}"
49 mv ${pkgdir}/etc/init.d/ ${pkgdir}/etc/rc.d/
50 install -Dm 644 ../README ${pkgdir}${docdir}/README
51 install -Dm 644 ../ChangeLog ${pkgdir}${docdir}/ChangeLog
52 install -Dm 644 ../AUTHORS ${pkgdir}${docdir}/AUTHORS