# Contributor: Łukasz Jendrysik <scadu@yandex.com>
# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
pkgname=shorewall-core
pkgver=5.1.11.1

_ver=$pkgver
case $pkgver in
	*.*.*.*) _ver=${pkgver%.*};;
esac

pkgrel=0
pkgdesc="Core libraries for Shorewall"
url="http://www.shorewall.net/"
arch="noarch"
license="GPL-2.0"
options="!check"
depends=""
# coreutils for install -T
makedepends="coreutils bash"
subpackages="$pkgname-doc"
source="http://www.shorewall.net/pub/shorewall/${_ver%.*}/shorewall-$_ver/shorewall-core-$pkgver.tar.bz2
	shorewallrc.alpine
	"
builddir="$srcdir/$pkgname-$pkgver"

prepare() {
	cd "$builddir"

	default_prepare

	cp "$srcdir"/shorewallrc.alpine .
}

build() {
	cd "$builddir"
	./configure
}

package() {
	cd "$builddir"
	DESTDIR="$pkgdir" ./install.sh shorewallrc.alpine
}

sha512sums="a87b857db961d001fc0ffe2f504df01e8b08ba05014986132e63dbe01e07411983a0c0b16b1e3618f2551d3d3a3fbb02d20569cb295ffd8ffc77ad65ff745b0b  shorewall-core-5.1.11.1.tar.bz2
c076ae42e7b404cecf521fdc32f92ba3a6b77d61579726abde2f00b6b6282e55b0b334b9fe5e43a6e4ae56361cce3214d9a38099f9f8714f03ae4fb888c744b7  shorewallrc.alpine"
