summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorMoritz Kaspar Rudert (mortzu)2015-05-21 14:38:16 +0200
committerMoritz Kaspar Rudert (mortzu)2015-05-21 14:38:16 +0200
commit380cbed287e7cdc7982e5b6ca60d2c07be122e7c (patch)
treeb1aea8179a7bc78a5681b4578d1518e323f3b2b6
downloadaur-380cbed287e7cdc7982e5b6ca60d2c07be122e7c.tar.gz
initial commit
-rw-r--r--.SRCINFO24
-rw-r--r--PKGBUILD46
-rw-r--r--chaosvpn.service10
-rw-r--r--iproute2-chaosvpn.patch11
-rw-r--r--iproute2-warzone.patch11
5 files changed, 102 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO
new file mode 100644
index 000000000000..b3bb0d482a56
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,24 @@
+pkgbase = chaosvpn
+ pkgdesc = Config generator for chaosVPN
+ pkgver = 2.18
+ pkgrel = 1
+ url = http://wiki.hamburg.ccc.de
+ arch = i686
+ arch = x86_64
+ license = Apache
+ makedepends = git
+ makedepends = flex
+ depends = tinc
+ depends = iproute2
+ backup = etc/tinc/chaosvpn.conf
+ source = git://github.com/ryd/chaosvpn.git
+ source = iproute2-chaosvpn.patch
+ source = iproute2-warzone.patch
+ source = chaosvpn.service
+ md5sums = SKIP
+ md5sums = 31f1d9c064d3cdefb424e6b44805e824
+ md5sums = 8d8a99003bf186b6dd7e5fd2e80e0cad
+ md5sums = 97e364f361231d1f2cba0c784719be55
+
+pkgname = chaosvpn
+
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 000000000000..8238812e1b09
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,46 @@
+pkgname=chaosvpn
+pkgver=2.18
+pkgrel=1
+pkgdesc="Config generator for chaosVPN"
+arch=('i686' 'x86_64')
+url="http://wiki.hamburg.ccc.de"
+license=('Apache')
+makedepends=('git' 'flex')
+depends=('tinc' 'iproute2')
+backup=(etc/tinc/chaosvpn.conf)
+
+source=(git://github.com/ryd/chaosvpn.git
+ iproute2-chaosvpn.patch
+ iproute2-warzone.patch
+ chaosvpn.service)
+md5sums=('SKIP'
+ '31f1d9c064d3cdefb424e6b44805e824'
+ '8d8a99003bf186b6dd7e5fd2e80e0cad'
+ '97e364f361231d1f2cba0c784719be55')
+
+pkgver() {
+ cd "$pkgname"
+ git describe | sed 's/^v//;s/-/./g'
+}
+
+prepare() {
+ cd "$pkgname"
+ sed 's#/sbin#/bin#g' -i Makefile
+}
+
+build() {
+ cd "$pkgname"
+ make
+}
+
+package() {
+ cd "$pkgname"
+ make DESTDIR="$pkgdir" install
+
+ install -Dm644 "$srcdir/chaosvpn.service" "$pkgdir/usr/lib/systemd/system/chaosvpn.service"
+
+ patch -d "$pkgdir/etc/tinc" -p0 -i "$srcdir/iproute2-chaosvpn.patch"
+ patch -d "$pkgdir/etc/tinc" -p0 -i "$srcdir/iproute2-warzone.patch"
+
+ sed -e 's|/sbin/ip|/usr/sbin/ip|g' -i "$pkgdir/etc/tinc/chaosvpn.conf" "$pkgdir/etc/tinc/warzone.conf"
+}
diff --git a/chaosvpn.service b/chaosvpn.service
new file mode 100644
index 000000000000..8b163beadcb9
--- /dev/null
+++ b/chaosvpn.service
@@ -0,0 +1,10 @@
+[Unit]
+Description=ChaosVPN
+
+[Service]
+ExecStart=/usr/bin/chaosvpn
+KillMode=process
+Restart=always
+
+[Install]
+WantedBy=multi-user.target
diff --git a/iproute2-chaosvpn.patch b/iproute2-chaosvpn.patch
new file mode 100644
index 000000000000..9e8e175deae6
--- /dev/null
+++ b/iproute2-chaosvpn.patch
@@ -0,0 +1,11 @@
+--- chaosvpn.conf 2012-03-13 13:04:35.850992235 +0100
++++ ../../../src/chaosvpn/chaosvpn.conf 2012-03-13 11:45:41.500831669 +0100
+@@ -43,7 +43,7 @@
+ $routeadd6 = "/sbin/ip -6 route add %s metric $routemetric dev \$INTERFACE";
+ $routedel = "/sbin/ip -4 route del %s metric $routemetric dev \$INTERFACE";
+ $routedel6 = "/sbin/ip -6 route del %s metric $routemetric dev \$INTERFACE";
+-$ifconfig = "/sbin/ifconfig \$INTERFACE $my_vpn_ip netmask 255.255.255.255 up";
++$ifconfig = "/sbin/ip addr add $my_vpn_ip/32 dev \$INTERFACE";
+ $ifconfig6 = "/sbin/ip addr add $my_vpn_ip6/128 dev \$INTERFACE";
+
+ @mergeroutes_supernet = ("172.31.0.0/16", "10.100.0.0/14");
diff --git a/iproute2-warzone.patch b/iproute2-warzone.patch
new file mode 100644
index 000000000000..6abc988246eb
--- /dev/null
+++ b/iproute2-warzone.patch
@@ -0,0 +1,11 @@
+--- warzone.conf 2012-03-13 13:07:11.620997519 +0100
++++ ../../../src/chaosvpn/warzone.conf 2012-03-13 11:45:41.507498334 +0100
+@@ -28,7 +28,7 @@
+ $routeadd6 = "/sbin/ip -6 route add %s metric $routemetric dev \$INTERFACE";
+ $routedel = "/sbin/ip -4 route del %s metric $routemetric dev \$INTERFACE";
+ $routedel6 = "/sbin/ip -6 route del %s metric $routemetric dev \$INTERFACE";
+-$ifconfig = "/sbin/ifconfig \$INTERFACE $my_vpn_ip netmask 255.255.255.255";
++$ifconfig = "/sbin/ip addr add $my_vpn_ip/32 dev \$INTERFACE";
+ $ifconfig6 = "/sbin/ip addr add $my_vpn_ip6/128 dev \$INTERFACE";
+
+ $master_url = "http://warzone-conf.hamburg.ccc.de/warzone-data/$my_peerid.dat";