# Maintainer: Felix Yan <felixonmars@archlinux.org>
# CPAN Name  : Net-OAuth
# Contributor: Anonymous
# Generator  : CPANPLUS::Dist::Arch 1.28

pkgname=perl-net-oauth
pkgver=0.31
pkgrel=3
pkgdesc="An implementation of the OAuth protocol"
arch=('any')
license=('PerlArtistic' 'GPL')
options=('!emptydirs')
depends=('perl-class-accessor' 'perl-class-data-inheritable' 'perl-uri' 'perl-libwww')
makedepends=('perl-module-build')
checkdepends=('perl-test-warn')
url='https://search.cpan.org/dist/Net-OAuth'
source=("https://search.cpan.org/CPAN/authors/id/R/RR/RRWO/Net-OAuth-$pkgver.tar.gz")
sha512sums=('0514a21acc4d7480c67b53e3b31c5e1c4a6d764fa6643f7d5a195e43dddb7ffa88ed087e4a030c6ba1e57976b7fbe31d03c91a4dfc1fe7247ee9a50c2edd938b')

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

check() {
  cd "$srcdir/Net-OAuth-$pkgver"
  PERL_MM_USE_DEFAULT=1
  make test
}

package() {
  cd "$srcdir/Net-OAuth-$pkgver"
  make install DESTDIR="$pkgdir"
  find "$pkgdir" -name '.packlist' -o -name '*.pod' -delete
}
