diff options
author | Carlo Landmeter <clandmeter@gmail.com> | 2011-06-04 14:33:13 +0000 |
---|---|---|
committer | Carlo Landmeter <clandmeter@gmail.com> | 2011-06-04 14:41:13 +0000 |
commit | f80c232c3e5f32cd904117a1d91273b8887d17e2 (patch) | |
tree | 19d79f1a862aae8d76e7ed348ac26bec241ec4b3 /main/openvpn/APKBUILD | |
parent | 21bbd56f158e6be27059a8543aa133fbb50bf047 (diff) | |
download | aports-f80c232c3e5f32cd904117a1d91273b8887d17e2.tar.bz2 aports-f80c232c3e5f32cd904117a1d91273b8887d17e2.tar.xz |
main/openvpn: multiple changes like ipv6 and new initd
added ipv6 patch from: http://www.greenie.net/ipv6/openvpn.html
move easy-rsa into subpkg and depend on openssl
update init.d and conf.d from latest gentoo release
added up/down scripts from latest gentoo release
ref #618
Diffstat (limited to 'main/openvpn/APKBUILD')
-rw-r--r-- | main/openvpn/APKBUILD | 62 |
1 files changed, 50 insertions, 12 deletions
diff --git a/main/openvpn/APKBUILD b/main/openvpn/APKBUILD index 50f8aaff1b..466628b6d8 100644 --- a/main/openvpn/APKBUILD +++ b/main/openvpn/APKBUILD @@ -1,24 +1,40 @@ # Maintainer: Natanael Copa <ncopa@alpinelinux.org> pkgname=openvpn pkgver=2.2.0 -pkgrel=0 +pkgrel=1 pkgdesc="A robust, and highly configurable VPN (Virtual Private Network)" url="http://openvpn.sourceforge.net/" arch="all" license="custom" -subpackages="$pkgname-doc" +subpackages="$pkgname-doc $pkgname-easy-rsa:easy_rsa" depends="iproute2" makedepends="openssl-dev lzo-dev" install= source="http://swupdate.openvpn.net/community/releases/$pkgname-$pkgver.tar.gz openvpn.initd + openvpn.confd + openvpn.up + openvpn.down + openvpn-2.2.0-ipv6-20110522-1.patch " _builddir="$srcdir"/$pkgname-$pkgver + +prepare() { + local i + cd "$_builddir" + for i in $source; do + case $i in + *.patch) msg $i; patch -p1 -i "$srcdir"/$i || return 1;; + esac + done +} + build() { cd "$_builddir" ./configure --prefix=/usr \ --mandir=/usr/share/man \ + --sysconfdir=/etc/openvpn \ --enable-ssl \ --enable-crypto \ --disable-threads \ @@ -39,20 +55,42 @@ package() { 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 + # install init.d and conf.d + install -Dm755 "$srcdir"/openvpn.initd "$pkgdir"/etc/init.d/openvpn + install -Dm644 "$srcdir"/openvpn.confd "$pkgdir"/etc/conf.d/openvpn + + # install up and down scripts + install -Dm755 "$srcdir"/openvpn.up "$pkgdir"/etc/openvpn/up.sh + install -Dm755 "$srcdir"/openvpn.down "$pkgdir"/etc/openvpn/down.sh + } + +easy_rsa() { + pkgdesc="OpenVPN RSA key management" + # easy rsa can by usefull on systems + # which do not have openvpn installed + depends="openssl" + # install easy-rsa + cd "$_builddir" + 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="$subpkgdir" \ + PREFIX=usr/share/doc/openvpn/easy-rsa \ + install +} + +doc() { + default_doc +} + md5sums="4f440603eac45fec7be218b87d570834 openvpn-2.2.0.tar.gz -020376f1e7ed6b4adbe20cf5ff774856 openvpn.initd" +ec99092827faa7226e9f548c2cd1d20c openvpn.initd +9eca88cac6294027ec1bb7be74185c3a openvpn.confd +dc72fecd1a1bcef937603057cd6574b1 openvpn.up +dc3ff0bae442b9aedd947b8ffda1687a openvpn.down +25172fa251672edc3f7a277b5d7f3f72 openvpn-2.2.0-ipv6-20110522-1.patch" |