# Maintainer: Angel Velasquez <angvp@archlinux.org>
# Contributor: Angel Velasquez <angvp@archlinux.org>
# Generator  : CPANPLUS::Dist::Arch 1.12

pkgname='perl-linux-pid'
pkgver=0.04
pkgrel=20
pkgdesc="Interface to Linux getpp?id functions"
arch=('x86_64')
license=('PerlArtistic' 'GPL')
options=('!emptydirs')
depends=('perl')
url='https://search.cpan.org/dist/Linux-Pid'
source=("https://search.cpan.org/CPAN/authors/id/R/RG/RGARCIA/Linux-Pid-$pkgver.tar.gz")
sha512sums=('b28418285f6e75e87d23b6eae2b5bcd300ba68248b10a0fc8ba38e8e4c09a3053076e591357263caf43dc09958bceea02680f420bb92ed05ce243a36b1e42c09')
b2sums=('80bb80648e1e28afc525b0466095aa7006c6361e64452a817be7ba5a97610900ec566c518afc2f52b8f20e06ac862aae4da619dba5a95f206f3cad76644603b2')

build() {
  cd "Linux-Pid-$pkgver"

  (
    export PERL_MM_USE_DEFAULT=1 PERL5LIB="" \
        PERL_AUTOINSTALL=--skipdeps \
        PERL_MM_OPT="INSTALLDIRS=vendor" \
        PERL_MB_OPT="--installdirs vendor" \
        MODULEBUILDRC=/dev/null

    /usr/bin/perl Makefile.PL
    make
  )
}

check() {
  cd "Linux-Pid-$pkgver"
  PERL_MM_USE_DEFAULT=1 PERL5LIB="" make test
}

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