pkgname=ufw pkgver=0.35 pkgrel=2 pkgdesc="Uncomplicated and easy to use CLI tool for managing a netfilter firewall" arch=('x86_64') url="https://launchpad.net/ufw" license=('GPL3') depends=('iptables' 'python3') backup=('etc/ufw/before.rules' 'etc/ufw/before6.rules' 'etc/ufw/after.rules' 'etc/ufw/after6.rules' 'etc/ufw/ufw.conf' 'etc/ufw/user.rules' 'etc/ufw/sysctl.conf' 'etc/default/ufw' 'etc/ufw/user.rules' 'etc/ufw/user6.rules') categories=('network') install=${pkgname}.install source=("https://launchpad.net/ufw/${pkgver}/${pkgver}/+download/${pkgname}-${pkgver}.tar.gz" "${pkgname}.service") sha256sums=('662f865bc83bf8aa1a40a6fe578bc2ce796ff60a1be2c1103def7db1b91f8509' '39ccb104137be8a8e47c66a9b23adec209acecc6ac0ab4f2ef5f84770937f86f') package() { cd "$pkgname-$pkgver" # Move from /lib to /usr/lib sed -i -e 's|/lib|/usr/lib|' \ -e 's|sbin|bin|g' setup.py python3 setup.py install --root="$pkgdir" rm -rf ${pkgdir}/usr/lib/python3.6/site-packages/ufw/__pycache__ # Correct iptables location sed -i -e 's|sbin|bin|g' "$pkgdir/usr/lib/python3.6/site-packages/ufw/"* install -Dm644 "$srcdir/ufw.service" "$pkgdir/usr/lib/systemd/system/ufw.service" chmod 644 "$pkgdir/etc/ufw/"*.rules }