# Maintainer: Developer <dev@opalos.org>
# Maintainer: Developer <dev@opalos.org>

pkgname=perl-clone
pkgver=%version%
pkgrel=%release%
pkgdesc='Recursive copy of nested objects.'
arch=('x86_64')
url='https://github.com/garu/Clone'
license=('GPL' 'PerlArtistic')
depends=('perl')
checkdepends=('perl-b-cow')
options=('!emptydirs')
source=("https://cpan.metacpan.org/authors/id/G/GA/GARU/Clone-$pkgver.tar.gz")
sha512sums=('f8bb1010364e94c7cc8bba25681cd9fd737ec2935a8be960ac53099359729fc679190a115dd082fccd239b35762dee2b3be3adbddce37e4ceae6fe934fbad545')

build() {
  cd Clone-$pkgver
  PERL_MM_USE_DEFAULT=1 perl Makefile.PL INSTALLDIRS=vendor
  make
}

check() {
  cd Clone-$pkgver
  make test
}

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