# Automatically generated by apkbuild-cpan, template 1
# Contributor: Natanael Copa <ncopa@alpinelinux.org>
# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
pkgname=perl-text-wrapper
_pkgreal=Text-Wrapper
pkgver=1.04
pkgrel=0
pkgdesc="Word wrap text by breaking long lines"
url="http://search.cpan.org/dist/Text-Wrapper/"
arch="noarch"
license="GPL PerlArtistic"
cpandepends=""
cpanmakedepends="   "
depends="$cpandepends"
makedepends="perl-dev $cpanmakedepends"
subpackages="$pkgname-doc"
source="http://search.cpan.org/CPAN/authors/id/C/CJ/CJM/$_pkgreal-$pkgver.tar.gz"

_builddir="$srcdir/$_pkgreal-$pkgver"

prepare() {
	cd "$_builddir"
	export CFLAGS=`perl -MConfig -E 'say $Config{ccflags}'`
	PERL_MM_USE_DEFAULT=1 perl Makefile.PL INSTALLDIRS=vendor
}

build() {
	cd "$_builddir"
	export CFLAGS=`perl -MConfig -E 'say $Config{ccflags}'`
	make #&& make test
}

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

md5sums="85744d27f358fdfc3cc4e79fd04a0448  Text-Wrapper-1.04.tar.gz"
sha256sums="084d08e48fa37c8e75c9a724e55f7415e54ffa8ec63918ef7aec3494352d571b  Text-Wrapper-1.04.tar.gz"
sha512sums="e3bd9db890bb93136cf7ea8662b50052fee63dc02d47f830628395fa57b589c02ff4e6af70238fcffb9bfb77da02168a46e828e1a61e6b26ed8c660099d72b13  Text-Wrapper-1.04.tar.gz"
