aboutsummaryrefslogtreecommitdiffstats
path: root/net/flowscan/Makefile
blob: 38b303cffea82b3460cab701d2efd8c4975fe1e1 (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
# New ports collection makefile for:    flowscan
# Date created:         Di  13 Mär 2001 08:23:55 CET
# Whom:                 andreas@freebsd.org
#
# $FreeBSD$
#

PORTNAME=   flowscan
PORTVERSION=    1.006
PORTREVISION=   5
CATEGORIES= net
MASTER_SITES=   http://net.doit.wisc.edu/~plonka/FlowScan/
DISTFILES=  FlowScan-${PORTVERSION}.tar.gz

MAINTAINER= lyngbol@wheel.dk

BUILD_DEPENDS=  ksh:${PORTSDIR}/shells/pdksh \
        rrdtool:${PORTSDIR}/net/rrdtool \
        ${LOCALBASE}/sbin/cflowd:${PORTSDIR}/net/cflowd \
        ${LOCALBASE}/lib/perl5/site_perl/${PERL_VER}/Boulder/Stream.pm:${PORTSDIR}/converters/p5-Boulder \
        ${LOCALBASE}/lib/perl5/site_perl/${PERL_VER}/ConfigReader/DirectiveStyle.pm:${PORTSDIR}/devel/p5-ConfigReader \
        ${LOCALBASE}/lib/perl5/site_perl/${PERL_VER}/HTML/Table.pm:${PORTSDIR}/www/p5-HTML-Table \
        ${LOCALBASE}/lib/perl5/site_perl/${PERL_VER}/${PERL_ARCH}/Cflow.pm:${PORTSDIR}/net/p5-Cflow \
        ${LOCALBASE}/lib/perl5/site_perl/${PERL_VER}/${PERL_ARCH}/Net/Patricia.pm:${PORTSDIR}/net/p5-Net-Patricia
RUN_DEPENDS=    gmake:${PORTSDIR}/devel/gmake

CFLOWD_FLOWSCAN_PATCH=  yes
HAS_CONFIGURE=      yes
CONFIGURE_ARGS+=    --prefix=${PREFIX}/var/db/flows
WRKSRC=         ${WRKDIR}/FlowScan-${PORTVERSION}

pre-install:
    @ ${MKDIR} ${PREFIX}/var/db/flows/bin
    @ ${MKDIR} ${PREFIX}/var/db/flows/graphs

post-install:
    # sample startup script
    @ ${INSTALL_SCRIPT} ${FILESDIR}/flowscan.sh \
         ${PREFIX}/etc/rc.d/cflowd-flowscan.sh.sample
    # overwrite cflowd startup script, since we need some additional
    # parameters !
    @ ${INSTALL_SCRIPT} ${FILESDIR}/cflowd.sh \
        ${PREFIX}/etc/rc.d/cflowd-base.sh.sample
    # sample Makefile to generate graphs
    @ ${INSTALL_DATA} ${WRKSRC}/graphs.mf \
        ${PREFIX}/var/db/flows/graphs/Makefile.sample
    # sample config files
.for i in   CampusIO.cf Napster_subnets.boulder SubNetIO.cf flowscan.cf \
        local_nets.boulder our_subnets.boulder
    @ ${INSTALL_DATA} ${WRKSRC}/cf/${i} \
        ${PREFIX}/var/db/flows/bin/${i}.sample
.endfor
    # important docu files
    @ ${MKDIR} ${PREFIX}/share/doc/flowscan
    @ ${INSTALL_DATA} ${WRKSRC}/example/crontab \
        ${PREFIX}/share/doc/flowscan/crontab.sample
    @ ${INSTALL_DATA} ${WRKSRC}/rc/linux/cflowd \
        ${PREFIX}/share/doc/flowscan/cflowd.sample
    @ ${INSTALL_DATA} ${WRKSRC}/rc/linux/flowscan \
        ${PREFIX}/share/doc/flowscan/flowscan.sample
    @ ${INSTALL_DATA} ${WRKSRC}/INSTALL ${PREFIX}/share/doc/flowscan
    # less important docu files
.if !defined(NOPORTDOCS)
    @ ${ECHO_MSG} "===>   Installing documentation for ${PKGNAME}"
.for i in   README README.html INSTALL.html TODO
    @ ${INSTALL_DATA} ${WRKSRC}/${i} ${PREFIX}/share/doc/flowscan
.endfor
.endif
    # info
    @ ${CAT} ${.CURDIR}/pkg-message

.include <bsd.port.mk>