[arch-commits] Commit in (4 files)
Felix Yan
fyan at archlinux.org
Thu Oct 2 15:53:03 UTC 2014
Date: Thursday, October 2, 2014 @ 17:53:03
Author: fyan
Revision: 120066
addpkg: python-couchdb 0.10-1
Added:
python-couchdb/
python-couchdb/repos/
python-couchdb/trunk/
python-couchdb/trunk/PKGBUILD
----------+
PKGBUILD | 84 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
1 file changed, 84 insertions(+)
Added: python-couchdb/trunk/PKGBUILD
===================================================================
--- python-couchdb/trunk/PKGBUILD (rev 0)
+++ python-couchdb/trunk/PKGBUILD 2014-10-02 15:53:03 UTC (rev 120066)
@@ -0,0 +1,84 @@
+# $Id$
+# Maintainer: Felix Yan <felixonmars at archlinux.org>
+# Contributor: Aaron DeVore <aaron.devore at gmail.com>
+# Contributor: Byron Clark <byron at theclarkfamily.name>
+# Contributor: Guan 'kuno' Qing <neokuno AT gmail DOT com>
+
+pkgbase=python-couchdb
+pkgname=(python-couchdb python2-couchdb)
+pkgver=0.10
+pkgrel=1
+pkgdesc="Python library for working with CouchDB"
+url="http://code.google.com/p/couchdb-python/"
+license=('BSD')
+arch=('any')
+makedepends=('python-setuptools' 'python2-setuptools' 'couchdb')
+source=(http://pypi.python.org/packages/source/C/CouchDB/CouchDB-$pkgver.tar.gz)
+md5sums=('8b9b3a3cbea664a1758ff4d00b9d156f')
+
+prepare() {
+ cp -a CouchDB-$pkgver{,-py2}
+
+ cd "$srcdir/CouchDB-$pkgver-py2"
+ sed -i 's/python /python2 /' Makefile
+ find . -name "*.py" -exec \
+ sed -i '1s|env python$|env python2|' {} \;
+}
+
+build() {
+ cd "$srcdir/CouchDB-$pkgver"
+ python setup.py build
+
+ cd "$srcdir/CouchDB-$pkgver-py2"
+ python2 setup.py build
+}
+
+check() {
+ mkdir "$srcdir/tmp_couchdb"
+ cat > "$srcdir/tmp_couchdb.conf" << EOF
+[couchdb]
+database_dir = "$srcdir/tmp_couchdb"
+view_index_dir = "$srcdir/tmp_couchdb"
+uri_file = "$srcdir/tmp_couchdb.uri"
+[log]
+file = "$srcdir/tmp_couchdb.log"
+EOF
+
+ couchdb -a "$srcdir/tmp_couchdb.conf" &
+ _COUCHDB_PID=$!
+ sleep 3;
+
+ cd "$srcdir/CouchDB-$pkgver"
+ python setup.py test || warning "python 3 tests failed"
+
+ cd "$srcdir/CouchDB-$pkgver-py2"
+ python2 setup.py test
+
+ kill $_COUCHDB_PID
+}
+
+package_python-couchdb() {
+ depends=('couchdb' 'python-setuptools')
+
+ cd "$srcdir/CouchDB-$pkgver"
+ python setup.py install --root="$pkgdir" --optimize=1
+
+ install -D -m644 "COPYING" \
+ "$pkgdir/usr/share/licenses/$pkgname/COPYING"
+}
+
+package_python2-couchdb() {
+ depends=('couchdb' 'python2-setuptools')
+
+ cd "$srcdir/CouchDB-$pkgver-py2"
+ python2 setup.py install --root="$pkgdir" --optimize=1
+
+ install -D -m644 "COPYING" \
+ "$pkgdir/usr/share/licenses/$pkgname/COPYING"
+
+ for name in couchdb-dump couchdb-load couchdb-replicate couchpy; do
+ mv "$pkgdir/usr/bin/$name"{,2}
+ done
+}
+
+# vim:ts=2:sw=2:et
Property changes on: python-couchdb/trunk/PKGBUILD
___________________________________________________________________
Added: svn:keywords
## -0,0 +1 ##
+Id
\ No newline at end of property
More information about the arch-commits
mailing list