aboutsummaryrefslogtreecommitdiffstats
path: root/main/awall/APKBUILD
blob: 97f9f596a8d2b96434af0f692389adbfaa1c424b (plain)
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
# Contributor: Kaarle Ritvanen <kaarle.ritvanen@datakunkku.fi>
# Maintainer: Kaarle Ritvanen <kaarle.ritvanen@datakunkku.fi>
pkgname=awall
pkgver=0.1.4
pkgrel=0
pkgdesc="Alpine Wall"
url=http://git.alpinelinux.org/cgit/kunkku/awall/
arch=noarch
license=GPL-2
depends="bind-tools ip6tables ipset iptables lua lua-alt-getopt lua-filesystem lua-json4 lua-pc lua-signal lua-sleep lua-stringy"
subpackages="$pkgname-masquerade $pkgname-nat"
source="${url}snapshot/awall-${pkgver}.tar.bz2"

_builddir=$srcdir/awall-${pkgver}

prepare() {
	:
}

build() {
	:
}

package() {
	cd "$_builddir"
	make "ROOT_DIR=$pkgdir" install
}

nat() {
	depends=awall
	cd "$_builddir"
	local path=usr/share/lua/5.1/awall/modules
	install -d "$subpkgdir/$path"
	mv "$pkgdir/$path/nat.lua" "$subpkgdir/$path"
}

masquerade() {
	depends=awall-nat
	cd "$_builddir"
	for file in lua/5.1/awall/modules/masquerade.lua awall/mandatory/masquerade.json; do	    	
		local path=usr/share/$file
		install -d "$subpkgdir/$(dirname $path)"
		mv "$pkgdir/$path" "$subpkgdir/$path"
	done
}

md5sums="e6dfe36bf09ed6c0dcaccfd8a2e12ae6  awall-0.1.4.tar.bz2"