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

pkgname=perl-dbd-pg
pkgver=3.20.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=('8174eb9eb7ceae08b700eb19631b1e85ad782b0984bdd59a053dc91e0cee0993bc81afbe5320eadb355966f1b2da77dc58a1fc7988e43c6ba780e955eaa63909')

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

package() {
  cd  DBD-Pg-${pkgver}
  make install DESTDIR="$pkgdir"
}
