summaryrefslogtreecommitdiffstats
path: root/main/openvpn/APKBUILD
diff options
context:
space:
mode:
Diffstat (limited to 'main/openvpn/APKBUILD')
-rw-r--r--main/openvpn/APKBUILD54
1 files changed, 54 insertions, 0 deletions
diff --git a/main/openvpn/APKBUILD b/main/openvpn/APKBUILD
new file mode 100644
index 000000000..3b927139d
--- /dev/null
+++ b/main/openvpn/APKBUILD
@@ -0,0 +1,54 @@
+# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
+pkgname=openvpn
+pkgver=2.0.9
+pkgrel=0
+pkgdesc="A robust, and highly configurable VPN (Virtual Private Network)"
+url="http://openvpn.sourceforge.net/"
+license="custom"
+subpackages="$pkgname-doc"
+depends="openssl iproute2 lzo"
+makedepends="openssl-dev lzo-dev"
+install=
+source="http://$pkgname.net/release/$pkgname-$pkgver.tar.gz
+ openvpn-2.0.9-persistent.patch
+ "
+
+build() {
+ cd "$srcdir"/$pkgname-$pkgver
+ for i in ../*.patch; do
+ msg "Applying $i..."
+ patch -p1 < $i || return 1
+ done
+
+ ./configure --prefix=/usr \
+ --mandir=/usr/share/man \
+ --enable-ssl \
+ --enable-crypto \
+ --disable-threads
+
+ make || return 1
+
+ cd plugin/down-root
+ make || return 1
+ cd ../..
+
+ 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
+ make -C easy-rsa/2.0 DESTDIR="$pkgdir" \
+ PREFIX=usr/share/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
+
+}
+md5sums="60745008b90b7dbe25fe8337c550fec6 openvpn-2.0.9.tar.gz
+a9075ceb8552980519132cc27fda85ac openvpn-2.0.9-persistent.patch"