diff options
author | root <root@rshg047.dnsready.net> | 2011-07-07 04:59:01 +0000 |
---|---|---|
committer | root <root@rshg047.dnsready.net> | 2011-07-07 04:59:01 +0000 |
commit | 75b1bc45a0e39074e42b6a26a9f72ac2e049bdc1 (patch) | |
tree | 9bd2c1fbe4c9a0fd5ede1a5667137113d48d2c69 /community/python-bsddb/PKGBUILD | |
parent | a135f8563fea25509d9a92db7c03ac3d08230a3f (diff) |
Thu Jul 7 04:59:01 UTC 2011
Diffstat (limited to 'community/python-bsddb/PKGBUILD')
-rw-r--r-- | community/python-bsddb/PKGBUILD | 59 |
1 files changed, 46 insertions, 13 deletions
diff --git a/community/python-bsddb/PKGBUILD b/community/python-bsddb/PKGBUILD index 84b7c181a..578d0921d 100644 --- a/community/python-bsddb/PKGBUILD +++ b/community/python-bsddb/PKGBUILD @@ -1,29 +1,62 @@ -# $Id: PKGBUILD 40159 2011-02-21 14:49:30Z stephane $ +# $Id: PKGBUILD 50695 2011-06-29 15:25:25Z stephane $ # Maintainer: Kaiting Chen <kaitocracy@gmail.com> +# Contributor: Stéphane Gaudreault <stephane@archlinux.org> # Contributor: Douglas Soares de Andrade <dsandrade@gmail.com> # Contributor: William Rea <sillywilly@gmail.com> -pkgname=python-bsddb -pkgver=5.1.0 -pkgrel=3 +pkgbase=python-bsddb +pkgname=('python2-bsddb' 'python-bsddb') +_hgrel=600 +pkgver=5.1.2.${_hgrel} +pkgrel=1 pkgdesc="Python interface for BerkeleyDB" license=('MIT') arch=('i686' 'x86_64') url="http://www.jcea.es/programacion/pybsddb.htm" -depends=('db' 'python') -source=("http://pypi.python.org/packages/source/b/bsddb3/bsddb3-${pkgver}.tar.gz" +makedepends=('python2-distribute' 'python-distribute' 'mercurial') +source=("ftp://ftp.archlinux.org/other/community/${pkgbase}/${pkgbase}-${pkgver}.src.tar.xz" 'LICENSE') -md5sums=('6d72d2533f0f3a4bb4b1207598624d6a' - 'f412b3fb37739f1c4be64c1e7a5dee67') +sha1sums=('50e7b4c9c11b06c6d871dd93af1cc228687a0227' + 'ef4e4caf618781104dbf5824279ed39d127b4713') + +# source PKGBUILD && mksource +mksource() { + _hgroot="http://hg.jcea.es/pybsddb/" + _hgrepo=pybsddb + [ -d "${_hgrepo}" ] && hg pull -u -r ${_hgrel} || hg clone ${_hgroot} -r ${_hgrel} + + _dirname=${pkgbase}-${pkgver} + mv ${_hgrepo} ${_dirname} + tar -cJvf ${_dirname}.src.tar.xz ${_dirname} + rm -fr ${_dirname} +} build () { - cd ${srcdir}/bsddb3-${pkgver} + cd "${srcdir}" + + cp -r ${pkgbase}-${pkgver}{,-python2} + + # Build python 3 module + cd ${pkgbase}-${pkgver} python setup.py --berkeley-db=/usr build + + # Build python 2 module + cd ../${pkgbase}-${pkgver}-python2 + python2 setup.py --berkeley-db=/usr build +} + +package_python2-bsddb() { + depends=('db' 'python2>=2.7') + cd "${srcdir}/${pkgbase}-${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() { - cd ${srcdir}/bsddb3-${pkgver} - python setup.py --berkeley-db=/usr install --root=${pkgdir} --optimize=1 +package_python-bsddb() { + depends=('db' 'python>=3.2') + cd "${srcdir}/${pkgbase}-${pkgver}" - install -Dm644 ${srcdir}/LICENSE ${pkgdir}/usr/share/licenses/${pkgname}/LICENSE + python setup.py --berkeley-db=/usr install --root="${pkgdir}" --skip-build --optimize=1 + install -Dm644 "${srcdir}"/LICENSE "${pkgdir}"/usr/share/licenses/${pkgname}/LICENSE } |