Ticket #37650: couchdb-devel.couchdb.improvements.patch

File couchdb-devel.couchdb.improvements.patch, 1.9 KB (added by jeff@…, 12 years ago)
  • Portfile

    diff -ruN /Users/jeff/couchdb-devel-37641/Portfile ./Portfile
    old new  
    77name                couchdb-devel
    88conflicts           couchdb
    99version             1.4.0a-20130112
     10revision            1
    1011
    1112categories          databases
    1213platforms           darwin
     
    5051    system "cd ${worksrcpath}; ./bootstrap"
    5152}
    5253
     54configure.args      --with-js-include=${prefix}/include/js \
     55                    --with-erlang=${prefix}/lib/erlang/usr/include \
     56                    --enable-js-trunk
     57
    5358set dbgroup couchdb
    5459set dbuser couchdb
    5560set logdir ${prefix}/var/log/couchdb
    5661set dbdir ${prefix}/var/lib/couchdb
     62set confdir ${prefix}/etc/couchdb
     63set rundir ${prefix}/var/run/couchdb
    5764set plistdir /Library/LaunchDaemons
    5865startupitem.uniquename org.apache.couchdb
    5966set plist ${startupitem.uniquename}.plist
    6067
     68add_users       ${dbuser} group=${dbgroup}
     69
    6170post-destroot {
    62     addgroup ${dbgroup}
    63     adduser ${dbuser} gid=[existsgroup ${dbgroup}]
     71    move ${destroot}${confdir}/local.ini ${destroot}${confdir}/local.ini.sample
    6472    xinstall -m 755 -o ${dbuser} -g ${dbgroup} -d \
    6573        ${destroot}${dbdir} \
    6674        ${destroot}${logdir} \
    67         ${destroot}${plistdir}
     75        ${destroot}${plistdir} \
     76        ${destroot}${rundir}
    6877    destroot.keepdirs-append \
    6978        ${destroot}${dbdir} \
    70         ${destroot}${logdir}
     79        ${destroot}${logdir} \
     80        ${destroot}${rundir}
    7181    system "cd ${destroot}${plistdir} && ln -sf ${prefix}${plistdir}/${plist}"
    7282}
    7383
     84post-activate {
     85    if {![file exists ${confdir}/local.ini]} {
     86        xinstall -m 640 -o ${dbuser} -g ${dbgroup} ${confdir}/local.ini.sample ${confdir}/local.ini
     87    }
     88}
     89
     90
    7491notes "
    7592Changes in CouchDB r753448 make older database files incompatible.\
    7693See http://wiki.apache.org/couchdb/BreakingChanges for details.