# Contributor: Kaarle Ritvanen # Maintainer: Kaarle Ritvanen pkgname=awall pkgver=1.5.0 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="e7ab2c1125711b0f94a16e6bf3772fe9ddd0f28ae5414bd8b315e76487db7f007037dfa4347167e8f4dacf1bfe572907c1d8ccdcc0039e9c15eb3d30a6abc851 awall-1.5.0.tar.xz"