Ticket #18633: patch-couchdb-devel_Portfile.diff

File patch-couchdb-devel_Portfile.diff, 2.2 KB (added by febeling@…, 16 years ago)
  • databases/couchdb-devel/Portfile

     
    99description         couchdb is a document database server
    1010maintainers         jwa
    1111long_description    ${description}
    12 homepage            http://incubator.apache.org/couchdb/
    13 master_sites        http://incubator.apache.org/couchdb/
     12homepage            http://couchdb.apache.org/
     13master_sites        ${homepage}
    1414checksums           sha1 bf6506dd200ea18ea1331391da7aaece1188208d
    1515
    1616distname            couchdb-${version}
     
    3131set dbuser couchdb
    3232set logdir ${prefix}/var/log/couchdb
    3333set dbdir ${prefix}/var/lib/couchdb
    34 set piddir ${prefix}/var/run/
    35 set plistloc ${prefix}/etc/LaunchDaemons/org.macports.CouchDB
    3634
    3735pre-configure {
    3836    system "cd ${worksrcpath}; ./bootstrap"
    3937}
    4038
    41 variant server description {adds a startup item} {
     39pre-destroot {
    4240    addgroup ${dbgroup}
    4341    adduser ${dbuser} gid=[existsgroup ${dbgroup}]
    44 
    45     startupitem.create  yes
    46     startupitem.type    launchd
    47     startupitem.name    CouchDB
    48     startupitem.start   "${prefix}/bin/couchdb -b -o ${logdir}/couchdb.stdout -e ${logdir}/couchdb.stderr"
    49     startupitem.stop    "${prefix}/bin/couchdb -d"
     42    xinstall -m 755 -o ${dbuser} -g ${dbgroup} -d \
     43        ${destroot}${dbdir} \
     44        ${destroot}${logdir}
     45    destroot.keepdirs-append \
     46        ${destroot}${dbdir} \
     47        ${destroot}${logdir}
    5048}
    5149
    52 pre-destroot {
    53     if { [variant_isset server] } {
    54         xinstall -m 755 -o ${dbuser} -g ${dbgroup} -d \
    55             ${destroot}${dbdir} \
    56             ${destroot}${logdir} \
    57             ${destroot}${piddir}
    58         destroot.keepdirs-append \
    59             ${destroot}${dbdir} \
    60             ${destroot}${logdir} \
    61             ${destroot}${piddir}
    62     }
    63 }
    64 
    65 pre-install {
    66     if { [variant_isset server] } {
    67         system "touch ${destroot}${piddir}/couchdb.pid"
    68         system "chown -R ${dbuser}:${dbgroup} ${destroot}${dbdir} ${destroot}${logdir} ${destroot}${piddir}/couchdb.pid"
    69         system "cd ${destroot}${plistloc}; patch <${filespath}/patch-org.macports.CouchDB.plist.diff"
    70     }
    71 }
    72 
    7350livecheck.check regex
    7451livecheck.url   http://svn.apache.org/repos/asf/incubator/couchdb/trunk
    7552livecheck.version       ${svn.tag}