desktop/perl-template-toolkit/PKGBUILD
2018-07-30 22:29:15 +02:00

37 lines
970 B
Bash

pkgname=perl-template-toolkit
pkgver=2.27
pkgrel=1
pkgdesc="Perl template processing system"
arch=('x86_64')
url="http://search.cpan.org/dist/Template-Toolkit/"
license=('PerlArtistic')
depends=('perl-appconfig' 'perl')
options=('!emptydirs')
source=(http://search.cpan.org/CPAN/authors/id/A/AB/ABW/Template-Toolkit-$pkgver.tar.gz)
md5sums=('a7fae5d4fe5918f33105d92a62134067')
build() {
cd Template-Toolkit-$pkgver
perl Makefile.PL INSTALLDIRS=vendor TT_ACCEPT=y
make
}
check() {
cd Template-Toolkit-$pkgver
make test
}
package() {
cd Template-Toolkit-$pkgver
make install DESTDIR="${pkgdir}"
# template start; name=perl-binary-module-dependency; version=1;
if [[ $(find "$pkgdir/usr/lib/perl5/" -name "*.so") ]]; then
_perlver_min=$(perl -e '$v = $^V->{version}; print $v->[0].".".($v->[1]);')
_perlver_max=$(perl -e '$v = $^V->{version}; print $v->[0].".".($v->[1]+1);')
depends+=("perl>=$_perlver_min" "perl<$_perlver_max")
fi
# template end;
}