summaryrefslogtreecommitdiff
path: root/community/python-bsddb
diff options
context:
space:
mode:
authorroot <root@rshg054.dnsready.net>2013-08-13 01:33:19 -0700
committerroot <root@rshg054.dnsready.net>2013-08-13 01:33:19 -0700
commit7a65a910b77ad191d69881098c47f9b0c852d92e (patch)
tree9564e611af1442f8952a8cbddb3b0ad25ed71aab /community/python-bsddb
parent60da6abff6c9577a783d72865f11de7a585e912e (diff)
Tue Aug 13 01:31:08 PDT 2013
Diffstat (limited to 'community/python-bsddb')
-rw-r--r--community/python-bsddb/LICENSE19
-rw-r--r--community/python-bsddb/PKGBUILD51
2 files changed, 70 insertions, 0 deletions
diff --git a/community/python-bsddb/LICENSE b/community/python-bsddb/LICENSE
new file mode 100644
index 000000000..7d6035775
--- /dev/null
+++ b/community/python-bsddb/LICENSE
@@ -0,0 +1,19 @@
+Copyright (c) 2008-2009 Jesus Cea Avion
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+THE SOFTWARE. \ No newline at end of file
diff --git a/community/python-bsddb/PKGBUILD b/community/python-bsddb/PKGBUILD
new file mode 100644
index 000000000..437976a45
--- /dev/null
+++ b/community/python-bsddb/PKGBUILD
@@ -0,0 +1,51 @@
+# $Id: PKGBUILD 95395 2013-08-10 22:18:43Z eric $
+# Maintainer: Kaiting Chen <kaitocracy@gmail.com>
+# Maintainer: Stéphane Gaudreault <stephane@archlinux.org>
+# Contributor: Douglas Soares de Andrade <dsandrade@gmail.com>
+# Contributor: William Rea <sillywilly@gmail.com>
+
+pkgbase=python-bsddb
+pkgname=('python2-bsddb' 'python-bsddb')
+pkgver=6.0.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=('ca5c204b2c9cf4fff396ba3d49994fe1a95d669f'
+ '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
+}