mirror of
https://gitdl.cn/https://github.com/chakralinux/desktop.git
synced 2025-02-03 16:47:25 +08:00
54 lines
1.6 KiB
Bash
54 lines
1.6 KiB
Bash
#
|
|
# Chakra Packages for Chakra, part of chakra-project.org
|
|
#
|
|
# maintainer abveritas@chakra-project.org
|
|
|
|
pkgname=ufw
|
|
pkgver=0.32
|
|
pkgrel=1
|
|
pkgdesc="Uncomplicated and easy to use CLI tool for managing a netfilter firewall"
|
|
arch=('any')
|
|
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}/0.32/${pkgver}/+download/${pkgname}-${pkgver}.tar.gz"
|
|
"${pkgname}.rc"
|
|
"${pkgname}.service")
|
|
md5sums=('e9d314a6213c94ec6bddf107f7bbdb9f'
|
|
'3d32964a23e0d6b3b7002272154bfad3'
|
|
'd125e918ce9a832c528e6982cf6f6d98')
|
|
|
|
package() {
|
|
cd "${srcdir}/${pkgname}-${pkgver}"
|
|
|
|
sed -e 's|/lib|/usr/lib|' -i setup.py
|
|
python2 setup.py install --root="${pkgdir}"
|
|
|
|
# Install sysvinit script and systemd unit
|
|
install -D -m755 "${srcdir}/${pkgname}.rc" "${pkgdir}/etc/rc.d/${pkgname}"
|
|
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"
|
|
}
|
|
|
|
# vim:set ts=2 sw=2 et:
|