Ticket #28187: Portfile

File Portfile, 6.0 KB (added by ryandesign (Ryan Carsten Schmidt), 14 years ago)

Portfile Wolfgang Helisch emailed to me and asked me to attach

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
5
6name                    simplevoc-open
7version                 1.7.0
8categories              database
9platforms               darwin
10maintainers             triagens.de:f.celler \
11                        triagens.de:k.salewski \
12                        triagens.de:w.helisch
13
14description             Versatile object cache
15
16long_description        SimpleVoc-OPEN is an open source version of a \
17                        key/value based in memory object cache software. \
18                        (See the WWW page for details.)
19
20homepage                http://www.worldofvoc.com/
21master_sites            http://www.worldofvoc.com/wp-content/uploads/2011/01/
22
23distname                SimpleVoc-${version}-OPEN
24
25checksums               md5     a1817eaf3fa2450c5c7d468ad74bda60 \
26                        sha1    154ab772f350e90b397508abe00144b5066de479
27
28depends_build           port:boost \
29                        port:libev
30
31configure.args          --enable-static-libev \
32                        --enable-static-boost
33
34build.target            all php-api
35
36post-destroot {
37    xinstall -m 755 -d ${destroot}${prefix}/etc
38    xinstall -m 755 -d ${destroot}${prefix}/sbin
39    xinstall -m 755 -d ${destroot}${prefix}/share/doc/simplevoc
40    xinstall -m 755 -d ${destroot}${prefix}/share/simplevoc/WebAdmin/css/ui-lightness/images
41    xinstall -m 755 -d ${destroot}${prefix}/share/simplevoc/WebAdmin/images
42    xinstall -m 755 -d ${destroot}${prefix}/share/simplevoc/WebAdmin/js/flot
43    xinstall -m 755 -d ${destroot}${prefix}/share/simplevoc/WebAdmin/js/jqplot/plugins
44    xinstall -m 755 -d ${destroot}${prefix}/share/simplevoc/WebAdmin/js/jquery/plugins
45    xinstall -m 755 -d ${destroot}${prefix}/Library/LaunchDaemons
46   
47    xinstall -m 644 ${worksrcpath}/NOTICE ${destroot}${prefix}/share/doc/simplevoc/NOTICE
48    xinstall -m 644 ${worksrcpath}/NOTICE.boost ${destroot}${prefix}/share/doc/simplevoc/NOTICE.boost
49    xinstall -m 644 ${worksrcpath}/NOTICE.getaddrinfo ${destroot}${prefix}/share/doc/simplevoc/NOTICE.getaddrinfo
50    xinstall -m 644 ${worksrcpath}/NOTICE.json ${destroot}${prefix}/share/doc/simplevoc/NOTICE.json
51    xinstall -m 644 ${worksrcpath}/NOTICE.libev ${destroot}${prefix}/share/doc/simplevoc/NOTICE.libev
52    xinstall -m 755 ${worksrcpath}/Demo/exampleRequest.sh  ${destroot}${prefix}/share/doc/simplevoc/exampleRequest.sh 
53    xinstall -m 755 ${worksrcpath}/SimpleVoc/simplevoc ${destroot}${prefix}/sbin/simplevoc
54    xinstall -m 644 ${worksrcpath}/initscripts/simplevoc.conf ${destroot}${prefix}/etc/simplevoc.conf
55    xinstall -m 644 ${worksrcpath}/initscripts/de.triagens.simplevoc.plist ${destroot}${prefix}/Library/LaunchDaemons/de.triagens.simplevoc.plist
56   
57    eval xinstall -m 644 [glob ${worksrcpath}/WebAdmin/css/*.*] ${destroot}${prefix}/share/simplevoc/WebAdmin/css
58    eval xinstall -m 644 [glob ${worksrcpath}/WebAdmin/css/ui-lightness/*.*] ${destroot}${prefix}/share/simplevoc/WebAdmin/css/ui-lightness
59    eval xinstall -m 644 [glob ${worksrcpath}/WebAdmin/css/ui-lightness/images/*.*] ${destroot}${prefix}/share/simplevoc/WebAdmin/css/ui-lightness/images
60    eval xinstall -m 644 [glob ${worksrcpath}/WebAdmin/images/*.*] ${destroot}${prefix}/share/simplevoc/WebAdmin/images
61    eval xinstall -m 644 [glob ${worksrcpath}/WebAdmin/js/*.*] ${destroot}${prefix}/share/simplevoc/WebAdmin/js
62    eval xinstall -m 644 [glob ${worksrcpath}/WebAdmin/js/flot/*.*] ${destroot}${prefix}/share/simplevoc/WebAdmin/js/flot
63    eval xinstall -m 644 [glob ${worksrcpath}/WebAdmin/js/jqplot/*.*] ${destroot}${prefix}/share/simplevoc/WebAdmin/js/jqplot
64    eval xinstall -m 644 [glob ${worksrcpath}/WebAdmin/js/jqplot/plugins/*.*] ${destroot}${prefix}/share/simplevoc/WebAdmin/js/jqplot/plugins
65    eval xinstall -m 644 [glob ${worksrcpath}/WebAdmin/js/jquery/*.*] ${destroot}${prefix}/share/simplevoc/WebAdmin/js/jquery
66    eval xinstall -m 644 [glob ${worksrcpath}/WebAdmin/js/jquery/plugins/*.*] ${destroot}${prefix}/share/simplevoc/WebAdmin/js/jquery/plugins
67   
68    if { ${os.arch} == "i386" } {
69        xinstall -m 755 -d ${destroot}${prefix}/lib/php/extensions/no-debug-non-zts-20090626
70        xinstall -m 755 ${worksrcpath}/API/PHP/modules/voc.so ${destroot}${prefix}/lib/php/extensions/no-debug-non-zts-20090626/voc.so
71    }
72   
73    if { ${os.arch} == "x86_64" } {
74        xinstall -m 755 -d ${destroot}${prefix}/lib64/php/extensions/no-debug-non-zts-20090626
75        xinstall -m 755 ${worksrcpath}/API/PHP/modules/voc.so ${destroot}${prefix}/lib64/php/extensions/no-debug-non-zts-20090626/voc.so
76    }
77   
78    if {[file exists ${destroot}${prefix}/etc/php.ini]} {
79        system "egrep -e \"^\[\[:space:\]\]*extension\[\[:space:\]\]*=\[\[:space:\]\]*voc.so\" ${destroot}${prefix}/etc/php.ini > /dev/null; if \[ $$? -eq 1 \]; then echo \"extension=voc.so\" >> /etc/php.ini; fi"
80    } else {
81        system "echo \"extension=voc.so\" > ${destroot}${prefix}/etc/php.ini"
82    }
83
84    reinplace "s|/usr/sbin|${prefix}/sbin|g" ${destroot}${prefix}/Library/LaunchDaemons/de.triagens.simplevoc.plist
85    reinplace "s|/etc|${prefix}/etc|g" ${destroot}${prefix}/Library/LaunchDaemons/de.triagens.simplevoc.plist
86    reinplace "s|/usr/share|${prefix}/share|g" ${destroot}${prefix}/etc/simplevoc.conf
87    reinplace "s|/var/log|${prefix}/var/log|g" ${destroot}${prefix}/etc/simplevoc.conf
88}
89
90startupitem.create      yes
91startupitem.name        simplevoc
92startupitem.logfile     ${destroot}${prefix}/var/log/simplevoc.log
93startupitem.logevents   yes
94startupitem.netchange   yes
95startupitem.start       "launchctl unload ${prefix}/Library/LaunchDaemons/de.triagens.simplevoc.plist;" \
96                        "launchctl load ${prefix}/Library/LaunchDaemons/de.triagens.simplevoc.plist;" \
97                        "launchctl start de.triagens.simplevoc"
98startupitem.stop        "launchctl stop de.triagens.simplevoc;" \
99                        "launchctl unload ${prefix}/Library/LaunchDaemons/de.triagens.simplevoc.plist"
100supported_archs         i686 x86_64
101
102