makedepends=(python-setuptools)
run=(iptables python)

description="Uncomplicated and easy to use CLI tool for managing a netfilter firewall"
url="https://launchpad.net/ufw"

packager="Great-OS Team"
maintainer="Great-OS Team"

name="ufw"
version="0.36.2"
release=7

source=(https://launchpad.net/ufw/${version:0:4}/$version/+download/ufw-$version.tar.gz
        service)

build() {
  cd "$name-$version"

  sed -i -e '/net\/ipv4\/tcp_sack/s/^/#/g' conf/sysctl.conf
  sed -i -e 's|/lib|/usr/lib|' setup.py

  python3 setup.py install --root="$PKG"

  install -Dm644 shell-completion/bash "$PKG/usr/share/bash-completion/completions/ufw"
  install -Dm644 ../service "$PKG/usr/lib/systemd/system/ufw.service"
  chmod 644 $PKG/etc/ufw/*.rules
}
