# $Id: PKGBUILD 55744 2011-09-18 22:24:47Z stephane $ # Maintainer: Kaiting Chen # Contributor: Stéphane Gaudreault # Contributor: Douglas Soares de Andrade # Contributor: William Rea pkgbase=python-bsddb pkgname=('python2-bsddb' 'python-bsddb') pkgver=5.2.0 pkgrel=1 pkgdesc="Python interface for BerkeleyDB" license=('MIT') arch=('i686' 'x86_64') url="http://www.jcea.es/programacion/pybsddb.htm" makedepends=('python2-distribute' 'python-distribute') source=(http://pypi.python.org/packages/source/b/bsddb3/bsddb3-${pkgver}.tar.gz LICENSE) sha1sums=('4395c125807fc8c4bac4d367f4556e623605c7a8' 'ef4e4caf618781104dbf5824279ed39d127b4713') build () { cd "${srcdir}" cp -r bsddb3-${pkgver}{,-python2} # Build python 3 module cd bsddb3-${pkgver} python setup.py --berkeley-db=/usr build # Build python 2 module cd ../bsddb3-${pkgver}-python2 python2 setup.py --berkeley-db=/usr build } package_python2-bsddb() { depends=('db' 'python2>=2.7') cd "${srcdir}/bsddb3-${pkgver}-python2" python2 setup.py --berkeley-db=/usr install --root="${pkgdir}" --skip-build --optimize=1 install -Dm644 "${srcdir}"/LICENSE "${pkgdir}"/usr/share/licenses/${pkgname}/LICENSE } package_python-bsddb() { depends=('db' 'python>=3.2') cd "${srcdir}/bsddb3-${pkgver}" python setup.py --berkeley-db=/usr install --root="${pkgdir}" --skip-build --optimize=1 install -Dm644 "${srcdir}"/LICENSE "${pkgdir}"/usr/share/licenses/${pkgname}/LICENSE }