# Contributor (Arch): Weirch Sodora <sodora@gmail.com>
# Maintainer: Parabola GNU / Linux-libre Aurelien Desbrieres <aurelien@cwb.IO>
# Contributor: Márcio Silva <coadde@hyperbola.info>

pkgname=perl-iptables-chainmgr
pkgver=1.5
pkgrel=1
pkgdesc="IPTables::ChainMgr - Perl extension for manipulating iptables and ip6tables policies"
arch=('i686' 'x86_64')
url="http://search.cpan.org/~mrash/IPTables-ChainMgr/lib/IPTables/ChainMgr.pm"
license=('Artistic2.0')
depends=('perl' 'iptables' 'perl-iptables-parse>=0.9' 'perl-netaddr-ip>=4.0')
options=('!emptydirs')
source=(http://search.cpan.org/CPAN/authors/id/M/MR/MRASH/IPTables-ChainMgr-$pkgver.tar.gz)
md5sums=('21847466a9e83e3bdfd4ee2263dd6517')

build() {
  cd  $srcdir/IPTables-ChainMgr-$pkgver
  PERL_MM_USE_DEFAULT=1 perl Makefile.PL INSTALLDIRS=vendor || return 1 
  make || return 1
}

package() {
  cd  $srcdir/IPTables-ChainMgr-$pkgver
  make install DESTDIR=$pkgdir || return 1
  find $pkgdir -name '.packlist' -delete
  find $pkgdir -name '*.pod' -delete
}
