# $Id$ PortSystem 1.0 name couchdb version 0.8.1 categories databases platforms darwin description couchdb is a document database server maintainers jwa long_description ${description} homepage http://incubator.apache.org/couchdb/ master_sites apache master_sites.mirror_subdir incubator/${name}/${version}-incubating/ distname apache-${name}-${version}-incubating checksums md5 89e037b370bef33be93f0f317e07615f \ sha1 1bbe4776a125577d89ae7b2622f406e59be9d119 \ rmd160 2928eeb3e3816d5a3ae43b548cde96de289dddd5 depends_lib port:automake \ port:autoconf \ port:libtool \ port:help2man \ port:icu \ port:spidermonkey \ port:erlang set dbgroup couchdb set dbuser couchdb set logdir ${prefix}/var/log/couchdb set dbdir ${prefix}/var/lib/couchdb set piddir ${prefix}/var/run/ set plistloc ${prefix}/etc/LaunchDaemons/org.macports.CouchDB variant server description {adds a startup item} { addgroup ${dbgroup} adduser ${dbuser} gid=[existsgroup ${dbgroup}] startupitem.create yes startupitem.type launchd startupitem.name CouchDB # startupitem.start "\$\(${prefix}/bin/icu-config --invoke\) ${prefix}/bin/couchdb -b -o ${logdir}/couchdb.stdout -e ${logdir}/couchdb.stderr" startupitem.start "${prefix}/bin/couchdb -b -o ${logdir}/couchdb.stdout -e ${logdir}/couchdb.stderr" startupitem.stop "${prefix}/bin/couchdb -d" } pre-destroot { if { [variant_isset server] } { xinstall -m 755 -o ${dbuser} -g ${dbgroup} -d \ ${destroot}${dbdir} \ ${destroot}${logdir} \ ${destroot}${piddir} destroot.keepdirs-append \ ${destroot}${dbdir} \ ${destroot}${logdir} \ ${destroot}${piddir} } } pre-install { if { [variant_isset server] } { system "touch ${destroot}${piddir}/couchdb.pid" system "chown -R ${dbuser}:${dbgroup} ${destroot}${dbdir} ${destroot}${logdir} ${destroot}${piddir}/couchdb.pid" system "cd ${destroot}${plistloc}; patch <${filespath}/patch-org.macports.CouchDB.plist.diff" } } livecheck.check regex livecheck.url http://incubator.apache.org/couchdb/downloads.html livecheck.regex apache-${name}-(0.\[0-9\].\[0-9\])