2007-09-07 14:15:26 +02:00
|
|
|
# Ports collection makefile for: netxms
|
|
|
|
# Date created: Jul 9 2007
|
|
|
|
# Whom: Vladimir Ermakov <samflanker@gmail.com>
|
|
|
|
#
|
|
|
|
# $FreeBSD$
|
|
|
|
#
|
|
|
|
|
|
|
|
PORTNAME= netxms
|
2011-11-19 16:47:32 +01:00
|
|
|
PORTVERSION= 1.0.13
|
2012-03-14 21:41:18 +01:00
|
|
|
PORTREVISION= 2
|
2007-09-07 14:15:26 +02:00
|
|
|
CATEGORIES= net-mgmt
|
2008-09-06 09:12:05 +02:00
|
|
|
MASTER_SITES= http://www.netxms.org/download/
|
2007-09-07 14:15:26 +02:00
|
|
|
|
2009-12-25 03:09:38 +01:00
|
|
|
MAINTAINER= ports@FreeBSD.org
|
2011-10-18 16:19:39 +02:00
|
|
|
COMMENT= Network monitoring system
|
2007-09-07 14:15:26 +02:00
|
|
|
|
2011-10-18 16:19:39 +02:00
|
|
|
LICENSE= GPLv2 LGPL21
|
|
|
|
LICENSE_COMB= multi
|
2007-09-07 14:15:26 +02:00
|
|
|
|
2009-01-13 04:08:02 +01:00
|
|
|
OPTIONS= SERVER "Install NetXMS server & agent" off \
|
2008-06-08 13:48:14 +02:00
|
|
|
CLIENT "Install NetXMS client" on \
|
|
|
|
AGENT "Install NetXMS agent" on \
|
2007-09-07 14:15:26 +02:00
|
|
|
NXHTTPD "Install web-interface" off \
|
|
|
|
MYSQL "Enable MySQL support" off \
|
2007-12-14 00:34:22 +01:00
|
|
|
PGSQL "Enable PostgreSQL support" off \
|
|
|
|
SQLITE "Enable SQLITE support" off \
|
|
|
|
ODBC "Enable ODBC support" off
|
2007-09-07 14:15:26 +02:00
|
|
|
|
2011-10-18 16:19:39 +02:00
|
|
|
NO_PACKAGE= yes
|
|
|
|
|
|
|
|
USE_PERL5= yes
|
|
|
|
USE_OPENSSL= yes
|
|
|
|
USE_ICONV= yes
|
|
|
|
USE_GMAKE= yes
|
|
|
|
GNU_CONFIGURE= yes
|
|
|
|
CONFIGURE_ARGS= --disable-silent-rules
|
|
|
|
USE_LDCONFIG= yes
|
|
|
|
MAKE_JOBS_SAFE= yes
|
|
|
|
|
|
|
|
CPPFLAGS+= -I${LOCALBASE}/include
|
|
|
|
LDFLAGS+= -L${LOCALBASE}/lib
|
|
|
|
|
2007-09-07 14:15:26 +02:00
|
|
|
NETXMS_OWN= netxms
|
|
|
|
NETXMS_GRP= netxms
|
|
|
|
|
|
|
|
.include <bsd.port.pre.mk>
|
|
|
|
|
|
|
|
SUB_FILES= pkg-install pkg-deinstall
|
|
|
|
|
2009-01-13 04:08:02 +01:00
|
|
|
.if defined(WITH_SERVER) || defined(WITH_AGENT) || defined(WITH_CLIENT) || defined(WITH_NXHTTPD)
|
|
|
|
PLIST_SUB+= NXCPTEST=""
|
|
|
|
LIB_DEPENDS+= expat.6:${PORTSDIR}/textproc/expat2
|
|
|
|
.else
|
|
|
|
PLIST_SUB+= NXCPTEST="@comment "
|
|
|
|
.endif
|
|
|
|
|
2007-12-14 00:34:22 +01:00
|
|
|
.if defined(WITH_SERVER) || defined(WITH_CLIENT) || defined(WITH_NXHTTPD)
|
|
|
|
PLIST_SUB+= NXMAP=""
|
|
|
|
.else
|
|
|
|
PLIST_SUB+= NXMAP="@comment "
|
2007-09-07 14:15:26 +02:00
|
|
|
.endif
|
2007-12-14 00:34:22 +01:00
|
|
|
|
|
|
|
.if defined(WITH_CLIENT) || defined(WITH_NXHTTPD)
|
|
|
|
PLIST_SUB+= NXCL=""
|
|
|
|
.else
|
|
|
|
PLIST_SUB+= NXCL="@comment "
|
2007-09-07 14:15:26 +02:00
|
|
|
.endif
|
|
|
|
|
2007-12-14 00:34:22 +01:00
|
|
|
.if !defined(WITH_SERVER)
|
|
|
|
PLIST_SUB+= SERVER="@comment "
|
|
|
|
.if defined(WITH_MYSQL) || !defined(WITHOUT_PGSQL) || !defined(WITHOUT_SQLITE) || !defined(WITHOUT_ODBC)
|
|
|
|
IGNORE= is useless database support without a SERVER. Please (re)run 'make config' and choose SERVER with database
|
2007-09-07 14:15:26 +02:00
|
|
|
.endif
|
2007-12-14 00:34:22 +01:00
|
|
|
.else
|
2007-09-07 14:15:26 +02:00
|
|
|
CONFIGURE_ARGS+= --with-server
|
|
|
|
PLIST_SUB+= SERVER=""
|
2007-12-14 00:34:22 +01:00
|
|
|
.if defined(WITHOUT_MYSQL) && !defined(WITH_PGSQL) && !defined(WITH_SQLITE) && !defined(WITH_ODBC)
|
|
|
|
IGNORE= is useless without a database. Please (re)run 'make config' and choose database support
|
|
|
|
.else
|
|
|
|
USE_RC_SUBR+= netxmsd
|
|
|
|
.if defined(WITH_AGENT)
|
|
|
|
PLIST_SUB+= AGENT="@comment "
|
2007-09-07 14:15:26 +02:00
|
|
|
.else
|
2007-12-14 00:34:22 +01:00
|
|
|
USE_RC_SUBR+= nxagentd
|
|
|
|
.endif
|
|
|
|
.endif
|
2007-09-07 14:15:26 +02:00
|
|
|
.endif
|
|
|
|
|
|
|
|
.if defined(WITH_CLIENT)
|
|
|
|
CONFIGURE_ARGS+= --with-client
|
|
|
|
PLIST_SUB+= CLIENT=""
|
|
|
|
.else
|
|
|
|
PLIST_SUB+= CLIENT="@comment "
|
|
|
|
.endif
|
|
|
|
|
|
|
|
.if defined(WITH_AGENT)
|
|
|
|
USE_RC_SUBR+= nxagentd
|
|
|
|
CONFIGURE_ARGS+= --with-agent
|
|
|
|
PLIST_SUB+= AGENT=""
|
|
|
|
.else
|
|
|
|
PLIST_SUB+= AGENT="@comment "
|
|
|
|
.endif
|
|
|
|
|
|
|
|
.if defined(WITH_NXHTTPD)
|
|
|
|
USE_RC_SUBR+= nxhttpd
|
|
|
|
CONFIGURE_ARGS+= --with-nxhttpd
|
|
|
|
PLIST_SUB+= NXHTTPD=""
|
2007-12-14 00:34:22 +01:00
|
|
|
LIB_DEPENDS+= gd.4:${PORTSDIR}/graphics/gd
|
2008-06-08 13:48:14 +02:00
|
|
|
USE_PERL5= yes
|
2007-09-07 14:15:26 +02:00
|
|
|
.else
|
|
|
|
PLIST_SUB+= NXHTTPD="@comment "
|
|
|
|
.endif
|
|
|
|
|
|
|
|
.if defined(WITH_MYSQL)
|
|
|
|
CONFIGURE_ARGS+= --with-mysql
|
|
|
|
PLIST_SUB+= MYSQL=""
|
|
|
|
USE_MYSQL= yes
|
|
|
|
.else
|
|
|
|
PLIST_SUB+= MYSQL="@comment "
|
|
|
|
.endif
|
|
|
|
|
|
|
|
.if defined(WITH_PGSQL)
|
|
|
|
CONFIGURE_ARGS+= --with-pgsql
|
|
|
|
PLIST_SUB+= PGSQL=""
|
|
|
|
USE_PGSQL= yes
|
|
|
|
.else
|
|
|
|
PLIST_SUB+= PGSQL="@comment "
|
|
|
|
.endif
|
|
|
|
|
2007-12-14 00:34:22 +01:00
|
|
|
.if defined(WITH_SQLITE)
|
|
|
|
CONFIGURE_ARGS+= --with-sqlite
|
|
|
|
PLIST_SUB+= SQLITE=""
|
|
|
|
USE_SQLITE= yes
|
|
|
|
.else
|
|
|
|
PLIST_SUB+= SQLITE="@comment "
|
|
|
|
.endif
|
|
|
|
|
|
|
|
.if defined(WITH_ODBC)
|
|
|
|
CONFIGURE_ARGS+= --with-odbc
|
|
|
|
PLIST_SUB+= ODBC=""
|
2012-02-06 13:25:50 +01:00
|
|
|
LIB_DEPENDS+= odbc.2:${PORTSDIR}/databases/unixODBC
|
2007-12-14 00:34:22 +01:00
|
|
|
.else
|
|
|
|
PLIST_SUB+= ODBC="@comment "
|
|
|
|
.endif
|
|
|
|
|
2007-09-07 14:15:26 +02:00
|
|
|
pre-install:
|
|
|
|
@${SETENV} PKG_PREFIX=${PREFIX} \
|
|
|
|
${SH} ${PKGINSTALL} ${PORTNAME} PRE-INSTALL
|
|
|
|
.if defined(WITH_SERVER)
|
2011-10-18 16:19:39 +02:00
|
|
|
.if !exists(${PREFIX}/etc/netxmsd.conf-dist)
|
|
|
|
${INSTALL_DATA} ${WRKSRC}/contrib/netxmsd.conf-dist ${PREFIX}/etc
|
|
|
|
${CHOWN} ${NETXMS_OWN}:${NETXMS_GRP} ${PREFIX}/etc/netxmsd.conf-dist
|
|
|
|
.endif
|
2007-09-07 14:15:26 +02:00
|
|
|
.endif
|
|
|
|
.if defined(WITH_SERVER) || !defined(WITHOUT_AGENT)
|
2011-10-18 16:19:39 +02:00
|
|
|
.if !exists(${PREFIX}/etc/nxagentd.conf-dist)
|
|
|
|
${INSTALL_DATA} ${WRKSRC}/contrib/nxagentd.conf-dist ${PREFIX}/etc
|
|
|
|
${CHOWN} ${NETXMS_OWN}:${NETXMS_GRP} ${PREFIX}/etc/nxagentd.conf-dist
|
|
|
|
.endif
|
2007-09-07 14:15:26 +02:00
|
|
|
.endif
|
|
|
|
.if defined(WITH_NXHTTPD)
|
2011-10-18 16:19:39 +02:00
|
|
|
.if !exists(${PREFIX}/etc/nxhttpd.conf-dist)
|
|
|
|
${INSTALL_DATA} ${WRKSRC}/contrib/nxhttpd.conf-dist ${PREFIX}/etc
|
|
|
|
${CHOWN} ${NETXMS_OWN}:${NETXMS_GRP} ${PREFIX}/etc/nxhttpd.conf-dist
|
|
|
|
.endif
|
2007-09-07 14:15:26 +02:00
|
|
|
.endif
|
|
|
|
|
|
|
|
post-install:
|
|
|
|
@${SETENV} PKG_PREFIX=${PREFIX} \
|
2011-10-18 16:19:39 +02:00
|
|
|
${SH} ${PKGINSTALL} ${PORTNAME} POST-INSTALL
|
2007-09-07 14:15:26 +02:00
|
|
|
|
|
|
|
.include <bsd.port.post.mk>
|