aboutsummaryrefslogtreecommitdiffstats
path: root/community
diff options
context:
space:
mode:
authorMilan P. Stanić <mps@arvanta.net>2019-05-28 13:03:43 +0200
committerMilan P. Stanić <mps@arvanta.net>2019-05-28 13:07:34 +0200
commit7828e4774dab3ed0e0112038225a12ca95804bf7 (patch)
tree1514f862bf50892217fa5eea13881164caef37e4 /community
parentba20d6eb1d6cf29898c4ec012fc238cdc3ca24f1 (diff)
downloadaports-7828e4774dab3ed0e0112038225a12ca95804bf7.tar.bz2
aports-7828e4774dab3ed0e0112038225a12ca95804bf7.tar.xz
community/fwknop: move from testing
take maintainership
Diffstat (limited to 'community')
-rw-r--r--community/fwknop/APKBUILD51
-rw-r--r--community/fwknop/fwknopd.initd14
2 files changed, 65 insertions, 0 deletions
diff --git a/community/fwknop/APKBUILD b/community/fwknop/APKBUILD
new file mode 100644
index 0000000000..972227214b
--- /dev/null
+++ b/community/fwknop/APKBUILD
@@ -0,0 +1,51 @@
+# Maintainer: Milan P. Stanić <mps@arvanta.net>
+pkgname=fwknop
+pkgver=2.6.10
+pkgrel=0
+pkgdesc="A Single Packet Authorization (SPA) implementation"
+url="http://www.cipherdyne.org/fwknop/"
+arch="all"
+license="GPL-2.0-or-later"
+depends="iptables"
+makedepends="libpcap-dev gpgme-dev"
+subpackages="$pkgname-dev $pkgname-doc $pkgname-libs $pkgname-openrc $pkgname-server"
+source="http://cipherdyne.org/fwknop/download/fwknop-$pkgver.tar.gz
+ fwknopd.initd"
+
+build() {
+ ./configure \
+ --build=$CBUILD \
+ --host=$CHOST \
+ --prefix=/usr \
+ --sysconfdir=/etc \
+ --mandir=/usr/share/man \
+ --infodir=/usr/share/info \
+ --localstatedir=/var \
+ --disable-static \
+ --with-gpgme
+ make
+}
+
+check() {
+ make check
+}
+
+package() {
+ make DESTDIR="$pkgdir" install
+ install -Dm755 "$srcdir"/fwknopd.initd "$pkgdir"/etc/init.d/fwknopd
+ cat <<- __EOF__ >> "$pkgdir"/etc/fwknop/access.conf
+ \# If using gnupg2 see https://www.gnupg.org/faq/GnuPG-FAQ.html#how-can-i-use-gnupg-in-an-automated-environment & sign the client public key on the server with a normal key which has a password"
+ \# disable GPG_DECRYPT_PW & enable the following variable:
+ \#GPG_ALLOW_NO_PW: Y;
+ __EOF__
+}
+
+server() {
+ pkgdesc="A Single Packet Authorization (SPA) server"
+ mkdir -p "$subpkgdir"/usr
+ mv "$pkgdir"/usr/sbin "$subpkgdir"/usr/ \
+ && mv "$pkgdir"/etc "$subpkgdir"/
+}
+
+sha512sums="3b3e35eda574abd1759431c88677eea7078c54cb3252c0ee0e1019b5b8224ed8844d30760da70a952e1cd92b04715a547f6effabda54678f791fff9afa32cd80 fwknop-2.6.10.tar.gz
+e3558c4a1579ea66b19451acc476f3cfec782b052f6d96a57ffc520169db755739e2bf3a815802cc5958a7b2fdeb9b39cf2182e5d89882cf4502985401352465 fwknopd.initd"
diff --git a/community/fwknop/fwknopd.initd b/community/fwknop/fwknopd.initd
new file mode 100644
index 0000000000..62494d3e41
--- /dev/null
+++ b/community/fwknop/fwknopd.initd
@@ -0,0 +1,14 @@
+#!/sbin/openrc-run
+
+pidfile="/var/run/fwknop/fwknopd.pid"
+command=/usr/sbin/fwknopd
+command_args="--pid-file $pidfile $fwknopd_args"
+
+depend() {
+ use logger
+ after net
+}
+
+start_pre() {
+ checkpath --directory ${pidfile%/*}
+}