# -*- 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
# $Id: Portfile 38808 2008-07-31 22:53:03Z macsforever2000@macports.org $

PortSystem      1.0

name            prelude-manager
version         0.9.14
categories      security
maintainers     googlemail.com:usx303 \
                openmaintainer

description     Prelude Universal SIM - manager

long_description \
        Prelude is a Universal "Security Information Management" (SIM) system. \
        Prelude collects, normalizes, sorts, aggregates, correlates and \
        reports all security-related events independently of the product brand \
        or license giving rise to such events. \
        Prelude-Manager is a high availability server that accepts secured \
        connections from distributed sensors and/or other Managers and saves \
        received events to a media specified by the user \
        (database, log file, mail etc.).

homepage        http://www.prelude-ids.org/

master_sites    ${homepage}download/releases/prelude-manager/

platforms       darwin

checksums       md5 ca47665fcf299732509459956297320b \
                sha1 23cc8db8350ca8e1c5281851b5255d0b40a53f75 \
                rmd160 55e68fa07bf724092a300eedbb6bc9db0617ad3c

build.type      gnu

configure.args  --mandir=${prefix}/share/man \
                --with-html-dir=${prefix}/share/doc \
                --localstatedir=${prefix}/var

depends_lib     port:libxml2 \
                port:gnutls \
                port:libprelude

destroot.keepdirs \
        ${destroot}${prefix}/var/run/prelude-manager

post-destroot {
        system "touch ${destroot}${prefix}/var/spool/prelude-manager/.turd"
        reinplace "s|= /var|= ${prefix}/var|g" ${destroot}${prefix}/etc/prelude-manager/prelude-manager.conf
}

# At the moment libpreludedb in macports is outdated.
# There are also some issues with libpreludedb on Mac OS.
# Until these are fixed, installing libpreludedb is not recommended
# and the database plugin should be disabled.
# (so xml is the only output backend)
#
#variant database description {Build with database support (libpreludedb)} {
#        depends_lib-append port:libpreludedb
#}

