# Maintainer: Luis Henrique <lmello.009@gmail.com>

# Mandatory
pkgname=ufw
pkgver=0.30
pkgrel=1lm
source=("http://launchpad.net/ufw/0.30/0.30/+download/ufw-0.30.tar.gz" "rc.ufw")
# Optional
docs=("AUTHORS" "ChangeLog*" "COPYING" "README*" "TODO")
url="https://launchpad.net/ufw"
dotnew=("/etc/ufw/applications.d/ufw-bittorrent" "/etc/ufw/applications.d/ufw-chat" "/etc/ufw/applications.d/ufw-directoryserver" "/etc/ufw/applications.d/ufw-dnsserver" "/etc/ufw/applications.d/ufw-fileserver" "/etc/ufw/applications.d/ufw-loginserver" "/etc/ufw/applications.d/ufw-mailserver" "/etc/ufw/applications.d/ufw-printserver" "/etc/ufw/applications.d/ufw-proxyserver" "/etc/ufw/applications.d/ufw-webserver" "etc/ufw/after.rules" "/etc/ufw/after6.rules" "/etc/ufw/before.rules" "/etc/ufw/before6.rules" "/etc/ufw/sysctl.conf" "/etc/ufw/ufw.conf" "/etc/default/ufw")
options=("noautodotnew")

slackdesc=\
(
#|-----handy-ruler------------------------------------------------------|
"ufw (uncomplicated firewall)"
"Ufw stands for Uncomplicated Firewall, and is program for managing a"
"netfilter firewall. It provides a command line interface and aims to"
"be uncomplicated and easy to use."
)

build() {
        cd $startdir/src/$pkgname-$pkgver
        python ./setup.py install --root=$startdir/pkg
        # Copy rc.ufw for automatic start-up at boot-time
        mkdir -p $startdir/pkg/etc/rc.d
        cp $startdir/src/rc.ufw $startdir/pkg/etc/rc.d
        chmod +x $startdir/pkg/etc/rc.d/rc.ufw
        # Fix typo
        mv $startdir/pkg/etc/ufw/applications.d/ufw-bittorent $startdir/pkg/etc/ufw/applications.d/ufw-bittorrent
}