# Maintainer: Maxime Gauduin <alucryd@archlinux.org>
# Contributor: unikum <unikum.pm@gmail.com>
# Contributor: speed145a <jonathan@tagchapter.com>

pkgname=firewalld
pkgver=0.7.1
pkgrel=2
pkgdesc='Firewall daemon with D-Bus interface'
arch=(any)
url=https://firewalld.org/
license=(GPL2)
depends=(
  dconf
  glib2
  hicolor-icon-theme
  nftables
  python-decorator
  python-gobject
  python-slip
)
makedepends=(
  docbook-xsl
  ebtables
  git
  intltool
  ipset
  iptables
)
optdepends=(
  'bash-completion: bash completion'
  'ebtables: old backend'
  'gtk3: firewall-config'
  'ipset: old backend'
  'iptables: old backend'
  'libnotify: firewall-applet'
  'nm-connection-editor: firewalld-applet'
  'python-pyqt5: firewall-applet'
)
backup=(
  etc/conf.d/firewalld
  etc/firewalld/firewalld.conf
)
source=(
  git+https://github.com/firewalld/firewalld.git#tag=v${pkgver}
  firewalld-sysconfigdir.patch
)
sha256sums=('SKIP'
            'cf7d655230c43acf10a0f97dffdbcba136729967c8b9a25a930871d54a589834')

prepare() {
  cd firewalld

  patch -Np1 -i ../firewalld-sysconfigdir.patch

  NOCONFIGURE=true ./autogen.sh
}

build() {
  cd firewalld

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

package() {
  make DESTDIR="${pkgdir}" -C firewalld install
}

# vim: ts=2 sw=2 et:
