# Contributor:
# Maintainer:
pkgname=ufw
pkgver=0.36
pkgrel=0
pkgdesc="Uncomplicated Firewall"
url="https://launchpad.net/ufw"
arch="noarch"
options="!check"  # No test suite.
license="GPL-3.0-only AND GPL-2.0-only"
depends="python3 iptables"
makedepends="python3-dev gettext-tiny-dev"
subpackages="ufw-doc
	ufw-openrc
	"
source="http://launchpad.net/ufw/$pkgver/$pkgver/+download/$pkgname-$pkgver.tar.gz
	ufw-0.36-bash-completion.patch
	ufw-0.36-move-path.patch

	ufw.initd
	ufw.confd
	"

build() {
	python3 setup.py build
}

package() {
	python3 setup.py install --root="$pkgdir"
	gzip "$pkgdir"/usr/share/man/man8/ufw.8
	gzip "$pkgdir"/usr/share/man/man8/ufw-framework.8
	install -D -m755 "$srcdir"/ufw.initd \
		"$pkgdir"/etc/init.d/ufw
	install -D -m644 "$srcdir"/ufw.confd \
		"$pkgdir"/etc/conf.d/ufw
}

sha512sums="b32d7f79f43c203149c48b090ee0d063df78fcf654344ee11066a7363e799a62b046758ffe02b8bd15121545ac2a6b61df21fe56f8b810319fe4dd562cbdadb3  ufw-0.36.tar.gz
11a9cf4906fa0bd677e745615b3c4d663512a1d05f9c21149d09624237a88938b9ed83b8ca876dbcf9bbac41a4bf7155eba76ec32778e025f013e1ffb07e4abb  ufw-0.36-bash-completion.patch
228ed40f800b8ed4bbc217df9478c1c0be5eb1ec154abd2d3a3cd6c92902632f07ef70c3ca3f2478bfe501735a0f6f0b7fa8d8f4991fdaead4332e4c65bad0c9  ufw-0.36-move-path.patch
f6cb7f6f7713d6f2c78c0b0254f385701f28b997931007997f0702af0dcd0d1b1bf08617dbb3abd21219c23a63ec3286e019896253ff7e9bdbb218a5bb17dd80  ufw.initd
a010532c97b9cf83f1fb5fa707228e0542a8b109c76e5942aaf2d6552c63e033d32e39e5a6ac87cb9e2ed4c3fdbc5d03c75127e6378665e592b143bc1eda52c7  ufw.confd"