summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNatanael Copa <ncopa@alpinelinux.org>2013-11-21 10:27:20 +0000
committerNatanael Copa <ncopa@alpinelinux.org>2013-11-21 10:27:20 +0000
commitf6ba5a7b8ec1443fd72ed4880a2402a16b4cdf19 (patch)
tree2c7fb8dae5bc09b1b881786a0eaf562e534e4351
parentd2a456191a9d38342969971e40dc56b7bd70733d (diff)
downloadaports-f6ba5a7b8ec1443fd72ed4880a2402a16b4cdf19.tar.bz2
aports-f6ba5a7b8ec1443fd72ed4880a2402a16b4cdf19.tar.xz
testing/fwknop: new aport
A Single Packet Authorization (SPA) implementation http://www.cipherdyne.org/fwknop/
-rw-r--r--testing/fwknop/APKBUILD62
-rw-r--r--testing/fwknop/fwknopd.initd9
2 files changed, 71 insertions, 0 deletions
diff --git a/testing/fwknop/APKBUILD b/testing/fwknop/APKBUILD
new file mode 100644
index 000000000..aaf5f75c9
--- /dev/null
+++ b/testing/fwknop/APKBUILD
@@ -0,0 +1,62 @@
+# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
+pkgname=fwknop
+pkgver=2.5.1
+pkgrel=0
+pkgdesc="A Single Packet Authorization (SPA) implementation"
+url="http://www.cipherdyne.org/fwknop/"
+arch="all"
+license="GPLv2"
+depends="iptables"
+depends_dev=""
+makedepends="$depends_dev libpcap-dev iptables gpgme-dev"
+install=""
+subpackages="$pkgname-dev $pkgname-doc $pkgname-libs $pkgname-server"
+source="http://cipherdyne.org/fwknop/download/fwknop-$pkgver.tar.gz
+ fwknopd.initd"
+
+_builddir="$srcdir"/fwknop-$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"
+ ./configure \
+ --build=$CBUILD \
+ --host=$CHOST \
+ --prefix=/usr \
+ --sysconfdir=/etc \
+ --mandir=/usr/share/man \
+ --infodir=/usr/share/info \
+ --localstatedir=/var \
+ --with-gpgme \
+ || return 1
+ make || return 1
+}
+
+package() {
+ cd "$_builddir"
+ make DESTDIR="$pkgdir" install || return 1
+ rm -f "$pkgdir"/usr/lib/*.la || return 1
+ install -Dm755 "$srcdir"/fwknopd.initd "$pkgdir"/etc/init.d/fwknopd
+}
+
+server() {
+ pkgdesc="A Single Packet Authorization (SPA) server"
+ mkdir -p "$subpkgdir"/usr
+ mv "$pkgdir"/usr/sbin "$subpkgdir"/usr/ \
+ && mv "$pkgdir"/etc "$subpkgdir"/
+}
+
+md5sums="6d7fc04b7a94570485d184b183e6c272 fwknop-2.5.1.tar.gz
+6921ba05a6b672c0994d005c4c4771ef fwknopd.initd"
+sha256sums="6c364875431542e3f00b8c2fc0e354e4ddf333ed282f83e28a0d6a79326572d5 fwknop-2.5.1.tar.gz
+07083bba79ada87a46fb4559b7b1ec79109e941ab299bf44de9ae318b9dac040 fwknopd.initd"
+sha512sums="c3c4fa65817fb64c67f36b9e47651cc70b424009c70abf7f24f9716c7d43d607bb35a8fdfbb3ba28916176acede7e762bc164538a2444926aa3a754d3cc4a847 fwknop-2.5.1.tar.gz
+d782eca76f036cf1eccfe4296e0e169c13ca15f191eddffc65bd696a551e8e1dec0b3c146ce0dfb19ed812fe36409620cb5d259ceb5a000adb64ceaa0f7825f8 fwknopd.initd"
diff --git a/testing/fwknop/fwknopd.initd b/testing/fwknop/fwknopd.initd
new file mode 100644
index 000000000..fe513f091
--- /dev/null
+++ b/testing/fwknop/fwknopd.initd
@@ -0,0 +1,9 @@
+#!/sbin/runscript
+
+pidfile="/var/run/fwknop/fwknopd.pid"
+command=/usr/sbin/fwknopd
+command_args="--pid-file $pidfile $fwknopd_args"
+
+start_pre() {
+ checkpath --directory ${pidfile%/*}
+}