aboutsummaryrefslogtreecommitdiffstats
path: root/main/awall/APKBUILD
blob: 3ad71956e3c391f9e0f777d824d95576de57a4e3 (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
48
# Contributor: Kaarle Ritvanen <kaarle.ritvanen@datakunkku.fi>
# Maintainer: Kaarle Ritvanen <kaarle.ritvanen@datakunkku.fi>
pkgname=awall
pkgver=1.2.5
pkgrel=0
pkgdesc="Alpine Wall"
url="http://git.alpinelinux.org/cgit/awall/"
arch="noarch"
license="GPL2"
replaces="awall-nat"
depends="bind-tools ip6tables ipset iptables lua lua-alt-getopt lua-cjson
         lua-pc lua-posix lua-stringy xtables-addons"
subpackages=$pkgname-masquerade
triggers="$pkgname.trigger=/usr/share/awall"
source="http://dev.alpinelinux.org/archive/awall/awall-$pkgver.tar.xz"

_builddir=$srcdir/awall-$pkgver
prepare() {
	cd "$_builddir"
	for i in $source; do
		case $i in
		*.patch) msg $i; patch -p1 -i "$srcdir"/$i || return 1;;
		esac
	done
}

build() {
	return 0
}

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

masquerade() {
	depends=awall
	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="3d6b09133d7ebc59ec37025e86d1b700  awall-1.2.5.tar.xz"
sha256sums="f80b3e53a444354ffa123c6c0d57c9ff32a445529d42e16a5e1127f023ed9dd1  awall-1.2.5.tar.xz"
sha512sums="d895b2ee8e252113554a180e237c1c6f6064b90cff5108ab9b7137bf4ba5fd23bf14676fa9d0531ab20ff5678c226da4031186fb9758758aa7e36e4e38ca89c0  awall-1.2.5.tar.xz"