[arch-commits] Commit in openvpn/repos (10 files)
Thomas Bächler
thomas at archlinux.org
Tue Jan 3 21:27:31 UTC 2012
Date: Tuesday, January 3, 2012 @ 16:27:30
Author: thomas
Revision: 145902
archrelease: copy trunk to testing-i686, testing-x86_64
Added:
openvpn/repos/testing-i686/
openvpn/repos/testing-i686/PKGBUILD
(from rev 145901, openvpn/trunk/PKGBUILD)
openvpn/repos/testing-i686/openvpn-tapdev.conf
(from rev 145901, openvpn/trunk/openvpn-tapdev.conf)
openvpn/repos/testing-i686/openvpn-tapdev.rc
(from rev 145901, openvpn/trunk/openvpn-tapdev.rc)
openvpn/repos/testing-i686/openvpn.rc
(from rev 145901, openvpn/trunk/openvpn.rc)
openvpn/repos/testing-x86_64/
openvpn/repos/testing-x86_64/PKGBUILD
(from rev 145901, openvpn/trunk/PKGBUILD)
openvpn/repos/testing-x86_64/openvpn-tapdev.conf
(from rev 145901, openvpn/trunk/openvpn-tapdev.conf)
openvpn/repos/testing-x86_64/openvpn-tapdev.rc
(from rev 145901, openvpn/trunk/openvpn-tapdev.rc)
openvpn/repos/testing-x86_64/openvpn.rc
(from rev 145901, openvpn/trunk/openvpn.rc)
------------------------------------+
testing-i686/PKGBUILD | 72 +++++++++++++++++++++++++++++++++++
testing-i686/openvpn-tapdev.conf | 12 +++++
testing-i686/openvpn-tapdev.rc | 40 +++++++++++++++++++
testing-i686/openvpn.rc | 43 ++++++++++++++++++++
testing-x86_64/PKGBUILD | 72 +++++++++++++++++++++++++++++++++++
testing-x86_64/openvpn-tapdev.conf | 12 +++++
testing-x86_64/openvpn-tapdev.rc | 40 +++++++++++++++++++
testing-x86_64/openvpn.rc | 43 ++++++++++++++++++++
8 files changed, 334 insertions(+)
Copied: openvpn/repos/testing-i686/PKGBUILD (from rev 145901, openvpn/trunk/PKGBUILD)
===================================================================
--- testing-i686/PKGBUILD (rev 0)
+++ testing-i686/PKGBUILD 2012-01-03 21:27:30 UTC (rev 145902)
@@ -0,0 +1,72 @@
+# $Id$
+# Maintainer: Thomas Bächler <thomas at archlinux.org>
+
+pkgname=openvpn
+pkgver=2.2.2
+pkgrel=1
+pkgdesc="An easy-to-use, robust, and highly configurable VPN (Virtual Private Network)"
+arch=(i686 x86_64)
+url="http://openvpn.net/index.php/open-source.html"
+depends=('openssl' 'lzo2' 'iproute2')
+license=('custom')
+backup=(usr/share/openvpn/easy-rsa/vars
+ usr/share/openvpn/easy-rsa/openssl-1.0.0.cnf
+ etc/conf.d/openvpn-tapdev)
+source=(http://swupdate.openvpn.net/community/releases/openvpn-${pkgver}.tar.gz
+ http://swupdate.openvpn.net/community/releases/openvpn-${pkgver}.tar.gz.asc
+ openvpn.rc
+ openvpn-tapdev.rc
+ openvpn-tapdev.conf)
+md5sums=('c5181e27b7945fa6276d21873329c5c7'
+ '81ff11ec8cd9fc3c8bc646aae24c4298'
+ 'a3809b9727f0c2af2d0770f5c7442db2'
+ 'd2c48e970088d679dd3c2afd914ff731'
+ '722f483c9e3ce2ec66d3301aaf7cf3d5')
+
+build() {
+ cd $srcdir/$pkgname-$pkgver
+ # Build openvpn
+ CFLAGS="$CFLAGS -DPLUGIN_LIBDIR=\\\"/usr/lib/openvpn\\\"" ./configure \
+ --prefix=/usr \
+ --enable-password-save \
+ --mandir=/usr/share/man \
+ --enable-iproute2
+ make
+
+ # Build plugins
+ for plug in auth-pam down-root; do
+ cd $srcdir/$pkgname-$pkgver/plugin/$plug
+ make
+ done
+}
+
+package() {
+ cd $srcdir/$pkgname-$pkgver
+ # Install openvpn
+ make DESTDIR=$pkgdir install
+ install -d -m755 $pkgdir/etc/openvpn
+ # Install examples
+ install -d -m755 $pkgdir/usr/share/openvpn
+ cp -r sample-config-files $pkgdir/usr/share/openvpn/examples
+ find $pkgdir/usr/share/openvpn -type f -exec chmod 644 {} \;
+ find $pkgdir/usr/share/openvpn -type d -exec chmod 755 {} \;
+ # Install license
+ install -D -m644 COPYING $pkgdir/usr/share/licenses/$pkgname/COPYING
+ # Install plugins
+ for plug in auth-pam down-root; do
+ cd $srcdir/$pkgname-$pkgver/plugin/$plug
+ install -D -m755 openvpn-$plug.so $pkgdir/usr/lib/openvpn/openvpn-$plug.so
+ cd -
+ done
+ # Install contrib
+ install -d -m755 $pkgdir/usr/share/openvpn/contrib
+ cp -r contrib $pkgdir/usr/share/openvpn
+ # Install easy-rsa
+ cd $srcdir/$pkgname-$pkgver
+ make -C easy-rsa/2.0 install DESTDIR=$pkgdir PREFIX=usr/share/openvpn/easy-rsa
+ rm -f ${pkgdir}/usr/share/openvpn/easy-rsa/openssl-0.9.?.cnf
+ # Install rc scripts
+ install -D -m755 $srcdir/openvpn.rc $pkgdir/etc/rc.d/openvpn
+ install -D -m755 $srcdir/openvpn-tapdev.rc $pkgdir/etc/rc.d/openvpn-tapdev
+ install -D -m644 $srcdir/openvpn-tapdev.conf $pkgdir/etc/conf.d/openvpn-tapdev
+}
Copied: openvpn/repos/testing-i686/openvpn-tapdev.conf (from rev 145901, openvpn/trunk/openvpn-tapdev.conf)
===================================================================
--- testing-i686/openvpn-tapdev.conf (rev 0)
+++ testing-i686/openvpn-tapdev.conf 2012-01-03 21:27:30 UTC (rev 145902)
@@ -0,0 +1,12 @@
+#
+# /etc/conf.d/openvpn-tapdev
+#
+# Place openvpn-tapdev before network into your DAEMONS array
+# This will create permanent tap devices which you can use for bridging
+#
+# Example:
+# TAPDEVS="work home"
+# Will create two tap devices "work" and "home"
+#
+
+TAPDEVS=""
Copied: openvpn/repos/testing-i686/openvpn-tapdev.rc (from rev 145901, openvpn/trunk/openvpn-tapdev.rc)
===================================================================
--- testing-i686/openvpn-tapdev.rc (rev 0)
+++ testing-i686/openvpn-tapdev.rc 2012-01-03 21:27:30 UTC (rev 145902)
@@ -0,0 +1,40 @@
+#!/bin/bash
+
+. /etc/rc.conf
+. /etc/rc.d/functions
+
+. /etc/conf.d/openvpn-tapdev
+
+case "$1" in
+ start)
+ stat_busy "Creating tap devices for OpenVPN ... "
+ success=0
+ for tapdev in ${TAPDEVS}; do
+ stat_append "${tapdev} "
+ /usr/sbin/openvpn --mktun --dev-type tap --dev ${tapdev} >/dev/null 2>&1 || success=$?
+ done
+ if [ $success -eq 0 ]; then
+ add_daemon openvpn-tapdev
+ stat_done
+ else
+ stat_fail
+ fi
+ ;;
+ stop)
+ stat_busy "Destroying tap devices for OpenVPN ..."
+ for tapdev in ${TAPDEVS}; do
+ stat_append "${tapdev} "
+ /usr/sbin/openvpn --rmtun --dev-type tap --dev ${tapdev} >/dev/null 2>&1 || success=$?
+ done
+ rm_daemon openvpn-tapdev
+ stat_done
+ ;;
+ restart)
+ $0 stop
+ sleep 1
+ $0 start
+ ;;
+ *)
+ echo "usage: $0 {start|stop|restart}"
+esac
+exit 0
Copied: openvpn/repos/testing-i686/openvpn.rc (from rev 145901, openvpn/trunk/openvpn.rc)
===================================================================
--- testing-i686/openvpn.rc (rev 0)
+++ testing-i686/openvpn.rc 2012-01-03 21:27:30 UTC (rev 145902)
@@ -0,0 +1,43 @@
+#!/bin/bash
+
+. /etc/rc.conf
+. /etc/rc.d/functions
+
+CFGDIR="/etc/openvpn"
+STATEDIR="/var/run/openvpn"
+
+case "$1" in
+ start)
+ stat_busy "Starting OpenVPN ... "
+ success=0
+ mkdir -p "${STATEDIR}"
+ for cfg in "${CFGDIR}"/*.conf; do
+ stat_append "$(basename "${cfg}" .conf) "
+ /usr/sbin/openvpn --daemon --writepid "${STATEDIR}"/"$(basename "${cfg}" .conf)".pid --cd "${CFGDIR}" --config "${cfg}" || success=$?
+ done
+ if [ $success -eq 0 ]; then
+ add_daemon openvpn
+ stat_done
+ else
+ stat_fail
+ fi
+ ;;
+ stop)
+ stat_busy "Stopping OpenVPN ..."
+ for pidfile in "${STATEDIR}"/*.pid; do
+ stat_append "$(basename "${pidfile}" .pid) "
+ kill $(cat "${pidfile}" 2>/dev/null) 2>/dev/null
+ rm -f "${pidfile}"
+ done
+ rm_daemon openvpn
+ stat_done
+ ;;
+ restart)
+ $0 stop
+ sleep 1
+ $0 start
+ ;;
+ *)
+ echo "usage: $0 {start|stop|restart}"
+esac
+exit 0
Copied: openvpn/repos/testing-x86_64/PKGBUILD (from rev 145901, openvpn/trunk/PKGBUILD)
===================================================================
--- testing-x86_64/PKGBUILD (rev 0)
+++ testing-x86_64/PKGBUILD 2012-01-03 21:27:30 UTC (rev 145902)
@@ -0,0 +1,72 @@
+# $Id$
+# Maintainer: Thomas Bächler <thomas at archlinux.org>
+
+pkgname=openvpn
+pkgver=2.2.2
+pkgrel=1
+pkgdesc="An easy-to-use, robust, and highly configurable VPN (Virtual Private Network)"
+arch=(i686 x86_64)
+url="http://openvpn.net/index.php/open-source.html"
+depends=('openssl' 'lzo2' 'iproute2')
+license=('custom')
+backup=(usr/share/openvpn/easy-rsa/vars
+ usr/share/openvpn/easy-rsa/openssl-1.0.0.cnf
+ etc/conf.d/openvpn-tapdev)
+source=(http://swupdate.openvpn.net/community/releases/openvpn-${pkgver}.tar.gz
+ http://swupdate.openvpn.net/community/releases/openvpn-${pkgver}.tar.gz.asc
+ openvpn.rc
+ openvpn-tapdev.rc
+ openvpn-tapdev.conf)
+md5sums=('c5181e27b7945fa6276d21873329c5c7'
+ '81ff11ec8cd9fc3c8bc646aae24c4298'
+ 'a3809b9727f0c2af2d0770f5c7442db2'
+ 'd2c48e970088d679dd3c2afd914ff731'
+ '722f483c9e3ce2ec66d3301aaf7cf3d5')
+
+build() {
+ cd $srcdir/$pkgname-$pkgver
+ # Build openvpn
+ CFLAGS="$CFLAGS -DPLUGIN_LIBDIR=\\\"/usr/lib/openvpn\\\"" ./configure \
+ --prefix=/usr \
+ --enable-password-save \
+ --mandir=/usr/share/man \
+ --enable-iproute2
+ make
+
+ # Build plugins
+ for plug in auth-pam down-root; do
+ cd $srcdir/$pkgname-$pkgver/plugin/$plug
+ make
+ done
+}
+
+package() {
+ cd $srcdir/$pkgname-$pkgver
+ # Install openvpn
+ make DESTDIR=$pkgdir install
+ install -d -m755 $pkgdir/etc/openvpn
+ # Install examples
+ install -d -m755 $pkgdir/usr/share/openvpn
+ cp -r sample-config-files $pkgdir/usr/share/openvpn/examples
+ find $pkgdir/usr/share/openvpn -type f -exec chmod 644 {} \;
+ find $pkgdir/usr/share/openvpn -type d -exec chmod 755 {} \;
+ # Install license
+ install -D -m644 COPYING $pkgdir/usr/share/licenses/$pkgname/COPYING
+ # Install plugins
+ for plug in auth-pam down-root; do
+ cd $srcdir/$pkgname-$pkgver/plugin/$plug
+ install -D -m755 openvpn-$plug.so $pkgdir/usr/lib/openvpn/openvpn-$plug.so
+ cd -
+ done
+ # Install contrib
+ install -d -m755 $pkgdir/usr/share/openvpn/contrib
+ cp -r contrib $pkgdir/usr/share/openvpn
+ # Install easy-rsa
+ cd $srcdir/$pkgname-$pkgver
+ make -C easy-rsa/2.0 install DESTDIR=$pkgdir PREFIX=usr/share/openvpn/easy-rsa
+ rm -f ${pkgdir}/usr/share/openvpn/easy-rsa/openssl-0.9.?.cnf
+ # Install rc scripts
+ install -D -m755 $srcdir/openvpn.rc $pkgdir/etc/rc.d/openvpn
+ install -D -m755 $srcdir/openvpn-tapdev.rc $pkgdir/etc/rc.d/openvpn-tapdev
+ install -D -m644 $srcdir/openvpn-tapdev.conf $pkgdir/etc/conf.d/openvpn-tapdev
+}
Copied: openvpn/repos/testing-x86_64/openvpn-tapdev.conf (from rev 145901, openvpn/trunk/openvpn-tapdev.conf)
===================================================================
--- testing-x86_64/openvpn-tapdev.conf (rev 0)
+++ testing-x86_64/openvpn-tapdev.conf 2012-01-03 21:27:30 UTC (rev 145902)
@@ -0,0 +1,12 @@
+#
+# /etc/conf.d/openvpn-tapdev
+#
+# Place openvpn-tapdev before network into your DAEMONS array
+# This will create permanent tap devices which you can use for bridging
+#
+# Example:
+# TAPDEVS="work home"
+# Will create two tap devices "work" and "home"
+#
+
+TAPDEVS=""
Copied: openvpn/repos/testing-x86_64/openvpn-tapdev.rc (from rev 145901, openvpn/trunk/openvpn-tapdev.rc)
===================================================================
--- testing-x86_64/openvpn-tapdev.rc (rev 0)
+++ testing-x86_64/openvpn-tapdev.rc 2012-01-03 21:27:30 UTC (rev 145902)
@@ -0,0 +1,40 @@
+#!/bin/bash
+
+. /etc/rc.conf
+. /etc/rc.d/functions
+
+. /etc/conf.d/openvpn-tapdev
+
+case "$1" in
+ start)
+ stat_busy "Creating tap devices for OpenVPN ... "
+ success=0
+ for tapdev in ${TAPDEVS}; do
+ stat_append "${tapdev} "
+ /usr/sbin/openvpn --mktun --dev-type tap --dev ${tapdev} >/dev/null 2>&1 || success=$?
+ done
+ if [ $success -eq 0 ]; then
+ add_daemon openvpn-tapdev
+ stat_done
+ else
+ stat_fail
+ fi
+ ;;
+ stop)
+ stat_busy "Destroying tap devices for OpenVPN ..."
+ for tapdev in ${TAPDEVS}; do
+ stat_append "${tapdev} "
+ /usr/sbin/openvpn --rmtun --dev-type tap --dev ${tapdev} >/dev/null 2>&1 || success=$?
+ done
+ rm_daemon openvpn-tapdev
+ stat_done
+ ;;
+ restart)
+ $0 stop
+ sleep 1
+ $0 start
+ ;;
+ *)
+ echo "usage: $0 {start|stop|restart}"
+esac
+exit 0
Copied: openvpn/repos/testing-x86_64/openvpn.rc (from rev 145901, openvpn/trunk/openvpn.rc)
===================================================================
--- testing-x86_64/openvpn.rc (rev 0)
+++ testing-x86_64/openvpn.rc 2012-01-03 21:27:30 UTC (rev 145902)
@@ -0,0 +1,43 @@
+#!/bin/bash
+
+. /etc/rc.conf
+. /etc/rc.d/functions
+
+CFGDIR="/etc/openvpn"
+STATEDIR="/var/run/openvpn"
+
+case "$1" in
+ start)
+ stat_busy "Starting OpenVPN ... "
+ success=0
+ mkdir -p "${STATEDIR}"
+ for cfg in "${CFGDIR}"/*.conf; do
+ stat_append "$(basename "${cfg}" .conf) "
+ /usr/sbin/openvpn --daemon --writepid "${STATEDIR}"/"$(basename "${cfg}" .conf)".pid --cd "${CFGDIR}" --config "${cfg}" || success=$?
+ done
+ if [ $success -eq 0 ]; then
+ add_daemon openvpn
+ stat_done
+ else
+ stat_fail
+ fi
+ ;;
+ stop)
+ stat_busy "Stopping OpenVPN ..."
+ for pidfile in "${STATEDIR}"/*.pid; do
+ stat_append "$(basename "${pidfile}" .pid) "
+ kill $(cat "${pidfile}" 2>/dev/null) 2>/dev/null
+ rm -f "${pidfile}"
+ done
+ rm_daemon openvpn
+ stat_done
+ ;;
+ restart)
+ $0 stop
+ sleep 1
+ $0 start
+ ;;
+ *)
+ echo "usage: $0 {start|stop|restart}"
+esac
+exit 0
More information about the arch-commits
mailing list