summaryrefslogtreecommitdiffstats
path: root/abs/core/perl_modules/perl-dbd-sqlite/PKGBUILD
blob: b8137e296c79d923a803cd902e0d58d9148b1d81 (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
# $Id$
# Maintainer: Felix Yan <felixonmars@archlinux.org>

pkgname=perl-dbd-sqlite
pkgver=1.58
pkgrel=1
pkgdesc="Self-contained RDBMS in a DBI driver"
arch=('x86_64')
url="http://search.cpan.org/dist/DBD-SQLite"
license=('GPL' 'PerlArtistic')
depends=('perl-dbi' 'sqlite')
source=(http://www.cpan.org/authors/id/I/IS/ISHIGAKI/DBD-SQLite-${pkgver}.tar.gz)
sha512sums=('080d1e304fb0d43926ce0345df3367132c317ba113bdc11952c0a159bc68d988a024828a28e66be267f82e07731dee225723854fb80914ba7c476b27dbdeb212')

build() {
  cd DBD-SQLite-${pkgver}
  perl Makefile.PL INSTALLDIRS=vendor
  make
}

check() {
  cd DBD-SQLite-${pkgver}
  make test
}

package() {
  cd DBD-SQLite-${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;
}