aboutsummaryrefslogtreecommitdiffstats
path: root/security/base/Makefile
blob: fae854201c5ff7b511e4065ade07a02a9c66967b (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
# Created by: Linh Pham <question+fbsdports@closedsrc.org>
# $FreeBSD$

PORTNAME=   base
PORTVERSION=    1.4.5
CATEGORIES= security
MASTER_SITES=   SF/secureideas/BASE/${PORTNAME}-${PORTVERSION}

MAINTAINER= ports@FreeBSD.org
COMMENT=    Basic Analysis and Security Engine - analyzing Snort alerts

RUN_DEPENDS=    ${ADODB_DIR}/adodb.inc.php:${PORTSDIR}/databases/adodb5 \
        ${LOCALBASE}/share/pear/Image/Graph.php:${PORTSDIR}/graphics/pear-Image_Graph \
        ${LOCALBASE}/share/pear/Mail.php:${PORTSDIR}/mail/pear-Mail \
        ${LOCALBASE}/share/pear/Mail/mime.php:${PORTSDIR}/mail/pear-Mail_Mime

USE_PHP=    gd gettext pcre session zlib ctype

ADODB_DIR=  ${LOCALBASE}/share/adodb

SUB_FILES=  pkg-message
DOCS=       docs/CHANGELOG docs/CREDITS docs/README docs/README.mssql \
        docs/TODO docs/UPGRADE docs/GPL docs/base_faq.rtf

OPTIONS_DEFINE= MYSQL PGSQL PDF DOCS

.include <bsd.port.options.mk>

.if ${PORT_OPTIONS:MMYSQL}
USE_MYSQL=  yes
USE_PHP+=   mysql
.endif
.if ${PORT_OPTIONS:MPGSQL}
USES+=      pgsql
USE_PHP+=   pgsql
.endif
.if ${PORT_OPTIONS:MPDF}
RUN_DEPENDS+=   ${LOCALBASE}/share/fpdf/fpdf.php:${PORTSDIR}/print/fpdf
.endif

do-build:
    @${REINPLACE_CMD} -e 's,DBlib_path = "",DBlib_path = "${ADODB_DIR}",' \
        ${WRKSRC}/base_conf.php.dist

do-install:
    ${MKDIR} ${STAGEDIR}${PREFIX}/www/base/includes/templates/default
    ${INSTALL_DATA} ${WRKSRC}/*.php ${WRKSRC}/*.dist ${STAGEDIR}${PREFIX}/www/base
.for dir in admin help includes languages setup
    ${MKDIR} ${STAGEDIR}${PREFIX}/www/base/${dir}
    ${INSTALL_DATA} ${WRKSRC}/${dir}/*.php ${STAGEDIR}${PREFIX}/www/base/${dir}
.endfor
.for dir in images sql styles
    ${MKDIR} ${STAGEDIR}${PREFIX}/www/base/${dir}
    ${INSTALL_DATA} ${WRKSRC}/${dir}/* ${STAGEDIR}${PREFIX}/www/base/${dir}
.endfor

post-install:
    ${MKDIR} ${STAGEDIR}${DOCSDIR}
    cd ${WRKSRC} && ${INSTALL_DATA} ${DOCS} ${STAGEDIR}${DOCSDIR}

.include <bsd.port.mk>