Ticket #31820: couchdb-keep-local-ini.patch

File couchdb-keep-local-ini.patch, 1.1 KB (added by jeff-macports@…, 13 years ago)

Update patch file for 1.2.0

  • Portfile

    old new  
    5555set dbuser couchdb
    5656set logdir ${prefix}/var/log/couchdb
    5757set dbdir ${prefix}/var/lib/couchdb
     58set confdir ${prefix}/etc/couchdb
    5859set rundir ${prefix}/var/run/couchdb
    5960set plistdir /Library/LaunchDaemons
    6061startupitem.uniquename org.apache.couchdb
     
    6364post-destroot {
    6465    addgroup ${dbgroup}
    6566    adduser ${dbuser} gid=[existsgroup ${dbgroup}]
     67    move ${destroot}${confdir}/local.ini ${destroot}${confdir}/local.ini.sample
    6668    xinstall -m 755 -o ${dbuser} -g ${dbgroup} -d \
    6769        ${destroot}${dbdir} \
    6870        ${destroot}${logdir} \
     
    7981}
    8082
    8183post-activate {
     84    if {![file exists ${confdir}/local.ini]} {
     85      xinstall -m 640 -o ${dbuser} -g ${dbgroup} ${confdir}/local.ini.sample ${confdir}/local.ini
     86    }
    8287    ui_msg "########################################################################"
    8388    ui_msg "# Run the following command to install the CouchDB launchd"
    8489    ui_msg "# startup item in order to start and re-start service automatically:"