summaryrefslogtreecommitdiffstats
path: root/abs/core/perl_modules/perl-datetime/PKGBUILD
blob: e8d48953e48c2ba0851474e03e4ef22855ee28d2 (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: Sergej Pupykin <pupykin.s+arch@gmail.com>
# Contributor: François Charette <firmicus ατ gmx δοτ net>

pkgname=perl-datetime
pkgver=1.48
pkgrel=1
pkgdesc="A complete, easy to use date and time object"
arch=('x86_64')
url="http://search.cpan.org/dist/DateTime"
license=('GPL' 'PerlArtistic')
depends=('perl-datetime-timezone>=0.59' 'perl-datetime-locale>=0.41'
	 'perl-params-validate>=0.76' 'perl-math-round'
	 'perl-namespace-autoclean' 'perl-specio' 'perl-eval-closure'
	 'perl-params-validationcompiler')
makedepends=('perl-module-build')
LC_NUMERIC=C
provides=("perl-datetime=`printf %.4f $pkgver`")
options=('!emptydirs')
source=(https://www.cpan.org/CPAN/authors/id/D/DR/DROLSKY/DateTime-$pkgver.tar.gz)
sha256sums=('5005446eabed6ac96c93e40d284987f0fd1bbfd41a1a7dd5e2abe646dfd68c3e')

build() {
  cd  "$srcdir"/DateTime-$pkgver
  PERL_MM_USE_DEFAULT=1 perl Makefile.PL INSTALLDIRS=vendor 
  make
}
package() {
  cd  "$srcdir"/DateTime-$pkgver
  make install DESTDIR="$pkgdir"
  find "$pkgdir" -name '.packlist' -delete
  find "$pkgdir" -name '*.pod' -delete
# 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;
}