# $Id: PKGBUILD 130039 2015-03-27 15:21:54Z alucryd $
# Maintainer: Maxime Gauduin <alucryd@archlinux.org>
# Contributor: unikum <unikum.pm@gmail.com>
# Contributor: speed145a <jonathan@tagchapter.com>

pkgname=firewalld
pkgver=0.3.13
pkgrel=2
pkgdesc='A dynamic firewall daemon with a D-BUS interface'
arch=('any')
url='http://fedorahosted.org/firewalld'
license=('GPL2')
depends=('dbus-glib' 'ebtables' 'gtk3' 'iptables' 'libnotify' 'python-slip')
makedepends=('intltool' 'docbook-xsl')
optdepends=('networkmanager: firewall-config and firewall-applet')
backup=('etc/conf.d/firewalld'
        'etc/firewalld/firewalld.conf')
install='firewalld.install'
source=("http://fedorahosted.org/released/firewalld/firewalld-${pkgver}.tar.bz2"
        "firewalld-paths.patch"
        "firewalld-syntax.patch")
sha256sums=('bca88cbce4290b6959b3c0eea560e7f19c7cf2f563caca585b7db5cd2fca8ac9'
            '41591c5358c5ad8d43b29d72f42c331fcfc25e3d38c0ba5b3c818fc757ceef2f'
            '42f0e4dbf574ac7b87df77117816dbc4a2ac17f709a22990eeeb973950cc6322')

prepare() {
  cd firewalld-${pkgver}

  patch -Np1 -i ../firewalld-paths.patch
  patch -Np1 -i ../firewalld-syntax.patch
}

build() {
  cd firewalld-${pkgver}

  ./configure \
    --prefix='/usr'\
    --localstatedir='/var' \
    --sbindir='/usr/bin' \
    --sysconfdir='/etc' \
    --disable-schemas-compile
  make
}

package() {
  cd firewalld-${pkgver}

  make DESTDIR="${pkgdir}" install
  chmod 755 "${pkgdir}"/usr/bin/firewall-applet
}

# vim: ts=2 sw=2 et:
