summaryrefslogtreecommitdiff
path: root/community/couchdb
diff options
context:
space:
mode:
authorroot <root@rshg054.dnsready.net>2011-12-27 23:14:54 +0000
committerroot <root@rshg054.dnsready.net>2011-12-27 23:14:54 +0000
commitb3288f94e625603d6b5b23740b721287e75eead7 (patch)
treeeff707b86ebe69b25cbd9f7b6549e7d8d76f4e46 /community/couchdb
parent342100843ef3e4379443c526403fac1b1cb6416a (diff)
Tue Dec 27 23:14:54 UTC 2011
Diffstat (limited to 'community/couchdb')
-rw-r--r--community/couchdb/PKGBUILD10
-rw-r--r--community/couchdb/rc-script.patch54
2 files changed, 36 insertions, 28 deletions
diff --git a/community/couchdb/PKGBUILD b/community/couchdb/PKGBUILD
index a9d309c7b..8c405a625 100644
--- a/community/couchdb/PKGBUILD
+++ b/community/couchdb/PKGBUILD
@@ -1,11 +1,11 @@
-# $Id: PKGBUILD 58574 2011-11-15 15:35:36Z spupykin $
+# $Id: PKGBUILD 61260 2011-12-26 21:33:37Z 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.2.0
-pkgrel=1git20111115
+pkgrel=2git20111115
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"
@@ -21,7 +21,7 @@ backup=('etc/couchdb/local.ini'
source=("http://arch.p5n.pp.ru/~sergej/dl/apache-couchdb-$pkgver.git20111115.tar.gz"
"rc-script.patch")
md5sums=('b4236a36a473e3a1c81e7548de194c47'
- '559b5e1483c3fb3e4327a9c58181a46c')
+ '8a3b1a1ff98a6411827ad991db7a355b')
build() {
cd "$srcdir/apache-$pkgname-$pkgver"
@@ -30,14 +30,14 @@ build() {
sed -i 's|-ljs|-lmozjs185|' configure
[ -f Makefile ] || ./configure --prefix=/usr --sysconfdir=/etc --localstatedir=/var
make
- patch etc/init/couchdb <$srcdir/rc-script.patch
+ patch -R etc/init/couchdb <$srcdir/rc-script.patch
}
package() {
cd "$srcdir/apache-$pkgname-$pkgver"
make DESTDIR="$pkgdir" install
- install -Dm755 etc/default/couchdb $pkgdir/etc/conf.d/couchdb
+ install -Dm644 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
diff --git a/community/couchdb/rc-script.patch b/community/couchdb/rc-script.patch
index ef7be39df..1dd723ffc 100644
--- a/community/couchdb/rc-script.patch
+++ b/community/couchdb/rc-script.patch
@@ -1,40 +1,40 @@
---- couchdb.orig 2011-11-15 19:06:16.000000000 +0400
-+++ couchdb 2011-11-15 19:08:24.000000000 +0400
-@@ -1,4 +1,6 @@
--#!/bin/sh -e
-+#!/bin/bash
-+. /etc/rc.conf
-+. /etc/rc.d/functions
+--- couchdb 2011-12-27 01:21:59.000000000 +0400
++++ couchdb.my 2011-12-27 01:21:18.000000000 +0400
+@@ -1,6 +1,4 @@
+-#!/bin/bash
+-. /etc/rc.conf
+-. /etc/rc.d/functions
++#!/bin/sh -e
# Licensed under the Apache License, Version 2.0 (the "License"); you may not
# use this file except in compliance with the License. You may obtain a copy of
-@@ -29,7 +31,7 @@
+@@ -31,7 +29,7 @@
NAME=couchdb
SCRIPT_NAME=`basename $0`
COUCHDB=/usr/bin/couchdb
--CONFIGURATION_FILE=/etc/default/couchdb
-+CONFIGURATION_FILE=/etc/conf.d/couchdb
+-CONFIGURATION_FILE=/etc/conf.d/couchdb
++CONFIGURATION_FILE=/etc/default/couchdb
RUN_DIR=/var/run/couchdb
LSB_LIBRARY=/lib/lsb/init-functions
-@@ -42,16 +44,14 @@
+@@ -44,14 +42,16 @@
fi
log_daemon_msg () {
-- # Dummy function to be replaced by LSB library.
--
-- echo $@
-+ stat_busy $@
+- stat_busy $@
++ # Dummy function to be replaced by LSB library.
++
++ echo $@
}
log_end_msg () {
-- # Dummy function to be replaced by LSB library.
--
++ # Dummy function to be replaced by LSB library.
++
if test "$1" != "0"; then
-- echo "Error with $DESCRIPTION: $NAME"
-+ stat_fail
-+ else
-+ stat_done
+- stat_fail
+- else
+- stat_done
++ echo "Error with $DESCRIPTION: $NAME"
fi
return $1
}
@@ -42,8 +42,16 @@
command="$command $COUCHDB_OPTIONS"
fi
if test -n "$COUCHDB_USER"; then
-- if su $COUCHDB_USER -c "$command"; then
-+ if su $COUCHDB_USER -s /bin/bash -c "$command"; then
+- if su $COUCHDB_USER -s /bin/bash -c "$command"; then
++ if su $COUCHDB_USER -c "$command"; then
return $SCRIPT_OK
else
return $SCRIPT_ERROR
+@@ -84,7 +84,6 @@
+ # Start Apache CouchDB as a background process.
+
+ mkdir -p "$RUN_DIR"
+- chown -R $COUCHDB_USER "$RUN_DIR"
+ command="$COUCHDB -b"
+ if test -n "$COUCHDB_STDOUT_FILE"; then
+ command="$command -o $COUCHDB_STDOUT_FILE"