summaryrefslogtreecommitdiffstats
path: root/testing
diff options
context:
space:
mode:
authorNatanael Copa <ncopa@alpinelinux.org>2010-02-03 10:11:11 +0000
committerNatanael Copa <ncopa@alpinelinux.org>2010-02-03 10:54:00 +0000
commit3589526c2859d6b7c8d0ffeec1d16292abe0a0c0 (patch)
tree857b032d5e0323d5a22af96468963b8f43d29aff /testing
parent1d3cf6d0a11391394ede93a944fdf22fd3d2472f (diff)
downloadaports-3589526c2859d6b7c8d0ffeec1d16292abe0a0c0.tar.bz2
aports-3589526c2859d6b7c8d0ffeec1d16292abe0a0c0.tar.xz
main/openvpn: upgrade to 2.1.1 (moved from testing)
(cherry picked from commit 9f750544a956d862d37472e9b8f406d613cc381a)
Diffstat (limited to 'testing')
-rw-r--r--testing/openvpn/APKBUILD57
-rw-r--r--testing/openvpn/openvpn.initd63
2 files changed, 0 insertions, 120 deletions
diff --git a/testing/openvpn/APKBUILD b/testing/openvpn/APKBUILD
deleted file mode 100644
index bd751f31..00000000
--- a/testing/openvpn/APKBUILD
+++ /dev/null
@@ -1,57 +0,0 @@
-# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
-pkgname=openvpn
-pkgver=2.1.1
-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
- "
-
-_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="b273ed2b5ec8616fb9834cde8634bce7 openvpn-2.1.1.tar.gz
-020376f1e7ed6b4adbe20cf5ff774856 openvpn.initd"
diff --git a/testing/openvpn/openvpn.initd b/testing/openvpn/openvpn.initd
deleted file mode 100644
index 7e0e3eb9..00000000
--- a/testing/openvpn/openvpn.initd
+++ /dev/null
@@ -1,63 +0,0 @@
-#!/sbin/runscript
-# Copyright 1999-2007 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-
-VPNDIR="/etc/openvpn"
-VPN="${SVCNAME#*.}"
-if [ -n "${VPN}" ] && [ "${SVCNAME}" != "openvpn" ]; then
- VPNPID="/var/run/openvpn.${VPN}.pid"
-else
- VPNPID="/var/run/openvpn.pid"
-fi
-VPNCONF="${VPNDIR}/${VPN}.conf"
-
-depend() {
- need localmount net
- before netmount
- after bootmisc firewall
-}
-
-checktundevice() {
- if [ ! -e /dev/net/tun ]; then
- if ! modprobe tun ; then
- eerror "TUN/TAP support is not available in this kernel"
- return 1
- fi
- fi
- if [ -h /dev/net/tun ] && [ -c /dev/misc/net/tun ]; then
- ebegin "Detected broken /dev/net/tun symlink, fixing..."
- rm -f /dev/net/tun
- ln -s /dev/misc/net/tun /dev/net/tun
- eend $?
- fi
-}
-
-start() {
- ebegin "Starting ${SVCNAME}"
-
- checktundevice || return 1
-
- if [ ! -e "${VPNCONF}" ]; then
- eend 1 "${VPNCONF} does not exist"
- return 1
- fi
-
- local args=""
- # If the config file does not specify the cd option, we do
- # But if we specify it, we override the config option which we do not want
- if ! grep -q "^[ \t]*cd[ \t].*" "${VPNCONF}" ; then
- args="${args} --cd ${VPNDIR}"
- fi
-
- start-stop-daemon --start --exec /usr/sbin/openvpn --pidfile "${VPNPID}" \
- -- --config "${VPNCONF}" --writepid "${VPNPID}" --daemon ${args}
- eend $? "Check your logs to see why startup failed"
-}
-
-stop() {
- ebegin "Stopping ${SVCNAME}"
- start-stop-daemon --stop --exec /usr/sbin/openvpn --pidfile "${VPNPID}"
- eend $?
-}
-
-# vim: ts=4