aboutsummaryrefslogtreecommitdiffstats
path: root/testing/openvpn/APKBUILD
diff options
context:
space:
mode:
Diffstat (limited to 'testing/openvpn/APKBUILD')
-rw-r--r--testing/openvpn/APKBUILD55
1 files changed, 55 insertions, 0 deletions
diff --git a/testing/openvpn/APKBUILD b/testing/openvpn/APKBUILD
new file mode 100644
index 0000000000..2c38df4c84
--- /dev/null
+++ b/testing/openvpn/APKBUILD
@@ -0,0 +1,55 @@
+# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
+pkgname=openvpn
+pkgver=2.1_rc19
+pkgrel=0
+pkgdesc="A robust, and highly configurable VPN (Virtual Private Network)"
+url="http://openvpn.sourceforge.net/"
+license="custom"
+subpackages="$pkgname-doc"
+depends="iproute2"
+makedepends="openssl-dev lzo-dev"
+install=
+source="http://$pkgname.net/release/$pkgname-$pkgver.tar.gz
+ openvpn.initd
+ "
+
+build() {
+ cd "$srcdir"/$pkgname-$pkgver
+
+ ./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 ../..
+
+ 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="ba2ee667a8b7606b125b7d32f47ca578 openvpn-2.1_rc19.tar.gz
+10390247d1fdc4fd1ebec1ebae8872be openvpn.initd"