aboutsummaryrefslogtreecommitdiffstats
path: root/net-mgmt/netsaint/Makefile
blob: 5ed3cc35d12049ea233a24f722aa59359e477187 (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
# New ports collection makefile for:    netsaint
# Date created:             Wed 12 Jul 2000
# Whom:                 will
#
# $FreeBSD$
#

PORTNAME=   netsaint
PORTVERSION=    0.0.7
PORTREVISION=   4
PORTEPOCH=  1
CATEGORIES= net
MASTER_SITES=   http://netsaint.sourceforge.net/download/ \
        ${MASTER_SITE_LOCAL}
MASTER_SITE_SUBDIR=dwcjr
DISTFILES=  ${PORTNAME}-${PORTVERSION}${EXTRACT_SUFX} netsaint-graphics.tar.gz

MAINTAINER= ports@FreeBSD.org
COMMENT=    Extremely powerful network monitoring system

LIB_DEPENDS=    gd.4:${PORTSDIR}/graphics/gd
RUN_DEPENDS=    ${LOCALBASE}/libexec/netsaint/check_netsaint:${PORTSDIR}/net/netsaint-plugins

USE_PERL5=  yes
USE_GETOPT_LONG=    yes
GNU_CONFIGURE=  yes
CONFIGURE_ARGS= --with-command-user=netsaint \
        --with-command-grp=www \
        --with-gd-lib=${LOCALBASE}/lib \
        --with-gd-inc=${LOCALBASE}/include \
        --with-netsaint-user=netsaint \
        --with-netsaint-grp=netsaint \
        --sbindir=${PREFIX}/share/netsaint/sbin \
        --libexecdir=${PREFIX}/libexec/netsaint \
        --datadir=${PREFIX}/share/netsaint \
        --sysconfdir=${PREFIX}/etc/netsaint \
        --localstatedir=${PREFIX}/var/netsaint
INSTALL_TARGET= all install config install-config install-daemoninit install-commandmode

.if defined(WITH_MYSQL)
USE_MYSQL=  YES
CONFIGURE_ARGS+=--with-mysql-lib=${LOCALBASE}/lib/mysql \
        --with-mysql-inc=${LOCALBASE}/include/mysql \
        --with-mysql-xdata
.endif

.if defined(WITH_POSTGRES)
POSTGRESQL_PORT?=   databases/postgresql7
LIB_DEPENDS+=   pq.3:${PORTSDIR}/${POSTGRESQL_PORT}
CONFIGURE_ARGS+=--with-pgsql-lib=${LOCALBASE}/pgsql \
        --with-pgsql-inc=${LOCALBASE}/pgsql \
        --with-pgsql-xdata
.endif

pre-fetch:
    @${SH} ${SCRIPTDIR}/checkps

pre-install:
    @PKG_PREFIX="${PREFIX}" ${SH} ${PKGINSTALL} ${PKGNAME} PRE-INSTALL

post-install:
.for i in bsd_logofullsize.gif bsd_sblogo.gif
    ${INSTALL_DATA} ${WRKDIR}/netsaint-0.0.7b6/html/images/$i ${PREFIX}/share/${PORTNAME}/images/
.endfor

.include <bsd.port.mk>