diff options
Diffstat (limited to 'arch-linux/uanytun')
-rw-r--r-- | arch-linux/uanytun/PKGBUILD | 46 | ||||
-rw-r--r-- | arch-linux/uanytun/examples.patch | 27 | ||||
-rw-r--r-- | arch-linux/uanytun/uanytun.install | 21 |
3 files changed, 94 insertions, 0 deletions
diff --git a/arch-linux/uanytun/PKGBUILD b/arch-linux/uanytun/PKGBUILD new file mode 100644 index 0000000..d3c0bfc --- /dev/null +++ b/arch-linux/uanytun/PKGBUILD @@ -0,0 +1,46 @@ +# Contributor: Bernhard Tittelbach <xro -at- realraum -dot- at> +pkgname="uanytun" +pkgver="0.3.1" +pkgrel=1 +pkgdesc="tiny secure anycast tunneling protocol implementation for flexible and fault-tolerant VPNs" +arch=("i686" "x86_64") +url="http://www.anytun.org/" +license=('GPLv3') +groups=() +depends=(openssl glibc) +#depends=(libgcrypt glibc) +makedepends=(make asciidoc gcc) +provides=() +conflicts=() +replaces=() +backup=() +options=(docs zipman ccache distcc) +install=uanytun.install +source=("http://www.anytun.org/download/$pkgname-$pkgver.tar.gz" "examples.patch") +noextract=() +md5sums=('7923882da9b97559d5f2074f5d5f8dee' + '6b99e9299fdf81ef647bf4fe958f8779') + +build() { + echo "==== Building Source ====" + cd "$srcdir/$pkgname-$pkgver/src" || return 1 + ./configure --prefix=/usr --sysconfdir=/etc --use-ssl-crypto || return 1 # use libssl + #./configure --prefix=/usr --sysconfdir=/etc || return 1 # use libgcrypt + make || return 1 + + echo "==== Building Manpages ====" + make manpage || return 1 + + echo "==== Tweaking example for Arch ====" + cd "$srcdir/$pkgname-$pkgver/etc/uanytun/" + patch -p0 < ${srcdir}/examples.patch + + echo "==== Installing anytun ====" + cd "$srcdir/$pkgname-$pkgver/src" || return 1 + install -Dm 755 uanytun ${pkgdir}/usr/sbin/uanytun + make install-man DESTDIR="${pkgdir}" + mkdir -p ${pkgdir}/etc/uanytun &>/dev/null + install -Dm 755 ../etc/init.d/uanytun ${pkgdir}/etc/rc.d/uanytun + mkdir -p ${pkgdir}/usr/share/doc/$pkgname-$pkgver-$pkgrel/etc-example/ + cp -a ../etc/uanytun ${pkgdir}/usr/share/doc/$pkgname-$pkgver-$pkgrel/etc-example/ +} diff --git a/arch-linux/uanytun/examples.patch b/arch-linux/uanytun/examples.patch new file mode 100644 index 0000000..4ed0be8 --- /dev/null +++ b/arch-linux/uanytun/examples.patch @@ -0,0 +1,27 @@ +diff -u -r ../../orig/anytun-0.3.1/etc/anytun/client1/post-up.sh ./client1/post-up.sh +--- ../../orig/anytun-0.3.1/etc/anytun/client1/post-up.sh 2009-11-02 19:08:13.000000000 +0100 ++++ ./client1/post-up.sh 2009-11-03 20:34:45.972617805 +0100 +@@ -1,4 +1,5 @@ + #!/bin/sh ++PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin + + ip link set dev $1 up + ip link set dev $1 mtu 1400 +diff -u -r ../../orig/anytun-0.3.1/etc/anytun/client2/post-up.sh ./client2/post-up.sh +--- ../../orig/anytun-0.3.1/etc/anytun/client2/post-up.sh 2009-11-02 19:08:13.000000000 +0100 ++++ ./client2/post-up.sh 2009-11-03 20:34:48.145511626 +0100 +@@ -1,4 +1,5 @@ + #!/bin/sh ++PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin + + ip link set dev $1 up + ip link set dev $1 mtu 1400 +diff -u -r ../../orig/anytun-0.3.1/etc/anytun/client3/post-up.sh ./client3/post-up.sh +--- ../../orig/anytun-0.3.1/etc/anytun/client3/post-up.sh 2009-11-02 19:08:13.000000000 +0100 ++++ ./client3/post-up.sh 2009-11-03 20:34:50.953012507 +0100 +@@ -1,4 +1,5 @@ + #!/bin/sh ++PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin + + ip link set dev $1 up + ip link set dev $1 mtu 1400 diff --git a/arch-linux/uanytun/uanytun.install b/arch-linux/uanytun/uanytun.install new file mode 100644 index 0000000..31303a8 --- /dev/null +++ b/arch-linux/uanytun/uanytun.install @@ -0,0 +1,21 @@ +post_install() { + echo "" + echo "===============================================================================" + echo "Don't forget to create configuration directories unter /etc/uanytun/" + echo "and to add them to /etc/uanytun/autostart. See README for more Information" + echo "You will find example configuration files in /usr/share/doc/uanytun-$1/etc-example/" + echo "" + echo "You might want to add a user/group for uanytun:" + echo "> sudo groupadd -r uanytun" + echo "> useradd -g uanytun -r -d /var/run -s /bin/false uanytun" + echo "===============================================================================" + echo "" +} + +post_upgrade() { + return 0 +} + +pre_remove() { + [ -x /etc/rc.d/uanytun ] && /etc/rc.d/uanytun stop +} |