# Contributor: Weirch Sodora <sodora@gmail.com>
# Maintainer: Aurélien Desbrières <aurelien@cwb.io>
# Contributor: Márcio Silva <coadde@hyperbola.info>

pkgname=perl-iptables-parse
pkgver=1.6.1
pkgrel=1
pkgdesc="IPTables::Parse - Perl extension for parsing iptables and ip6tables firewall rulesets"
arch=('i686' 'x86_64')
url="http://search.cpan.org/~mrash/IPTables-Parse/lib/IPTables/Parse.pm"
license=('Artistic2.0')
depends=('perl' 'iptables')
options=('!emptydirs')
source=(http://search.cpan.org/CPAN/authors/id/M/MR/MRASH/IPTables-Parse-$pkgver.tar.gz)
md5sums=('72299f0ab6e10a51837a48d51728a6f7')

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

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