mirror of
https://gitdl.cn/https://github.com/chakralinux/desktop.git
synced 2025-01-24 18:42:12 +08:00
46 lines
1.5 KiB
Bash
46 lines
1.5 KiB
Bash
# maintainer: Neophytos Kolokotronis <tetris4@gmail.com>
|
|
|
|
pkgname=ufw
|
|
pkgver=0.33
|
|
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' 'python')
|
|
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'
|
|
'usr/lib/ufw/user.rules'
|
|
'usr/lib/ufw/user6.rules')
|
|
categories=('network')
|
|
source=("http://launchpad.net/${pkgname}/${pkgver}/${pkgver}/+download/${pkgname}-${pkgver}.tar.gz"
|
|
"${pkgname}.service")
|
|
sha256sums=('5f85a8084ad3539b547bec097286948233188c971f498890316dec170bdd1da8'
|
|
'4593cc83b4bb4a36e6a80ebc0aa9cdb389c772566e84b9dad5cb690a6356b83a')
|
|
|
|
package() {
|
|
cd "${srcdir}/${pkgname}-${pkgver}"
|
|
|
|
sed -e 's|/lib|/usr/lib|' -i setup.py
|
|
python2 setup.py install --root="${pkgdir}"
|
|
|
|
# Install systemd unit
|
|
install -D -m644 "${srcdir}/${pkgname}.service" "${pkgdir}/usr/lib/systemd/system/${pkgname}.service"
|
|
|
|
# Move ufw to /usr/bin
|
|
install -D -m755 "${pkgdir}/usr/sbin/${pkgname}" "${pkgdir}/usr/bin/${pkgname}"
|
|
rm -rf "${pkgdir}/usr/sbin"
|
|
|
|
# Fix permissions
|
|
chmod 644 "${pkgdir}/etc/ufw"/*.rules "${pkgdir}/usr/lib/ufw"/*.rules
|
|
|
|
# Absolute paths are bad!
|
|
sed -e 's#/bin/echo#echo#g' -i "${pkgdir}/usr/lib/ufw/ufw-init-functions"
|
|
}
|