# $Id: PKGBUILD 106305 2014-02-27 10:21:41Z spupykin $ # Maintainer: Kaiting Chen # Maintainer: Stéphane Gaudreault # Contributor: Douglas Soares de Andrade # Contributor: William Rea pkgbase=python-bsddb pkgname=('python2-bsddb' 'python-bsddb') pkgver=6.0.1 pkgrel=1 pkgdesc="Python interface for BerkeleyDB" license=('MIT') arch=('i686' 'x86_64') url="http://www.jcea.es/programacion/pybsddb.htm" makedepends=('python2-setuptools' 'python-setuptools') source=(http://pypi.python.org/packages/source/b/bsddb3/bsddb3-${pkgver}.tar.gz LICENSE) sha1sums=('ca5c204b2c9cf4fff396ba3d49994fe1a95d669f' 'ef4e4caf618781104dbf5824279ed39d127b4713') sha1sums=('c12e47f7c21b4bc586c68cce64e0079d070312e8' 'ef4e4caf618781104dbf5824279ed39d127b4713') prepare() { cp -r bsddb3-${pkgver}{,-python2} } build () { # Build python 3 module cd bsddb3-${pkgver} python3 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 bsddb3-${pkgver}-python2 python2 setup.py --berkeley-db=/usr install --root="${pkgdir}" --skip-build --optimize=1 sed -i 's|/usr/bin/env python|/usr/bin/env python2|' \ "${pkgdir}"/usr/lib/python2.7/site-packages/bsddb3/{dbshelve.py,tests/test_dbtables.py} install -Dm644 "${srcdir}"/LICENSE "${pkgdir}"/usr/share/licenses/${pkgname}/LICENSE } package_python-bsddb() { depends=('db' 'python>=3.3') cd bsddb3-${pkgver} python3 setup.py --berkeley-db=/usr install --root="${pkgdir}" --skip-build --optimize=1 install -Dm644 "${srcdir}"/LICENSE "${pkgdir}"/usr/share/licenses/${pkgname}/LICENSE }