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

pkgname=perl-dbd-pg
pkgver=3.20.0
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=('e07d95f4b69c689ca5091a6758e556ab79d7ac2c7029a48531102b6bdf00c1fb1c2f1d97e39584929625a88072d285f1e59062e94256da2ee6e183276fa3f189')

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"
}
