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

pkgname=perl-authen-radius
pkgver=0.32
pkgrel=3
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' 'perl-net-ip')
options=('!emptydirs')
source=(https://search.cpan.org/CPAN/authors/id/P/PO/PORTAONE/Authen-Radius-$pkgver.tar.gz
	undef-warn-fix.patch)
sha256sums=('7b208f9837c83a184267254892536587eed0bdde49e7bedeba3d72a665231740'
            '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
}
