diff options
Diffstat (limited to 'community-testing/couchdb/PKGBUILD')
-rw-r--r-- | community-testing/couchdb/PKGBUILD | 46 |
1 files changed, 46 insertions, 0 deletions
diff --git a/community-testing/couchdb/PKGBUILD b/community-testing/couchdb/PKGBUILD new file mode 100644 index 000000000..6d4d6d171 --- /dev/null +++ b/community-testing/couchdb/PKGBUILD @@ -0,0 +1,46 @@ +# $Id: PKGBUILD 51045 2011-07-04 15:16:10Z 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.1.0 +pkgrel=1.svn20110704 +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' 'js' '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" +source=("http://arch.p5n.pp.ru/~sergej/dl/apache-couchdb-$pkgver.svn20110704.tar.gz" + "rc-script.patch") +md5sums=('a961f9047aa34df56ef19d6f6dce083b' + 'e9b5595338efbdc1a5db13284a296612') + +build() { + cd "$srcdir/apache-$pkgname-$pkgver" + + sed -i 's|-ljs|-lmozjs185|' configure + ./configure --prefix=/usr --sysconfdir=/etc --localstatedir=/var + make + patch 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 + 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 +} |