summaryrefslogtreecommitdiff
path: root/community/couchdb/PKGBUILD
diff options
context:
space:
mode:
Diffstat (limited to 'community/couchdb/PKGBUILD')
-rw-r--r--community/couchdb/PKGBUILD40
1 files changed, 40 insertions, 0 deletions
diff --git a/community/couchdb/PKGBUILD b/community/couchdb/PKGBUILD
new file mode 100644
index 000000000..f67905866
--- /dev/null
+++ b/community/couchdb/PKGBUILD
@@ -0,0 +1,40 @@
+# $Id: PKGBUILD 44051 2011-04-01 20:08:22Z spupykin $
+# Maintainer: Sergej Pupykin <pupykin.s+arch@gmail.com>
+# Contributor: Vitaliy Berdinskikh ur6lad[at]i.ua
+# Previous Contributor: Michael Fellinger <m.fellinger@gmail.com>
+
+pkgname=couchdb
+pkgver=1.0.2
+pkgrel=2
+pkgdesc="A document-oriented database that can be queried and indexed in a MapReduce fashion using JSON"
+arch=('i686' 'x86_64')
+url="http://couchdb.apache.org"
+license=('APACHE')
+depends=('icu' 'erlang' 'spidermonkey' 'openssl' 'curl')
+makedepends=('gcc')
+install=couchdb.install
+options=('!libtool')
+backup=('etc/couchdb/local.ini'
+ 'etc/conf.d/couchdb'
+ 'etc/logrotate.d/couchdb')
+source=("http://www.apache.org/dist/$pkgname/$pkgver/apache-$pkgname-$pkgver.tar.gz"
+ "rc-script.patch")
+md5sums=('7ffbbe0f23f672181c89923c9f7a1de1'
+ 'e9b5595338efbdc1a5db13284a296612')
+
+build() {
+ cd "$srcdir/apache-$pkgname-$pkgver"
+
+ ./configure --prefix=/usr --sysconfdir=/etc --localstatedir=/var
+ make
+ patch etc/init/couchdb <$srcdir/rc-script.patch
+ make DESTDIR="$pkgdir" install
+
+ install -Dm755 etc/default/couchdb $pkgdir/etc/conf.d/couchdb
+ sed -i 's|\(CONFIGURATION_FILE=/etc/\)default\(/couchdb\)|\1conf.d\2|' $pkgdir/etc/rc.d/couchdb
+ sed -i 's|\(COUCHDB_OPTIONS=\)|\1"-p /var/run/couchdb/couchdb.pid"|' $pkgdir/etc/conf.d/couchdb
+ sed -i 's|$COUCHDB -s|$COUCHDB $COUCHDB_OPTIONS -s|' $pkgdir/etc/rc.d/couchdb
+ sed -i 's|su $COUCHDB_USER -c|su $COUCHDB_USER -s /bin/bash -c|' $pkgdir/etc/rc.d/couchdb
+
+ rm -rf $pkgdir/etc/default/ $pkgdir/var/run
+}