summaryrefslogtreecommitdiff
path: root/community/perl-berkeleydb/PKGBUILD
blob: ce18978bd35ef50759a0529abbf581e75c5cb6e4 (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
# $Id: PKGBUILD 100904 2013-11-13 09:48:52Z spupykin $
# Maintainer: Sergej Pupykin <pupykin.s+arch@gmail.com>
# Maintainer: Charles Mauch <cmauch@gmail.com>
# Contributor: Francois Charette <firmicus@gmx.net>

pkgname=perl-berkeleydb
pkgver=0.54
pkgrel=1
pkgdesc="Interface to Berkeley DB version 2, 3 or 4"
arch=('i686' 'x86_64' 'mips64el')
url="http://search.cpan.org/dist/BerkeleyDB/"
license=('GPL' 'PerlArtistic')
depends=('perl' 'db')
options=('!emptydirs')
source=(http://search.cpan.org/CPAN/authors/id/P/PM/PMQS/BerkeleyDB-$pkgver.tar.gz)
md5sums=('7efc0aaaf6ca4a2a629eadea24d34fad')

build() {
  cd  $srcdir/BerkeleyDB-$pkgver
  PERL_MM_USE_DEFAULT=1 perl Makefile.PL INSTALLDIRS=vendor
  make
}

package() {
  _dbver1=`pacman -Q db | cut -d\  -f2 | cut -d- -f1 | cut -f1 -d.`
  _dbver2=`pacman -Q db | cut -d\  -f2 | cut -d- -f1 | cut -f2 -d.`
  depends=('perl' "db>=${_dbver1}.${_dbver2}" "db<${_dbver1}.$(expr $_dbver2 + 1)")

  cd  $srcdir/BerkeleyDB-$pkgver
  make pure_install doc_install DESTDIR=$pkgdir
  find $pkgdir -name '.packlist' -delete
  find $pkgdir -name '*.pod' -delete
}