summaryrefslogtreecommitdiff
path: root/~xihh/couchdb-git/PKGBUILD
diff options
context:
space:
mode:
Diffstat (limited to '~xihh/couchdb-git/PKGBUILD')
-rw-r--r--~xihh/couchdb-git/PKGBUILD64
1 files changed, 64 insertions, 0 deletions
diff --git a/~xihh/couchdb-git/PKGBUILD b/~xihh/couchdb-git/PKGBUILD
new file mode 100644
index 000000000..91bb85cbf
--- /dev/null
+++ b/~xihh/couchdb-git/PKGBUILD
@@ -0,0 +1,64 @@
+# $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-git
+pkgver=$(date -u +%Y%m%d)
+pkgrel=2
+pkgdesc="A document-oriented database that can be queried and indexed in a MapReduce fashion using JSON"
+arch=('i686' 'x86_64' 'mips64el')
+url="http://couchdb.apache.org"
+license=('APACHE')
+depends=('icu' 'erlang' 'js' 'openssl' 'curl')
+makedepends=('gcc' 'git')
+install=couchdb.install
+options=('!libtool')
+backup=('etc/couchdb/local.ini'
+ 'etc/conf.d/couchdb'
+ 'etc/logrotate.d/couchdb')
+source=("rc-script.patch")
+md5sums=('8a3b1a1ff98a6411827ad991db7a355b')
+
+_gitroot=git://github.com/apache/couchdb.git
+_gitname=couchdb-git
+
+build() {
+ cd "$srcdir"
+ msg "Connecting to GIT server...."
+
+ if [[ -d "$_gitname" ]]; then
+ cd "$_gitname" && git pull origin
+ msg "The local files are updated."
+ else
+ git clone "$_gitroot" "$_gitname"
+ fi
+
+ msg "GIT checkout done or server timeout"
+ msg "Starting build..."
+
+ rm -rf "$srcdir/$_gitname-build"
+ git clone "$srcdir/$_gitname" "$srcdir/$_gitname-build"
+ cd "$srcdir/$_gitname-build"
+
+ #
+ # BUILD HERE
+ #
+
+ [ -x configure ] || ./bootstrap
+ sed -i 's|-ljs|-lmozjs185|' configure
+ [ -f Makefile ] || ./configure --prefix=/usr --sysconfdir=/etc --localstatedir=/var
+ make
+ patch -R etc/init/couchdb <$srcdir/rc-script.patch
+}
+
+package() {
+ cd "$srcdir/$_gitname-build"
+ make DESTDIR="$pkgdir" install
+
+ 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
+
+ rm -rf $pkgdir/etc/default/ $pkgdir/var/run
+}