Ticket #33432: databases.avocadodb.Portfile

File databases.avocadodb.Portfile, 4.4 KB (added by w.helisch@…, 13 years ago)

initial portfile (version 2)

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$
3
4PortSystem              1.0
5PortGroup               github 1.0 
6
7name                    AvocadoDB
8version                 0.2.0
9categories              databases
10platforms               darwin
11license                 Apache-2.0
12maintainers             triagens.de:f.celler
13
14description             a NoSQL document store that grows with your project
15
16long_description        Our mission: projects are different, project requirements \
17                        change. We want to offer with AvocadoDB a most universally \
18                        applicable nosql database which can be used in a maximum \
19                        number of different use cases. In buzzword bingo language: \
20                        we want to become the MySql in nosql  without MySqls \
21                        annoyances of course. \
22                        (See the WWW page for details.)
23                       
24supported_archs         i386 x86_64
25
26homepage                http://www.avocadodb.org
27
28fetch.type              git
29git.url                 https://github.com/triAGENS/AvocadoDB
30git.branch              v0.2.0
31
32depends_build           port:bison \
33                        port:flex
34
35configure.args          --enable-all-in-one \
36                        --enable-bison \
37                        --enable-flex \
38                        --disable-dbdir
39
40################################################################################
41
42set dbgroup avocado
43set dbuser avocado
44
45set dbdir ${prefix}/var/avocado
46
47set sbindir ${prefix}/sbin
48
49set etcdir ${prefix}/etc/voc
50
51set logbase ${prefix}/var/log/voc
52set logdir ${logbase}/avocado
53
54################################################################################
55
56add_users  ${dbuser} group=${dbgroup} realname=AvocadoDB\ Server
57
58post-destroot {
59    xinstall -d -m 755 -o ${dbuser} -g ${dbgroup} \
60        ${destroot}${etcdir}
61
62    xinstall -m 644 -o ${dbuser} -g ${dbgroup} \
63        ${worksrcpath}/Installation/MacOSX/MacPorts/avocado.conf \
64        ${destroot}${prefix}/etc/voc/avocado.conf.sample
65
66    xinstall -d -m 1777 \
67        ${destroot}${logbase}
68
69    xinstall -d -m 755 -o ${dbuser} -g ${dbgroup} \
70        ${destroot}${logdir}
71
72    xinstall -d -m 755 -o ${dbuser} -g ${dbgroup} \
73        ${destroot}${dbdir}
74
75    xinstall -d -m 755 \
76        ${destroot}${prefix}/Library/LaunchDaemons
77
78    xinstall -m 644 \
79        ${worksrcpath}/Installation/MacOSX/MacPorts/org.avocadodb.plist \
80        ${destroot}${prefix}/Library/LaunchDaemons/org.avocadodb.plist.sample
81
82    destroot.keepdirs-append \
83        ${destroot}${logdir} \
84        ${destroot}${dbdir}
85
86    reinplace "s|/usr/sbin|${sbindir}/|g"   ${destroot}${prefix}/Library/LaunchDaemons/org.avocadodb.plist.sample
87    reinplace "s|/etc/voc|${etcdir}|g"      ${destroot}${prefix}/Library/LaunchDaemons/org.avocadodb.plist.sample
88
89    reinplace "s|/var/log/voc|${logdir}|g"  ${destroot}${prefix}/etc/voc/avocado.conf.sample
90}
91
92################################################################################
93
94post-activate {
95    if {![file exists ${prefix}/Library/LaunchDaemons/org.avocadodb.plist]} {
96        file copy ${prefix}/Library/LaunchDaemons/org.avocadodb.plist.sample \
97            ${prefix}/Library/LaunchDaemons/org.avocadodb.plist
98    }
99
100    if {![file exists ${prefix}/etc/voc/avocado.conf]} {
101        file copy ${prefix}/etc/voc/avocado.conf.sample \
102            ${prefix}/etc/voc/avocado.conf
103    }
104}
105
106################################################################################
107
108notes "
109To start up the AvocadoDB server instance, use
110
111    sudo launchctl load ${prefix}/Library/LaunchDaemons/org.avocadodb.plist
112   
113The server will respond on port 8529 to client requests, and you can use
114
115    http://localhost:8530/
116
117to access the administration interface.
118
119To shut down the AvocadoDB server instance, use
120
121    sudo launchctl unload ${prefix}/Library/LaunchDaemons/org.avocadodb.plist
122
123You will find the configuration file at
124
125    ${prefix}/etc/voc/avocado.conf
126
127Please note that this is a very early version of AvocadoDB. There will be
128bugs, and we'd really appreciate it if you report them to:
129
130    https://github.com/triAGENS/AvocadoDB/issues
131"