makedepends=(libmnl libnftnl)

description="The principal firewall tool for Linux."
url="http://www.iptables.org/"

packager="Grat-OS Team"
maintainer="Grat-OS Team"

name=iptables
version=1.8.11
release=3

grat_os_version=1.0-RC1

source=(https://www.netfilter.org/projects/iptables/files/$name-$version.tar.xz
        https://repo.grat-os.fr/files/grat-os-${grat_os_version}.tar.xz)

build() {
  cd $name-$version

  ./configure --prefix=/usr \
              --with-pkgconfigdir=/usr/lib/pkgconfig \
              --enable-libipq \
              --enable-devel

  make
  make DESTDIR=$PKG SHELL=/usr/bin/bash install

  # service
  cd ../grat-os-${grat_os_version}
  make DESTDIR=$PKG SHELL=/usr/bin/bash install-$name
}
