1 # Maintainer: Christian Hesse <mail@eworm.de>
2 # Contributor: Thomas Bächler <thomas@archlinux.org> ([core] package)
7 pkgdesc="An easy-to-use, robust, and highly configurable VPN (Virtual Private Network) - git checkout"
9 url="http://openvpn.net/index.php/open-source.html"
10 depends=('openssl' 'lzo2' 'iproute2')
14 backup=(usr/share/openvpn/easy-rsa/vars
15 usr/share/openvpn/easy-rsa/openssl-1.0.0.cnf
16 etc/conf.d/openvpn-tapdev)
21 _gitroot="git://openvpn.git.sourceforge.net/gitroot/openvpn/openvpn.git"
26 msg "Connecting to GIT server...."
28 if [ -d ${_gitname} ] ; then
29 cd ${_gitname} && git pull origin
30 msg "The local files are updated."
32 git clone ${_gitroot} ${_gitname}
35 msg "GIT checkout done or server timeout"
36 msg "Starting make..."
38 rm -rf "${srcdir}/${_gitname}-build"
39 git clone "${srcdir}/${_gitname}" "${srcdir}/${_gitname}-build"
40 cd "${srcdir}/${_gitname}-build"
44 CFLAGS="$CFLAGS -DPLUGIN_LIBDIR=\\\"/usr/lib/openvpn\\\"" ./configure \
46 --enable-password-save \
47 --mandir=/usr/share/man \
52 for plug in auth-pam down-root; do
53 cd ${srcdir}/${_gitname}-build/plugin/${plug}
59 cd ${srcdir}/${_gitname}-build
61 make DESTDIR=${pkgdir} install
62 install -d -m755 ${pkgdir}/etc/openvpn
64 install -d -m755 ${pkgdir}/usr/share/openvpn
65 cp -r sample-config-files ${pkgdir}/usr/share/openvpn/examples
66 find ${pkgdir}/usr/share/openvpn -type f -exec chmod 644 {} \;
67 find ${pkgdir}/usr/share/openvpn -type d -exec chmod 755 {} \;
69 install -D -m644 COPYING ${pkgdir}/usr/share/licenses/${pkgname}/COPYING
71 for plug in auth-pam down-root; do
72 cd ${srcdir}/${_gitname}-build/plugin/${plug}
73 install -D -m755 openvpn-${plug}.so ${pkgdir}/usr/lib/openvpn/openvpn-${plug}.so
77 install -d -m755 ${pkgdir}/usr/share/openvpn/contrib
78 cp -r contrib ${pkgdir}/usr/share/openvpn
80 cd ${srcdir}/${_gitname}-build
81 make -C easy-rsa/2.0 install DESTDIR=${pkgdir} PREFIX=usr/share/openvpn/easy-rsa
82 rm -f ${pkgdir}/usr/share/openvpn/easy-rsa/openssl-0.9.?.cnf
84 install -D -m755 ${srcdir}/openvpn.rc ${pkgdir}/etc/rc.d/openvpn
85 install -D -m755 ${srcdir}/openvpn-tapdev.rc ${pkgdir}/etc/rc.d/openvpn-tapdev
86 install -D -m644 ${srcdir}/openvpn-tapdev.conf ${pkgdir}/etc/conf.d/openvpn-tapdev
88 md5sums=('a3809b9727f0c2af2d0770f5c7442db2'
89 'd2c48e970088d679dd3c2afd914ff731'
90 '722f483c9e3ce2ec66d3301aaf7cf3d5')