# Copyright 1999-2007 Patrick Hahn # Distributed under the terms of the GNU General Public License v2 ESVN_REPO_URI="http://couchdb.googlecode.com/svn/trunk/" inherit distutils subversion DESCRIPTION="CouchDb is a distributed document database system with bi-directional replication." HOMEPAGE="http://www.couchdb.com/" SRC_URI="" LICENSE="GPL-2" SLOT="0" KEYWORDS="~x86" IUSE="" RESTRICT="test" #72375 RDEPEND="dev-libs/icu dev-lang/erlang dev-util/svn2cl" DEPEND="${RDEPEND}" S=${WORKDIR}/${ESVN_PROJECT} pkg_setup() { enewgroup couchdb enewuser couchdb -1 /bin/bash /var/lib couchdb } src_compile() { ./bootstrap -C econf --with-erlang=/usr/lib/erlang --localstatedir="/var" emake } src_install() { # Move put the pidfile in it's own directory for simplicity of ownership # Should probably move this up there somewhere and do it before ./configure # But I'm lazy. sed -i \ 's/COUCHDB_PID_FILE=.*/COUCHDB_PID_FILE=\/var\/run\/couchdb\/couchdb.pid/' \ etc/default/couchdb.dist emake DESTDIR="${D}" install || die "install failed" # Yeah there's a better way to do this but I'm lazy, remember? mkdir "${D}/var/run/couchdb" -p touch "${D}/var/run/couchdb/couchdb.pid" chown couchdb:couchdb "${D}/var/run/couchdb" chown couchdb:couchdb "${D}/var/run/couchdb/couchdb.pid" chown couchdb:couchdb "${D}/var/lib/couchdb" chown couchdb:couchdb "${D}/var/log/couchdb" }