aboutsummaryrefslogtreecommitdiffstats
path: root/testing/strongswan
diff options
context:
space:
mode:
authorJesse Young <jlyo@jlyo.org>2011-10-27 21:32:54 +0000
committerCarlo Landmeter <clandmeter@gmail.com>2011-10-28 07:53:04 +0000
commit465508790265361b8ca65d1ece76c18a0d5c8621 (patch)
tree3260284d316e40a09491f5f2dbdc7328b947615c /testing/strongswan
parent18fa9072b44cfa3bb65922fe3795d2db2674237b (diff)
downloadaports-465508790265361b8ca65d1ece76c18a0d5c8621.tar.bz2
aports-465508790265361b8ca65d1ece76c18a0d5c8621.tar.xz
testing/strongswan: new aport
An OpenSource IPsec implementation for the Linux operating system http://www.strongswan.org/ Signed-off-by: Jesse Young <jlyo@jlyo.org>
Diffstat (limited to 'testing/strongswan')
-rw-r--r--testing/strongswan/APKBUILD54
-rw-r--r--testing/strongswan/adns.patch10
-rw-r--r--testing/strongswan/strongswan.initd31
3 files changed, 95 insertions, 0 deletions
diff --git a/testing/strongswan/APKBUILD b/testing/strongswan/APKBUILD
new file mode 100644
index 0000000000..4f7cede2f5
--- /dev/null
+++ b/testing/strongswan/APKBUILD
@@ -0,0 +1,54 @@
+# Contributor:
+# Maintainer:
+pkgname=strongswan
+pkgver=4.5.2
+pkgrel=0
+pkgdesc="IPsec-based VPN solution focused on security and ease of use, supporting IKEv1/IKEv2 and MOBIKE"
+url="http://www.strongswan.org/"
+arch="all"
+license="GPL-2 RSA-MD5 RSA-PKCS11 DES"
+depends="iproute2 openssl"
+depends_dev=
+makedepends="sqlite-dev openssl-dev curl-dev gmp-dev $depends_dev"
+install=""
+subpackages="$pkgname-dev $pkgname-doc"
+source="http://download.strongswan.org/$pkgname-$pkgver.tar.bz2 adns.patch strongswan.initd"
+
+_builddir=
+prepare() {
+ local i
+ cd "$srcdir/$pkgname-$pkgver"
+ for i in $source; do
+ case $i in
+ *.patch) msg $i; patch -Np1 -i "$srcdir"/$i || return 1;;
+ esac
+ done
+}
+
+build() {
+ cd "$srcdir/$pkgname-$pkgver"
+ ./configure --prefix=/usr --sysconfdir=/etc --libexecdir=/usr/lib --with-ipsecdir=/usr/lib/strongswan \
+ --enable-pluto \
+ --enable-sqlite --enable-smartcard --enable-cisco-quirks \
+ --enable-openssl --enable-curl \
+ --enable-sql --enable-attr-sql \
+ --enable-farp --enable-dhcp \
+ --enable-eap-sim --enable-eap-sim-file --enable-eap-simaka-pseudonym \
+ --enable-eap-simaka-reauth --enable-eap-identity --enable-eap-md5 \
+ --disable-eap-gtc --enable-eap-aka --enable-eap-aka-3gpp2 \
+ --enable-eap-mschapv2 --enable-eap-radius \
+ --enable-ha \
+ --disable-mysql --disable-ldap \
+ --disable-static --enable-shared || return 1
+ make || return 1
+}
+
+package() {
+ cd "$srcdir/$pkgname-$pkgver"
+ make DESTDIR="$pkgdir" install || return 1
+ install -m755 -D "$srcdir/$pkgname.initd" "$pkgdir/etc/init.d/$pkgname"
+}
+
+md5sums="ac33b8f849a274127f84df0838cae953 strongswan-4.5.2.tar.bz2
+64e8242e866ff9a99bdfae17d5d81e2a adns.patch
+fb9822512d02f521af8812db22a5175e strongswan.initd"
diff --git a/testing/strongswan/adns.patch b/testing/strongswan/adns.patch
new file mode 100644
index 0000000000..52c1852d0e
--- /dev/null
+++ b/testing/strongswan/adns.patch
@@ -0,0 +1,10 @@
+--- a/src/pluto/adns.c
++++ b/src/pluto/adns.c
+@@ -179,7 +179,7 @@
+ res_query(dname, class, type, answer, anslen)
+ # define res_nclose(statp) res_close()
+
+-static struct __res_state *statp = &_res;
++#define statp (&(_res))
+
+ #else /* !OLD_RESOLVER */
diff --git a/testing/strongswan/strongswan.initd b/testing/strongswan/strongswan.initd
new file mode 100644
index 0000000000..156883f110
--- /dev/null
+++ b/testing/strongswan/strongswan.initd
@@ -0,0 +1,31 @@
+#!/sbin/runscript
+
+depend() {
+ need net
+ after firewall
+}
+
+start() {
+ ebegin "Starting StrongSwan"
+ ipsec start
+ eend $?
+}
+
+stop () {
+ ebegin "Stopping StrongSwan"
+ ipsec stop
+ eend $?
+}
+restart() {
+ ebegin "Restarting StrongSwan"
+ svc_stop
+ sleep 2
+ svc_start
+ eend $?
+}
+
+status() {
+ ebegin "StrongSwan Status (verbose):"
+ ipsec statusall
+ eend $?
+}