aboutsummaryrefslogtreecommitdiffstats
path: root/main/dmvpn/APKBUILD
blob: c813baa59a7405fb4af9f01ba31efff5f7a555f0 (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
# Contributor: Kaarle Ritvanen <kaarle.ritvanen@datakunkku.fi>
# Maintainer: Kaarle Ritvanen <kaarle.ritvanen@datakunkku.fi>
pkgname=dmvpn
pkgver=1.2.3
pkgrel=0
pkgdesc="Dynamic Multipoint VPN"
url="https://git.alpinelinux.org/cgit/dmvpn-tools/"
arch="noarch"
license="MIT"
depends="augeas bind-tools lua5.2 lua5.2-cqueues lua5.2-lyaml lua5.2-ossl
         lua5.2-posix lua5.2-struct lua-dmvpn quagga strongswan tunnel"
subpackages="dmvpn-ca dmvpn-crl-dp lua-dmvpn"
options="!check"
source="$url/snapshot/dmvpn-tools-$pkgver.tar.bz2"
builddir="$srcdir/dmvpn-tools-$pkgver"

build() {
	:
}

package() {
	cd "$builddir"

	install -D -m 644 dmvpn.awall "$pkgdir"/usr/share/awall/optional/dmvpn.json
	install -D -m 644 dmvpn-hub.awall "$pkgdir"/usr/share/awall/optional/dmvpn-hub.json
	install -D dmvpn-pfx-decode "$pkgdir"/usr/libexec/dmvpn-pfx-decode
	install -D -m 644 dmvpn.charon "$pkgdir"/etc/strongswan.d/dmvpn.conf
	install -D -m 644 dmvpn.swanctl "$pkgdir"/etc/swanctl/conf.d/dmvpn.conf
	install -D nhrp-events "$pkgdir"/usr/sbin/nhrp-events
	install -D nhrp-events.initd "$pkgdir"/etc/init.d/nhrp-events
	install -D setup-dmvpn "$pkgdir"/usr/sbin/setup-dmvpn
}

ca() {
	depends="lua5.2 lua5.2-lyaml lua5.2-ossl lua5.2-posix lua5.2-sql-sqlite3
	         lua5.2-stringy lua-asn1 lua-dmvpn"

	cd "$builddir"

	install -D dmvpn-ca "$subpkgdir"/usr/bin/dmvpn-ca
	install -D -m 644 dmvpn-ca.conf "$subpkgdir"/etc/dmvpn-ca.conf
}

dp() {
	depends=lighttpd

	local bin=/usr/bin/dmvpn-crl-update
	install -D "$builddir"/dmvpn-crl-update "$subpkgdir$bin"

	local dir=$subpkgdir/etc/periodic/15min
	mkdir -p "$dir"
	ln -s $bin "$dir"
}

dmvpn() {
	depends=lua-asn1

	cd "$builddir"
	install -D -m 644 dmvpn.lua "$subpkgdir"/usr/share/lua/5.2/dmvpn.lua
}

sha512sums="b318c358def83807ca205b1097f02a7ce393bc8212583ba670fc77924bcfa0d8c6fd0b4c397a2e029b75bdd1dec40b67bf968c7a7f2ece2b95650d88e33e81d1  dmvpn-tools-1.2.3.tar.bz2"