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 | |
---|
4 | PortSystem 1.0 |
---|
5 | |
---|
6 | name beltane |
---|
7 | version 1.0.19 |
---|
8 | categories security |
---|
9 | platforms darwin |
---|
10 | maintainers nomaintainer |
---|
11 | license GPL-2 |
---|
12 | |
---|
13 | description web-based central management console for the Samhain file integrity / intrusion detection system |
---|
14 | long_description ${description} |
---|
15 | |
---|
16 | homepage http://la-samhna.de/beltane/ |
---|
17 | master_sites ${homepage} |
---|
18 | checksums rmd160 11fb0ba3d71ddc384e40fc3bffdde6d94006a5d7 \ |
---|
19 | sha256 6cff066f40f8d61db49afeacb90b0290f046841d98979ebee29299be3d6fe88d |
---|
20 | |
---|
21 | ## FIXME! depends on some variant (+mysql +postgresql +oracle) |
---|
22 | depends_run-append port:samhain |
---|
23 | |
---|
24 | set webroot ${prefix}/www/beltane |
---|
25 | use_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?) |
---|
29 | configure.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 |
---|
38 | pre-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 | } |
---|
46 | post-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 | |
---|
53 | livecheck.type regex |
---|
54 | livecheck.url ${homepage} |
---|
55 | livecheck.regex "href=\"beltane-(\\d+\\.\\d+\\.\\d+).tar.gz" |
---|
56 | |
---|
57 | |
---|
58 | notes " |
---|
59 | |
---|
60 | To finish install: |
---|
61 | 1) You will need a web server and PHP (not covered) |
---|
62 | 2) copy config ${prefix}/etc/beltanerc.dist to ${prefix}/etc/beltanerc |
---|
63 | 3) 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 | |
---|
68 | 4) Try to access the UI. |
---|
69 | |
---|
70 | http ://localhost/beltane/ |
---|
71 | |
---|
72 | BUGS: failed to build encode in macports, ok manual and can follow port install ??? |
---|
73 | BUGS: FastCGI sent in stderr: \"Primary script unknown\" while reading response header from upstream |
---|
74 | " |
---|