# POWER Maintainer: Alexander Baldeck <alex.bldck@gmail.com>
# Maintainer: Felix Yan <felixonmars@archlinux.org>

pkgname=perl-dbi
pkgver=1.645
pkgrel=1
pkgdesc="Database independent interface for Perl"
arch=(x86_64 powerpc64le powerpc64 powerpc riscv64)
url="http://search.cpan.org/dist/DBI/"
license=('GPL' 'PerlArtistic')
depends=('perl')
checkdepends=('perl-test-pod' 'perl-test-pod-coverage')
options=('!emptydirs')
source=("https://www.cpan.org/authors/id/H/HM/HMBRAND/DBI-$pkgver.tgz")
sha512sums=('8e5375150541d44d307f8ed75d3a5993ddb747ebe13e2c8171bc9dc8829405c38134e7236489da9ccb4bb0e915bcb511a9581481bf9924c55d4863050e8c87f0')

build() {
  cd DBI-$pkgver
  perl Makefile.PL INSTALLDIRS=vendor
  sed -E 's|(^OPTIMIZE.*)|\1 -Wno-incompatible-pointer-types|' -i Makefile
  make
}

check() {
  cd DBI-$pkgver
  make test
}

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