Ticket #43412: prefix_couchdb_Portfile

File prefix_couchdb_Portfile, 3.4 KB (added by posita (Matt Bogosian), 10 years ago)

patched Portfile from failed prefix build

Line 
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
4PortSystem              1.0
5PortGroup               active_variants 1.1
6
7name                    couchdb
8conflicts               couchdb-devel
9version                 1.5.1
10revision                1
11
12categories              databases
13platforms               darwin
14
15description             CouchDB is a document database server
16maintainers             jsnider.net:jeff \
17                        openmaintainer
18long_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.
23homepage                http://couchdb.apache.org/
24license                 Apache-2
25
26master_sites            apache
27master_sites.mirror_subdir ${name}/source/${version}/
28distname                apache-${name}-${version}
29
30checksums               rmd160  98b26123c05ddaade3f06d45dab5137c35e3e12b \
31                        sha256  d9d5dcc1c16633cef45f94d3f04ae72eb08390c75c2bc95f8be2c09fc46d4d47
32
33depends_build           port:help2man \
34                        port:pkgconfig
35
36depends_lib             port:icu \
37                        port:spidermonkey185 \
38                        port:erlang \
39                        port:curl
40
41# erlang is not universal
42universal_variant       no
43
44patchfiles              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
49require_active_variants erlang ssl
50
51configure.args          --enable-js-trunk
52
53set dbgroup             matt
54set dbuser              matt
55set logdir              ${prefix}/var/log/couchdb
56set dbdir               ${prefix}/var/lib/couchdb
57set confdir             ${prefix}/etc/couchdb
58set rundir              ${prefix}/var/run/couchdb
59set plistdir            /Library/LaunchDaemons
60startupitem.uniquename  org.apache.couchdb
61set plist               ${startupitem.uniquename}.plist
62
63# add_users               ${dbuser} group=${dbgroup}
64
65post-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
79post-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
86notes "
87Run the following command to load the CouchDB launchd plist\
88in order to start the service now and at system startup:
89
90sudo port load couchdb
91"
92
93livecheck.type          regex
94livecheck.url           http://couchdb.apache.org/downloads.html
95livecheck.regex         apache-${name}-(\[0-9.\]+\[0-9\]+)