# Maintainer: Natanael Copa pkgname=openvpn pkgver=2.1.4 pkgrel=0 pkgdesc="A robust, and highly configurable VPN (Virtual Private Network)" url="http://openvpn.sourceforge.net/" arch="x86 x86_64" license="custom" subpackages="$pkgname-doc" depends="iproute2" makedepends="openssl-dev lzo-dev" install= source="http://swupdate.openvpn.net/community/releases/$pkgname-$pkgver.tar.gz openvpn.initd " _builddir="$srcdir"/$pkgname-$pkgver build() { cd "$_builddir" ./configure --prefix=/usr \ --mandir=/usr/share/man \ --enable-ssl \ --enable-crypto \ --disable-threads \ --enable-iproute2 make || return 1 cd plugin/down-root make || return 1 cd ../.. } package() { cd "$_builddir" make DESTDIR="$pkgdir" install || return 1 # install plugins install -d "$pkgdir"/usr/lib/$pkgname cp plugin/*/*.so "$pkgdir"/usr/lib/$pkgname # install easy-rsa sed -i -e 's/--directory/-d/g; s/--mode=/-m/g' easy-rsa/2.0/Makefile sed -i -e '1s|#!/bin/bash|#!/bin/sh|' easy-rsa/2.0/* make -C easy-rsa/2.0 DESTDIR="$pkgdir" \ PREFIX=etc/openvpn/easy-rsa \ install # install examples mkdir -p "$pkgdir"/usr/share/doc/$pkgname/examples cp -a sample-config-files "$pkgdir"/usr/share/doc/$pkgname/examples install -D -m644 COPYING "$pkgdir"/usr/share/licenses/$pkgname/COPYING # install init.d install -Dm755 ../openvpn.initd "$pkgdir"/etc/init.d/openvpn } md5sums="96a11868082685802489254f03ff3bde openvpn-2.1.4.tar.gz 020376f1e7ed6b4adbe20cf5ff774856 openvpn.initd"