desktop/ufw/PKGBUILD

43 lines
1.3 KiB
Bash
Raw Normal View History

2010-11-01 04:39:36 +08:00
pkgname=ufw
2016-05-14 09:18:44 +08:00
pkgver=0.35
2017-10-24 04:24:55 +08:00
pkgrel=2
2010-11-01 04:39:36 +08:00
pkgdesc="Uncomplicated and easy to use CLI tool for managing a netfilter firewall"
2013-06-01 23:28:48 +08:00
arch=('x86_64')
2010-11-01 04:39:36 +08:00
url="https://launchpad.net/ufw"
license=('GPL3')
2015-05-14 12:15:21 +08:00
depends=('iptables' 'python3')
2010-11-01 04:39:36 +08:00
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'
2016-05-14 09:18:44 +08:00
'etc/ufw/user.rules'
'etc/ufw/user6.rules')
categories=('network')
2016-05-14 09:18:44 +08:00
install=${pkgname}.install
2015-11-02 12:16:56 +08:00
source=("https://launchpad.net/ufw/${pkgver}/${pkgver}/+download/${pkgname}-${pkgver}.tar.gz"
"${pkgname}.service")
2016-05-14 09:18:44 +08:00
sha256sums=('662f865bc83bf8aa1a40a6fe578bc2ce796ff60a1be2c1103def7db1b91f8509'
2015-05-14 12:15:21 +08:00
'39ccb104137be8a8e47c66a9b23adec209acecc6ac0ab4f2ef5f84770937f86f')
2010-11-01 04:39:36 +08:00
package() {
2015-11-02 12:16:56 +08:00
cd "$pkgname-$pkgver"
# Move from /lib to /usr/lib
sed -i -e 's|/lib|/usr/lib|' \
-e 's|sbin|bin|g' setup.py
2015-11-02 12:16:56 +08:00
python3 setup.py install --root="$pkgdir"
2017-10-24 04:24:55 +08:00
rm -rf ${pkgdir}/usr/lib/python3.6/site-packages/ufw/__pycache__
2010-11-01 04:39:36 +08:00
2015-11-02 12:16:56 +08:00
# Correct iptables location
2017-10-24 04:24:55 +08:00
sed -i -e 's|sbin|bin|g' "$pkgdir/usr/lib/python3.6/site-packages/ufw/"*
2015-11-02 12:16:56 +08:00
install -Dm644 "$srcdir/ufw.service" "$pkgdir/usr/lib/systemd/system/ufw.service"
2016-05-14 09:18:44 +08:00
chmod 644 "$pkgdir/etc/ufw/"*.rules
}