summaryrefslogtreecommitdiffstats
path: root/abs/core/perl_modules/perl-template-toolkit/PKGBUILD
blob: 157cad2bd8942531b009a39061d56206d5c4a9fe (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
# $Id$
# Maintainer: Felix Yan <felixonmars@archlinux.org>
# Contributor: Firmicus <francois.archlinux.org>
# Contributor: Tom Killian <tomk@runbox.com>
# Contributor: FJ <joostef@gmail.com>

pkgname=perl-template-toolkit
pkgver=2.26
pkgrel=3
pkgdesc="Perl template processing system"
arch=('i686' '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=('4c289856ebee446ebbe2629b24f0734b')

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;
}