# -*- coding: utf-8; mode: tcl; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- vim:fenc=utf-8:ft=tcl:et:sw=4:ts=4:sts=4 # $Id: Portfile 142029 2015-11-02 10:31:32Z ciserlohn@macports.org $ PortSystem 1.0 PortGroup active_variants 1.1 name couchdb conflicts couchdb-devel version 1.6.1 revision 2 categories databases platforms darwin description CouchDB is a document database server maintainers ciserlohn long_description ${description} with a restful HTTP API, capable of \ storing arbitrary JSON documents, building powerful data views, \ defined in JavaScript, and processed in parallel using Map/Reduce. \ It leaves out SQL and transactions for simplicity's sake, to \ improve scalability and to relax users' lives. homepage http://couchdb.apache.org/ license Apache-2 master_sites apache master_sites.mirror_subdir ${name}/source/${version}/ distname apache-${name}-${version} checksums rmd160 9701c8cb7f712ce792ede3fc73e9cf028cea54b5 \ sha256 5a601b173733ce3ed31b654805c793aa907131cd70b06d03825f169aa48c8627 depends_build port:help2man \ port:pkgconfig depends_lib port:icu \ port:spidermonkey185 \ port:erlang \ port:curl # erlang is not universal universal_variant no patchfiles patch-etc-launchd-org.apache.couchdb.plist.tpl.in.diff \ patch-support-dual-spidermonkey.diff \ patch-src-couchdb-priv-Makefile.in.diff \ patch-configure.ac.diff \ patch-configure.diff require_active_variants erlang ssl configure.args --enable-js-trunk set dbgroup couchdb set dbuser couchdb set logdir ${prefix}/var/log/couchdb set dbdir ${prefix}/var/lib/couchdb set confdir ${prefix}/etc/couchdb set rundir ${prefix}/var/run/couchdb set plistdir /Library/LaunchDaemons startupitem.uniquename org.apache.couchdb set plist ${startupitem.uniquename}.plist add_users ${dbuser} group=${dbgroup} post-destroot { move ${destroot}${confdir}/local.ini ${destroot}${confdir}/local.ini.sample xinstall -m 755 -o ${dbuser} -g ${dbgroup} -d \ ${destroot}${dbdir} \ ${destroot}${logdir} \ ${destroot}${plistdir} \ ${destroot}${rundir} destroot.keepdirs-append \ ${destroot}${dbdir} \ ${destroot}${logdir} \ ${destroot}${rundir} system "cd ${destroot}${plistdir} && ln -sf ${prefix}${plistdir}/${plist}" } post-activate { if {![file exists ${confdir}/local.ini]} { xinstall -m 640 -o ${dbuser} -g ${dbgroup} ${confdir}/local.ini.sample ${confdir}/local.ini } } notes " Run the following command to load the CouchDB launchd plist\ in order to start the service now and at system startup: sudo port load couchdb " livecheck.type regex livecheck.url http://couchdb.apache.org/downloads.html livecheck.regex apache-${name}-(\[0-9.\]+\[0-9\]+)