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

pkgname=perl-dbd-pg
pkgver=3.9.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")
sha512sums=('ef322012d25c46784ef9e25eb332f2fe57c6bc2102a7e7cf2f423ae6d77ec78d338e91f08734a932f46a0bc028e358a6cf84b6b41b5f9723905b240db24582f0')

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
}
