aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJakub Jirutka <jakub@jirutka.cz>2019-11-08 14:55:36 +0100
committerJakub Jirutka <jakub@jirutka.cz>2019-11-08 15:24:02 +0100
commit06071ee97e4b8f17b87c0b60cded739be5f53430 (patch)
treeead6c397e8ce5529661f1acc7097221ccc119207
parentcf6733bf68b4454a712eb6525e385c0a7fa8ce49 (diff)
downloadaports-06071ee97e4b8f17b87c0b60cded739be5f53430.tar.bz2
aports-06071ee97e4b8f17b87c0b60cded739be5f53430.tar.xz
testing/jool-tools: new aport
-rw-r--r--testing/jool-tools/APKBUILD67
-rw-r--r--testing/jool-tools/joold-socket.json8
-rw-r--r--testing/jool-tools/joold.initd14
3 files changed, 89 insertions, 0 deletions
diff --git a/testing/jool-tools/APKBUILD b/testing/jool-tools/APKBUILD
new file mode 100644
index 0000000000..8aca9d640b
--- /dev/null
+++ b/testing/jool-tools/APKBUILD
@@ -0,0 +1,67 @@
+# Contributor: Jakub Jirutka <jakub@jirutka.cz>
+# Maintainer:
+_projname=jool
+pkgname=jool-tools
+pkgver=4.0.6
+pkgrel=0
+pkgdesc="Userspace control tools for SIIT / NAT64 Jool"
+url="https://www.jool.mx"
+arch="all"
+license="GPL-2.0-only"
+depends="ethtool"
+makedepends="argp-standalone iptables-dev libnl3-dev"
+subpackages="
+ joold
+ $pkgname-static
+ $pkgname-doc
+ $pkgname-bash-completion:bashcomp:noarch
+ "
+source="https://github.com/NICMx/Jool/releases/download/v$pkgver/$_projname-$pkgver.tar.gz
+ joold.initd
+ joold-socket.json
+ "
+builddir="$srcdir/$_projname-$pkgver"
+
+build() {
+ # --disable-shared - w/o this option the build fails with:
+ # relocation R_X86_64_PC32 against symbol `argp_program_version_hook'
+ # can not be used when making a shared object; recompile with -fPIC
+ ./configure \
+ --build=$CBUILD \
+ --host=$CHOST \
+ --prefix=/usr \
+ --sysconfdir=/etc \
+ --mandir=/usr/share/man \
+ --localstatedir=/var \
+ --disable-shared
+ make
+}
+
+package() {
+ make install DESTDIR="$pkgdir"
+
+}
+
+joold() {
+ pkgdesc="Userspace Session Synchronization (SS) daemon for NAT64 Jool"
+ depends=""
+
+ mkdir -p "$subpkgdir"/usr/bin
+ mv "$pkgdir"/usr/bin/joold "$subpkgdir"/usr/bin/
+
+ install -D -m 0755 "$srcdir"/joold.initd "$subpkgdir"/etc/init.d/joold
+ install -D -m 0644 "$srcdir"/joold-socket.json "$subpkgdir"/etc/joold-socket.json
+}
+
+bashcomp() {
+ pkgdesc="Bash completions for $pkgname"
+ depends=""
+ install_if="$pkgname=$pkgver-r$pkgrel bash-completion"
+
+ mkdir -p "$subpkgdir"/usr/share
+ mv "$pkgdir"/usr/share/bash-completion "$subpkgdir"/usr/share/
+}
+
+sha512sums="8648cc876d801b34c4bc9616da642727d1e49ed2937daa7fdca58c0fd80dbd1c432018af410c44c1d24224aba5289f726f43adc259cdf8193832d39a86d0f6a6 jool-4.0.6.tar.gz
+c53ac4e0bf44c80596244396f3a56965be1ef279806c47601f0ce1ce803dc21a6a8e5d020fb0f3abae1c9a106c7eef8e1bb2fe7a47d6c8a346351397ed0608ec joold.initd
+15758922ba83219f7edf34d93d825fcafb354b551a79f9b70e486faebcb154f55a52806aca6f7b9ec0d8277caa64a06a2525829be41c538cb3c678a78112b5e9 joold-socket.json"
diff --git a/testing/jool-tools/joold-socket.json b/testing/jool-tools/joold-socket.json
new file mode 100644
index 0000000000..5c97740607
--- /dev/null
+++ b/testing/jool-tools/joold-socket.json
@@ -0,0 +1,8 @@
+{
+ "multicast address": "ff08::db8:64:64",
+ "multicast port": "6464",
+ "in interface": "eth0",
+ "out interface": "eth0",
+ "reuseaddr": 1,
+ "ttl": 3
+}
diff --git a/testing/jool-tools/joold.initd b/testing/jool-tools/joold.initd
new file mode 100644
index 0000000000..c934d0b636
--- /dev/null
+++ b/testing/jool-tools/joold.initd
@@ -0,0 +1,14 @@
+#!/sbin/openrc-run
+
+: ${cfgfile:="/etc/$RC_SVCNAME-socket.json"}
+
+command="/usr/bin/joold"
+command_args="$cfgfile"
+command_background=yes
+
+pidfile="/run/$RC_SVCNAME.pid"
+required_files="$cfgfile"
+
+depend() {
+ need net
+}