# Maintainer: Alexey Pavlov <alexpux@gmail.com>

_realname=DBI
pkgname=perl-${_realname}
pkgver=1.647
pkgrel=3
pkgdesc="Database independent interface for Perl"
arch=('i686' 'x86_64')
url="https://metacpan.org/dist/DBI"
msys2_references=(
  "cpe: cpe:/a:perl:database_interface"
  "cpe: cpe:/a:perl:dbi"
  'purl: pkg:cpan/HMBRAND/DBI'
)
groups=('perl-modules')
license=('GPL' 'PerlArtistic')
depends=('perl')
makedepends=('perl-devel' 'gcc')
options=('!emptydirs')
source=("https://cpan.metacpan.org/authors/id/H/HM/HMBRAND/${_realname}-${pkgver}.tgz")
sha256sums=('0df16af8e5b3225a68b7b592ab531004ddb35a9682b50300ce50174ad867d9aa')

prepare() {
  cd ${_realname}-${pkgver}
}

build() {
  cd ${_realname}-${pkgver}
  perl Makefile.PL INSTALLDIRS=vendor
  make
}

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

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