blob: 08f3cec4ffd053e3f577236425a7495b1324e11a (
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
|
# Contributor: Kaarle Ritvanen <kaarle.ritvanen@datakunkku.fi>
# Maintainer: Kaarle Ritvanen <kaarle.ritvanen@datakunkku.fi>
pkgname=awall
pkgver=1.4.5
pkgrel=0
pkgdesc="Alpine Wall"
url="http://git.alpinelinux.org/cgit/awall/"
_luaver=5.2
arch="noarch"
license="GPL2"
replaces="awall-nat"
depends="bind-tools ip6tables ipset iptables lua$_luaver lua$_luaver-alt-getopt lua$_luaver-cjson
lua$_luaver-pc lua$_luaver-posix lua$_luaver-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
build() {
sed -i -e "1,1s:lua:lua$_luaver:" awall-cli
return 0
}
check() {
cd "$builddir"
make check
}
package() {
cd "$builddir"
make "ROOT_DIR=$pkgdir" LUA_VERSION=$_luaver install
}
masquerade() {
depends=awall
cd "$builddir"
for file in lua/$_luaver/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
}
sha512sums="80ac2bd82d1b5866b9cbfa47a8cf06ebe26ebf5f0b21f1b114e532f425419c360f5b1748302ef734e0c8a43805b6cc9a43c2c76b2c63cdfd2d843dc80ad90502 awall-1.4.5.tar.xz"
|