Ticket #42691: Portfile

File Portfile, 3.1 KB (added by jul_bsd@…, 11 years ago)
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: Portfile 111353 2013-09-19 07:21:56Z ryandesign@macports.org $
3
4PortSystem          1.0
5
6name                beltane
7version             1.0.19
8categories          security
9platforms           darwin
10maintainers         nomaintainer
11license             GPL-2
12
13description         web-based central management console for the Samhain file integrity / intrusion detection system
14long_description    ${description}
15
16homepage            http://la-samhna.de/beltane/
17master_sites        ${homepage}
18checksums           rmd160  11fb0ba3d71ddc384e40fc3bffdde6d94006a5d7 \
19                    sha256  6cff066f40f8d61db49afeacb90b0290f046841d98979ebee29299be3d6fe88d
20
21## FIXME! depends on some variant (+mysql +postgresql +oracle)
22depends_run-append port:samhain
23
24set webroot         ${prefix}/www/beltane
25use_configure       yes
26## Note: we suppose web server user is 'nobody'
27##                    --with-user=nobody
28##  => NOK: configure asking nobody owns its home dir (for config?)
29configure.args-append --with-php-dir=${webroot} --with-php-extension=php \
30                    --enable-mod-php \
31                    --with-data-dir=${prefix}/var/lib/yule \
32                    --with-logfile=${prefix}/var/log/beltane_update_log
33## FIXME! with default clang or gcc, compilation in macports fails but calling 'make' manually after finished normally
34##    clang: error: no such file or directory: 'x_beltane_update.c'
35#configure.compiler        macports-gcc-4.9
36
37## Not supporting DESTDIR
38pre-destroot {
39    reinplace "s|prefix = ${prefix}|prefix = ${destroot}${prefix}|" ${worksrcpath}/Makefile
40    reinplace "s|${prefix}|${destroot}${prefix}|" ${worksrcpath}/Makefile
41    reinplace "s|phpdir = ${webroot}|phpdir = ${destroot}${webroot}|" ${worksrcpath}/php/Makefile
42    reinplace "s|rcfile = /var/root/.beltanerc|rcfile = ${prefix}/etc/beltanerc|" ${worksrcpath}/php/Makefile
43    reinplace "s|/var/root/.beltanerc|${prefix}/etc/beltanerc|" ${worksrcpath}/php/config.inc
44    reinplace "s|<pid_file>/var/run/yule.pid</pid_file>|<pid_file>${prefix}/var/run/yule.pid</pid_file>|" ${worksrcpath}/php/beltanerc
45}
46post-destroot {
47    copy ${worksrcpath}/php/beltanerc ${destroot}${prefix}/etc/beltanerc.sample
48    xinstall -d ${destroot}${prefix}/share/docs/${name}/
49    copy ${worksrcpath}/README ${destroot}${prefix}/share/docs/${name}/
50}
51
52
53livecheck.type      regex
54livecheck.url       ${homepage}
55livecheck.regex     "href=\"beltane-(\\d+\\.\\d+\\.\\d+).tar.gz"
56
57
58notes "
59
60To finish install:
611) You will need a web server and PHP (not covered)
622) copy config ${prefix}/etc/beltanerc.dist to ${prefix}/etc/beltanerc
633) configure your webserver like
64    w nginx, add to ${prefix}/etc/nginx/nginx.conf and restart it
65    include nginx-beltane.conf
66    (in your server part)
67
684) Try to access the UI.
69
70     http ://localhost/beltane/
71
72BUGS: failed to build encode in macports, ok manual and can follow port install ???
73BUGS: FastCGI sent in stderr: \"Primary script unknown\" while reading response header from upstream
74"