aboutsummaryrefslogtreecommitdiffstats
path: root/testing
diff options
context:
space:
mode:
authorJakub Jirutka <jakub@jirutka.cz>2020-02-04 22:38:37 +0100
committerJakub Jirutka <jakub@jirutka.cz>2020-02-04 22:39:26 +0100
commite23b9dcdba2b90622c79227bfdaead3696963889 (patch)
treef7ea755ea35150b2d9fdcf18ed11694a6e2b05d4 /testing
parent9d56d67635b6be366a2652d8106d49dad4fcd427 (diff)
downloadaports-e23b9dcdba2b90622c79227bfdaead3696963889.tar.bz2
aports-e23b9dcdba2b90622c79227bfdaead3696963889.tar.xz
testing/nftlb: new aport
Diffstat (limited to 'testing')
-rw-r--r--testing/nftlb/APKBUILD48
-rw-r--r--testing/nftlb/nftlb.confd23
-rw-r--r--testing/nftlb/nftlb.initd16
3 files changed, 87 insertions, 0 deletions
diff --git a/testing/nftlb/APKBUILD b/testing/nftlb/APKBUILD
new file mode 100644
index 0000000000..2a20fb82e4
--- /dev/null
+++ b/testing/nftlb/APKBUILD
@@ -0,0 +1,48 @@
+# Contributor: Jakub Jirutka <jakub@jirutka.cz>
+# Maintainer: Jakub Jirutka <jakub@jirutka.cz>
+pkgname=nftlb
+pkgver=0.5
+pkgrel=0
+pkgdesc="nftables load balancer"
+url="https://github.com/zevenet/nftlb"
+arch="all"
+license="AGPL-3.0"
+checkdepends="bash"
+makedepends="autoconf automake libev-dev libmnl-dev libtool nftables-dev"
+subpackages="$pkgname-openrc"
+source="https://github.com/zevenet/nftlb/archive/v$pkgver/$pkgname-$pkgver.tar.gz
+ $pkgname.initd
+ $pkgname.confd
+ "
+builddir="$srcdir/$pkgname-$pkgver"
+
+prepare() {
+ autoreconf -fi
+ default_prepare
+}
+
+build() {
+ ./configure \
+ --build=$CBUILD \
+ --host=$CHOST \
+ --prefix=/usr \
+ --sysconfdir=/etc \
+ --localstatedir=/var
+ make
+}
+
+check() {
+ # NOTE: It's not safe to run the provided tests on the builder.
+ ./src/nftlb --help 2>/dev/null || ./src/nftlb --help
+}
+
+package() {
+ make install DESTDIR="$pkgdir"
+
+ install -m 0755 -D "$srcdir"/$pkgname.initd "$pkgdir"/etc/init.d/$pkgname
+ install -m 0644 -D "$srcdir"/$pkgname.confd "$pkgdir"/etc/conf.d/$pkgname
+}
+
+sha512sums="af4c7efff084205630673c2c9959453aa701f0c235fd57a9990b6fdff09c7dc1e67963a913a1d36ac4d98dfebfcbeb798526ad7913146b368bee11c2296b7025 nftlb-0.5.tar.gz
+3e15dc73b21412d1504892ee1e550a00c895671069a32e9c80a38a7c68bc8988c44519bfb15f288e42a96047febfeb38eeffc534381d644f87ede859b23efe71 nftlb.initd
+9a4384fe295203a80489ea2a61f0c4b9b8b2ac1be51c506b4ab5c3c9e76818a0cd18f6b372323ea84dcd0437e1224cd9be339c9463c3c8042e6c3e74e73ae360 nftlb.confd"
diff --git a/testing/nftlb/nftlb.confd b/testing/nftlb/nftlb.confd
new file mode 100644
index 0000000000..2a8a9bdeb0
--- /dev/null
+++ b/testing/nftlb/nftlb.confd
@@ -0,0 +1,23 @@
+# Configuration for /etc/init.d/nftlb
+
+#Initial configuration file (optional).
+#cfgfile=
+
+# The logs will be shown in the syslog file and with this option you can
+# change the loglevel from 0 to 7 (5 by default).
+#log_level=
+
+# The authentication key for the web service can be set by command line, or
+# automatically generated. If it's automatically generated, it'll be shown by
+# command line.
+#auth_key=
+
+# Enable IPv6 support for the web service listening port. Any value except
+# empty string is interpreted as yes!
+#listen_ipv6=
+
+# Set the host for the web service (all interfaces by default).
+listen_host="127.0.0.1"
+
+# Set the TCP port for the web service (5555 by default).
+#listen_port=
diff --git a/testing/nftlb/nftlb.initd b/testing/nftlb/nftlb.initd
new file mode 100644
index 0000000000..be68d77e67
--- /dev/null
+++ b/testing/nftlb/nftlb.initd
@@ -0,0 +1,16 @@
+#!/sbin/openrc-run
+
+description="nftables load balancer"
+
+command="/usr/sbin/nftlb"
+command_args="
+ ${log_level:+--log $log_level}
+ ${cfgfile:+--config $cfgfile}
+ ${auth_key:+--key '$auth_key'}
+ ${listen_ipv6:+--ipv6}
+ ${listen_host:+--host $listen_host}
+ ${listen_port:+--port $listen_port}
+ $command_args
+ "
+command_background="yes"
+pidfile="/run/$RC_SVCNAME.pid"