aboutsummaryrefslogtreecommitdiffstats
path: root/net-mgmt/flowviewer/Makefile
blob: 2fc588c7b2996c6bee04a1f99120201cd6a1ad7c (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
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
# New ports collection makefile for:    flowviewer
# Date created:         Oct 15, 2006
# Whom:             Alex Samorukov, samm@os2.kiev.ua
#
# $FreeBSD$

PORTNAME=   flowviewer
PORTVERSION=    3.3.1
CATEGORIES= net-mgmt
MASTER_SITES=   http://ensight.eos.nasa.gov/FlowViewer/
DISTNAME=   FlowViewer_${DISTVERSION}
EXTRACT_SUFX=   .tar

MAINTAINER= samm@os2.kiev.ua
COMMENT=    Web-based user interface for the flow-tools NetFlow data

RUN_DEPENDS=    ${SITE_PERL}/GD/Graph/linespoints.pm:${PORTSDIR}/graphics/p5-GD-Graph \
        flow-cat:${PORTSDIR}/net-mgmt/flow-tools

.ifndef WITHOUT_WWWDIR
FLOWVIEWERDIR?= ${PREFIX}/www/flowviewer
.else
FLOWVIEWERDIR?= ${PREFIX}/flowviewer
.endif

PLIST_SUB+= FLOWVIEWERDIR="${FLOWVIEWERDIR:S,^${PREFIX}/,,}"
SUB_LIST+=  "FLOWVIEWERDIR=${FLOWVIEWERDIR}" \
        "PKGNAME=${PKGNAME}"
SUB_FILES=  pkg-message

USE_PERL5=  yes
NO_BUILD=   yes

.if !defined(NOPORTDOCS)
PORTDOC_FILES=  README
.endif

post-patch:
    @${REINPLACE_CMD} -E \
        -e "s|%%PREFIX%%|${PREFIX}|" \
        ${WRKSRC}/FlowViewer_Configuration.pm
    @${REINPLACE_CMD} -E \
        -e "s|%%FLOWVIEWERDIR%%|${FLOWVIEWERDIR}|" \
        ${WRKSRC}/FlowViewer_Configuration.pm

do-install:
    @${MKDIR} ${FLOWVIEWERDIR}
    @${INSTALL_SCRIPT} ${WRKSRC}/FlowGrapher.cgi ${FLOWVIEWERDIR}
    @${INSTALL_SCRIPT} ${WRKSRC}/FlowGrapher_Main.cgi ${FLOWVIEWERDIR}
    @${INSTALL_SCRIPT} ${WRKSRC}/FlowTracker.cgi ${FLOWVIEWERDIR}
    @${INSTALL_SCRIPT} ${WRKSRC}/FlowTracker_Main.cgi ${FLOWVIEWERDIR}
    @${INSTALL_SCRIPT} ${WRKSRC}/FlowViewer.cgi ${FLOWVIEWERDIR}
    @${INSTALL_SCRIPT} ${WRKSRC}/FlowViewer_Main.cgi ${FLOWVIEWERDIR}
    @${INSTALL_SCRIPT} ${WRKSRC}/FlowViewer_Save.cgi ${FLOWVIEWERDIR}
    @${INSTALL_SCRIPT} ${WRKSRC}/FlowTracker_Group.cgi ${FLOWVIEWERDIR}
    @${INSTALL_SCRIPT} ${WRKSRC}/FlowViewer_Utilities.pm ${FLOWVIEWERDIR}
    @${INSTALL_DATA} ${WRKSRC}/FlowViewer_Configuration.pm ${FLOWVIEWERDIR}/FlowViewer_Configuration.pm.dist
    @${INSTALL_SCRIPT} ${WRKSRC}/FlowTracker_Collector ${FLOWVIEWERDIR}
    @${INSTALL_SCRIPT} ${WRKSRC}/FlowTracker_Grapher ${FLOWVIEWERDIR}
    @${INSTALL_DATA} ${WRKSRC}/FlowGrapher_Colors ${FLOWVIEWERDIR}
    @${INSTALL_DATA} ${WRKSRC}/FlowGrapher.png ${FLOWVIEWERDIR}
    @${INSTALL_DATA} ${WRKSRC}/FlowTracker.png ${FLOWVIEWERDIR}
    @${INSTALL_DATA} ${WRKSRC}/FlowViewer.png ${FLOWVIEWERDIR}
    @${MKDIR} ${FLOWVIEWERDIR}/tmp ${FLOWVIEWERDIR}/reports \
    ${FLOWVIEWERDIR}/graphs ${FLOWVIEWERDIR}/tracker
    @${CHOWN} ${WWWOWN}:${WWWGRP} ${FLOWVIEWERDIR}/tmp \
    ${FLOWVIEWERDIR}/reports ${FLOWVIEWERDIR}/graphs \
    ${FLOWVIEWERDIR}/tracker

.if !defined(NOPORTDOCS)
    @${MKDIR} ${DOCSDIR}
    @${INSTALL_DATA} ${WRKSRC}/README ${DOCSDIR}
.endif

post-install:
    ${CAT} ${PKGMESSAGE}

.include <bsd.port.mk>