# Maintainer: Sergej Pupykin <pupykin.s+arch@gmail.com>

pkgname=perl-authen-radius
pkgver=0.27
pkgrel=2
pkgdesc="perl radius client"
arch=('any')
url="https://search.cpan.org/dist/Authen-Radius/"
#url="https://search.cpan.org/dist/RadiusPerl"
license=('GPL' 'PerlArtistic')
depends=('perl-data-hexdump>=0.02')
options=('!emptydirs')
source=(https://search.cpan.org/CPAN/authors/id/P/PO/PORTAONE/Authen-Radius-$pkgver.tar.gz
	undef-warn-fix.patch)
sha256sums=('e5a3052fe46dc38424c1947da92e623e8996216f97bd7be72221eb6c5f7c09f8'
            '61357e54d3d6e9e609aebd3dcd22ea84fb49bce336fff87b2926ceccffc73bed')

prepare() {
  cd  "$srcdir"/Authen-Radius-$pkgver
#  patch -p1 <"$srcdir"/undef-warn-fix.patch
}

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

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