# Contributor: A. Wilcox <awilfox@adelielinux.org>
# Maintainer: Síle Ekaterin Liszka <sheila@vulpine.house>
pkgname=perl-class-singleton
_pkgreal=Class-Singleton
_author=SHAY
_au=${_author%%"${_author#??}"}
_a=${_author%%"${_author#?}"}
pkgver=1.6
pkgrel=0
pkgdesc="Perl implementation of a Singleton class pattern"
url="https://metacpan.org/release/Class-Singleton"
arch="noarch"
license="Artistic-1.0-Perl OR GPL-2.0-only"
depends="perl"
makedepends="perl-dev"
subpackages="$pkgname-doc"
source="https://cpan.metacpan.org/authors/id/$_a/$_au/$_author/$_pkgreal-$pkgver.tar.gz"
builddir="$srcdir/$_pkgreal-$pkgver"

build() {
	PERL_MM_USE_DEFAULT=1 perl Makefile.PL INSTALLDIRS=vendor
	make
}

check() {
	make test
}

package() {
	make DESTDIR="$pkgdir" install
	find "$pkgdir" \( -name perllocal.pod -o -name .packlist \) -delete
}

sha512sums="68b637ba57d5da70ac8e7a8a5e1874481681d6a217bb0c58a232d4329c582f32d29b5ac4c60a131bc863c8faf2852c5249bced9d286e87fefe4960e95f35b1ec  Class-Singleton-1.6.tar.gz"