# Maintainer: Sergej Pupykin <pupykin.s+arch@gmail.com>
# Contributor: François Charette <firmicus ατ gmx δοτ net>

pkgname=perl-dbd-pg
pkgver=3.8.1
pkgrel=1
pkgdesc="Postgres Driver for DBI"
arch=('x86_64')
url="https://search.cpan.org/dist/DBD-Pg"
license=('GPL' 'PerlArtistic')
depends=('perl-dbi>=1.52' 'postgresql-libs')
options=('!emptydirs')
source=("https://www.cpan.org/authors/id/T/TU/TURNSTEP/DBD-Pg-${pkgver}.tar.gz")
sha256sums=('dbf11dda7eca72a9f0d59c0ae7a2ca3a16b8abd6b7184adf210d651f2706bec9')

build() {
  cd  DBD-Pg-${pkgver}
  PERL_MM_USE_DEFAULT=1 perl Makefile.PL INSTALLDIRS=vendor
  make
}

package() {
  cd  DBD-Pg-${pkgver}
  make install DESTDIR="$pkgdir"
  find "$pkgdir" -name '.packlist' -delete
  find "$pkgdir" -name '*.pod' -delete
}
