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

_realname=Probe-Perl
pkgname=perl-${_realname}
pkgver=0.03
pkgrel=3
pkgdesc="Information about the currently running perl"
arch=('any')
url="https://metacpan.org/dist/Probe-Perl/"
groups=('perl-modules')
depends=('perl')
license=('PerlArtistic' 'GPL')
options=('!emptydirs')
source=("https://www.cpan.org/authors/id/K/KW/KWILLIAMS/${_realname}-${pkgver}.tar.gz"
        'Probe-Perl-0.01.patch')
sha256sums=('d9e4d21e2e77638559045fa09046b1b6fff6c403b949929db213e30abe8a3c31'
            'c6d4e44f3b023b8acc88ee6055d77fce357e34732d271e2beddd5a8baadd3f15')

prepare() {
  cd "${srcdir}/${_realname}-${pkgver}"
  patch -p1 -i ${srcdir}/Probe-Perl-0.01.patch
}

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

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

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