# Contributor: Carlo Landmeter <clandmeter@gmail.com>
# Maintainer: Francesco Colista <fcolista@alpinelinux.org>
pkgname=perl-lingua-preferred
pkgver=0.2.4
pkgrel=1
pkgdesc="Pick a language based on user's preferences"
url="http://search.cpan.org/dist/Lingua-Preferred"
arch="noarch"
license="GPL"
depends_dev="perl-dev"
makedepends="$depends_dev"
subpackages="$pkgname-doc"
source="http://www.cpan.org/authors/id/E/ED/EDAVIS/Lingua-Preferred-$pkgver.tar.gz"

builddir="$srcdir/Lingua-Preferred-$pkgver"

build() {
	cd "$builddir"
	PERL_MM_USE_DEFAULT=1 perl Makefile.PL INSTALLDIRS=vendor
	make
}

check() {
        cd "$builddir"
        make test
}

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

sha512sums="6946b2b8d5978c516688a63bd2126700f8ab0137d51959f0b8c2565c08f25d20dc3fe5f81c6473c3ef5d1faf94a6bd4510959f730cc104b61671bd9436de6353  Lingua-Preferred-0.2.4.tar.gz"
