mirror of
https://gitdl.cn/https://github.com/chakralinux/desktop.git
synced 2025-01-24 02:22:13 +08:00
43 lines
1.3 KiB
Bash
43 lines
1.3 KiB
Bash
pkgname=ufw
|
|
pkgver=0.35
|
|
pkgrel=1
|
|
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.5/site-packages/ufw/__pycache__
|
|
|
|
# Correct iptables location
|
|
sed -i -e 's|sbin|bin|g' "$pkgdir/usr/lib/python3.5/site-packages/ufw/"*
|
|
|
|
install -Dm644 "$srcdir/ufw.service" "$pkgdir/usr/lib/systemd/system/ufw.service"
|
|
chmod 644 "$pkgdir/etc/ufw/"*.rules
|
|
}
|