aboutsummaryrefslogtreecommitdiff
path: root/net-mgmt/ourmon/Makefile
blob: c5ca21d3a9a56171f5c24890e03d79749c831119 (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
# New ports collection makefile for:    ourmon
# Date created: 01 May 2005
# Whom:         Charlie Schluting <manos@cs.pdx.edu>
#
# $FreeBSD$

PORTNAME=       ourmon
PORTVERSION=    2.5
PORTREVISION=    1
CATEGORIES=     net-mgmt
MASTER_SITES=   http://ourmon.cat.pdx.edu/ourmon/
DISTNAME=       ourmon25

MAINTAINER=     manos@cs.pdx.edu
COMMENT=        A libpcap-based network monitoring and anomaly detection system

BUILD_DEPENDS=  ${LOCALBASE}/lib/libpcap.a:${PORTSDIR}/net/libpcap
LIB_DEPENDS=    gd:$(PORTSDIR)/graphics/gd
RUN_DEPENDS=    rrdtool:$(PORTSDIR)/net/rrdtool

#IS_INTERACTIVE= yes
WRKSRC=         ${WRKDIR}/mrourmon
USE_PERL5=	yes
NO_INSTALL_MANPAGES=	yes
#NO_PACKAGE=	yes
NO_BUILD=	yes

# where to install ourmon and also
# where we build the ourmon runtime-script with configure.pl
# note: we use the work directory simply for unpacking

# make simply states assumptions, unpacks the system, and puts it in PREFIX
pre-build:
	@${ECHO_MSG} "install dir is PREFIX=\"${PREFIX}/mrourmon\""
	@${ECHO_MSG} "We do not install apache or some other web server for you.
	@${ECHO_MSG} "You should know where your apache docs directory is before make install."
	@${ECHO_MSG} "You should also know which network interface you want ourmon to use."
	@${ECHO_MSG}
	@${ECHO_MSG} "Ourmon may be installed on one CPU or two.  If you"
	@${ECHO_MSG} "are only installing the front-end probe, you do"
	@${ECHO_MSG} "not need Apache, hence we do not install it."
	@${ECHO_MSG} "If you are installing the back-end graphics engine"
	@${ECHO_MSG} "(which needs a web server) do install Apache first, and note"
	@${ECHO_MSG} "where the htdocs web directory lives.  You will need"
	@${ECHO_MSG} "that for ourmon configuration.  If you simply"
	@${ECHO_MSG} "want to install ourmon with both front-end and back-end"
	@${ECHO_MSG} "on one CPU, then install Apache first on that machine."
	@${ECHO_MSG}

pre-install:
.if exists(${PREFIX}/etc/ourmon.conf)
	${MV} ${PREFIX}/etc/ourmon.conf ${PREFIX}/etc/ourmon.conf.old
.endif
	$(CP) -R ${WRKSRC} ${PREFIX}

# make install compiles and configures the system installing
# all binaries in the local PREFIX/bin as well as asking
# the user if he/she wants to install system start scripts
# and modify /etc/crontab

do-install:
	cd ${PREFIX}/mrourmon && ${PERL5} configure.pl ${PREFIX}

post-install:
	@${ECHO_MSG} "Ourmon is installed in ${PREFIX}"
	@${ECHO_MSG}
	@${CAT} ${PKGMESSAGE}
	@${ECHO_MSG}

.include <bsd.port.mk>