aboutsummaryrefslogtreecommitdiffstats
path: root/testing/jool-tools/APKBUILD
blob: 8aca9d640ba3c8a7b6071024c3033f87d7bb22d6 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
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"