diff options
-rw-r--r-- | testing/openswan/APKBUILD | 51 | ||||
-rw-r--r-- | testing/openswan/ipsec.confd | 7 | ||||
-rw-r--r-- | testing/openswan/ipsec.initd | 29 |
3 files changed, 87 insertions, 0 deletions
diff --git a/testing/openswan/APKBUILD b/testing/openswan/APKBUILD new file mode 100644 index 0000000000..c5d685e1ad --- /dev/null +++ b/testing/openswan/APKBUILD @@ -0,0 +1,51 @@ +# Contributor: Danilo Godec <danilo.godec@agenda.si> +# Maintainer: +pkgname=openswan +pkgver=2.6.35 +pkgrel=0 +pkgdesc="IPsec Implementation which Allows Building of VPNs" +url="http://www.openswan.org/" +arch="all" +license="GPL" +depends="" +depends_dev="gmp-dev bison flex" +makedepends="$depends_dev" +install="" +subpackages="$pkgname-doc" +source="http://www.openswan.org/download/$pkgname-$pkgver.tar.gz ipsec.confd ipsec.initd" + +_builddir="$srcdir"/$pkgname-$pkgver +prepare() { + local i + cd "$_builddir" + for i in $source; do + case $i in + *.patch) msg $i; patch -p1 -i "$srcdir"/$i || return 1;; + esac + done +} + +build() { + cd "$_builddir" + make INC_RCDEFAULT=/etc/init.d INC_USRLOCAL=/usr programs || return 1 +} + +package() { + cd "$_builddir" + make INC_RCDEFAULT=/etc/init.d INC_USRLOCAL=/usr DESTDIR="$pkgdir" install + install -Dm644 LICENSE "$pkgdir"/usr/share/licenses/$pkgname/LICENSE + install -Dm644 COPYING "$pkgdir"/usr/share/licenses/$pkgname/COPYING + + install -Dm755 "$srcdir"/ipsec.confd "$pkgdir"/etc/conf.d/ipsec + install -Dm755 "$srcdir"/ipsec.initd "$pkgdir"/etc/init.d/ipsec + install -Dm644 BUGS "$pkgdir"/usr/share/doc/$pkgname/BUGS + install -Dm644 CHANGES "$pkgdir"/usr/share/doc/$pkgname/CHANGES + install -Dm644 CREDITS "$pkgdir"/usr/share/doc/$pkgname/CREDITS + install -Dm644 INSTALL "$pkgdir"/usr/share/doc/$pkgname/INSTALL + install -Dm644 README "$pkgdir"/usr/share/doc/$pkgname/README + cp -aR docs/* "$pkgdir"/usr/share/doc/$pkgname/ + +} +md5sums="7909a251fbbb807914545b7f42437013 openswan-2.6.35.tar.gz +cbcac88f5b728b1441891947a4babbcb ipsec.confd +aa21293d9fbbbe2a02fb87dba05c4d20 ipsec.initd" diff --git a/testing/openswan/ipsec.confd b/testing/openswan/ipsec.confd new file mode 100644 index 0000000000..486252b03c --- /dev/null +++ b/testing/openswan/ipsec.confd @@ -0,0 +1,7 @@ +# Sample conf.d file for alpine linux + +# +# Specify daemon options here. +# + +sample_opts="" diff --git a/testing/openswan/ipsec.initd b/testing/openswan/ipsec.initd new file mode 100644 index 0000000000..a034601d4f --- /dev/null +++ b/testing/openswan/ipsec.initd @@ -0,0 +1,29 @@ +#!/sbin/runscript + +# Sample init.d file for alpine linux. + +name= +daemon=/usr/sbin/$name + +depend() { + need net + after firewall +} + +start() { + ebegin "Starting ${name}" + start-stop-daemon --start --quiet \ + --pidfile /var/run/${name}.pid \ + --chuid ${sample_user}:${sample_group} \ + --exec ${daemon} -- ${sample_opts} + eend $? +} + +stop() { + ebegin "Stopping ${name}" + start-stop-daemon --stop --quiet \ + --pidfile /var/run/$name.pid \ + --exec ${daemon} + eend $? +} + |