1 | # -*- 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 |
---|
2 | # $Id: Portfile 118733 2014-04-09 20:11:32Z ciserlohn@macports.org $ |
---|
3 | |
---|
4 | PortSystem 1.0 |
---|
5 | PortGroup active_variants 1.1 |
---|
6 | |
---|
7 | name couchdb |
---|
8 | conflicts couchdb-devel |
---|
9 | version 1.5.1 |
---|
10 | revision 1 |
---|
11 | |
---|
12 | categories databases |
---|
13 | platforms darwin |
---|
14 | |
---|
15 | description CouchDB is a document database server |
---|
16 | maintainers jsnider.net:jeff \ |
---|
17 | openmaintainer |
---|
18 | long_description ${description} with a restful HTTP API, capable of \ |
---|
19 | storing arbitrary JSON documents, building powerful data views, \ |
---|
20 | defined in JavaScript, and processed in parallel using Map/Reduce. \ |
---|
21 | It leaves out SQL and transactions for simplicity's sake, to \ |
---|
22 | improve scalability and to relax users' lives. |
---|
23 | homepage http://couchdb.apache.org/ |
---|
24 | license Apache-2 |
---|
25 | |
---|
26 | master_sites apache |
---|
27 | master_sites.mirror_subdir ${name}/source/${version}/ |
---|
28 | distname apache-${name}-${version} |
---|
29 | |
---|
30 | checksums rmd160 98b26123c05ddaade3f06d45dab5137c35e3e12b \ |
---|
31 | sha256 d9d5dcc1c16633cef45f94d3f04ae72eb08390c75c2bc95f8be2c09fc46d4d47 |
---|
32 | |
---|
33 | depends_build port:help2man \ |
---|
34 | port:pkgconfig |
---|
35 | |
---|
36 | depends_lib port:icu \ |
---|
37 | port:spidermonkey185 \ |
---|
38 | port:erlang \ |
---|
39 | port:curl |
---|
40 | |
---|
41 | # erlang is not universal |
---|
42 | universal_variant no |
---|
43 | |
---|
44 | patchfiles patch-etc-launchd-org.apache.couchdb.plist.tpl.in.diff \ |
---|
45 | patch-support-dual-spidermonkey.diff \ |
---|
46 | patch-support-erlang-R17.diff \ |
---|
47 | patch-src-couchdb-priv-Makefile.in.diff |
---|
48 | |
---|
49 | require_active_variants erlang ssl |
---|
50 | |
---|
51 | configure.args --enable-js-trunk |
---|
52 | |
---|
53 | set dbgroup matt |
---|
54 | set dbuser matt |
---|
55 | set logdir ${prefix}/var/log/couchdb |
---|
56 | set dbdir ${prefix}/var/lib/couchdb |
---|
57 | set confdir ${prefix}/etc/couchdb |
---|
58 | set rundir ${prefix}/var/run/couchdb |
---|
59 | set plistdir /Library/LaunchDaemons |
---|
60 | startupitem.uniquename org.apache.couchdb |
---|
61 | set plist ${startupitem.uniquename}.plist |
---|
62 | |
---|
63 | # add_users ${dbuser} group=${dbgroup} |
---|
64 | |
---|
65 | post-destroot { |
---|
66 | move ${destroot}${confdir}/local.ini ${destroot}${confdir}/local.ini.sample |
---|
67 | xinstall -m 755 -o ${dbuser} -g ${dbgroup} -d \ |
---|
68 | ${destroot}${dbdir} \ |
---|
69 | ${destroot}${logdir} \ |
---|
70 | ${destroot}${plistdir} \ |
---|
71 | ${destroot}${rundir} |
---|
72 | destroot.keepdirs-append \ |
---|
73 | ${destroot}${dbdir} \ |
---|
74 | ${destroot}${logdir} \ |
---|
75 | ${destroot}${rundir} |
---|
76 | # system "cd ${destroot}${plistdir} && ln -sf ${prefix}${plistdir}/${plist}" |
---|
77 | } |
---|
78 | |
---|
79 | post-activate { |
---|
80 | if {![file exists ${confdir}/local.ini]} { |
---|
81 | xinstall -m 640 -o ${dbuser} -g ${dbgroup} ${confdir}/local.ini.sample ${confdir}/local.ini |
---|
82 | } |
---|
83 | } |
---|
84 | |
---|
85 | |
---|
86 | notes " |
---|
87 | Run the following command to load the CouchDB launchd plist\ |
---|
88 | in order to start the service now and at system startup: |
---|
89 | |
---|
90 | sudo port load couchdb |
---|
91 | " |
---|
92 | |
---|
93 | livecheck.type regex |
---|
94 | livecheck.url http://couchdb.apache.org/downloads.html |
---|
95 | livecheck.regex apache-${name}-(\[0-9.\]+\[0-9\]+) |
---|