2013-05-04 23:09:19 +02:00
|
|
|
# Created by: Vladimir Ermakov <samflanker@gmail.com>
|
2007-09-07 14:15:26 +02:00
|
|
|
# $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
|
|
|
|
2012-03-17 06:21:05 +01:00
|
|
|
MAINTAINER= 5u623l20@gmail.com
|
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
|
|
|
|
2012-03-17 06:21:05 +01:00
|
|
|
PORTSCOUT= limit:^1\.0\.[0-9]* # 1.1.X branch is Development Branch
|
|
|
|
|
2013-05-04 23:09:19 +02:00
|
|
|
OPTIONS_DEFINE= SERVER CLIENT AGENT NXHTTPD MYSQL PGSQL SQLITE ODBC
|
|
|
|
OPTIONS_DEFAULT= CLIENT AGENT
|
|
|
|
SERVER_DESC= Install NetXMS server & agent
|
|
|
|
CLIENT_DESC= Install NetXMS client
|
|
|
|
AGENT_DESC= Install NetXMS agent
|
|
|
|
NXHTTPD_DESC= Install web-interface
|
|
|
|
|
|
|
|
BROKEN= Does not fetch
|
2007-09-07 14:15:26 +02:00
|
|
|
|
2011-10-18 16:19:39 +02:00
|
|
|
NO_PACKAGE= yes
|
|
|
|
|
|
|
|
USE_OPENSSL= yes
|
2013-09-17 08:12:35 +02:00
|
|
|
USES= iconv gmake perl5
|
2011-10-18 16:19:39 +02:00
|
|
|
GNU_CONFIGURE= yes
|
|
|
|
CONFIGURE_ARGS= --disable-silent-rules
|
|
|
|
USE_LDCONFIG= yes
|
|
|
|
|
|
|
|
CPPFLAGS+= -I${LOCALBASE}/include
|
|
|
|
LDFLAGS+= -L${LOCALBASE}/lib
|
|
|
|
|
2007-09-07 14:15:26 +02:00
|
|
|
NETXMS_OWN= netxms
|
|
|
|
NETXMS_GRP= netxms
|
|
|
|
|
2013-09-21 00:24:43 +02:00
|
|
|
NO_STAGE= yes
|
2007-09-07 14:15:26 +02:00
|
|
|
.include <bsd.port.pre.mk>
|
|
|
|
|
|
|
|
SUB_FILES= pkg-install pkg-deinstall
|
|
|
|
|
2013-05-04 23:09:19 +02:00
|
|
|
.if ${PORT_OPTIONS:MSERVER} || ${PORT_OPTIONS:MAGENT} || ${PORT_OPTIONS:MCLIENT} || ${PORT_OPTIONS:MNXHTTPD}
|
2009-01-13 04:08:02 +01:00
|
|
|
PLIST_SUB+= NXCPTEST=""
|
|
|
|
LIB_DEPENDS+= expat.6:${PORTSDIR}/textproc/expat2
|
|
|
|
.else
|
|
|
|
PLIST_SUB+= NXCPTEST="@comment "
|
|
|
|
.endif
|
|
|
|
|
2013-05-04 23:09:19 +02:00
|
|
|
.if ${PORT_OPTIONS:MSERVER} || ${PORT_OPTIONS:MCLIENT} || ${PORT_OPTIONS:MNXHTTPD}
|
2007-12-14 00:34:22 +01:00
|
|
|
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
|
|
|
|
2013-05-04 23:09:19 +02:00
|
|
|
.if ${PORT_OPTIONS:MCLIENT} || ${PORT_OPTIONS:MNXHTTPD}
|
2007-12-14 00:34:22 +01:00
|
|
|
PLIST_SUB+= NXCL=""
|
|
|
|
.else
|
|
|
|
PLIST_SUB+= NXCL="@comment "
|
2007-09-07 14:15:26 +02:00
|
|
|
.endif
|
|
|
|
|
2013-05-04 23:09:19 +02:00
|
|
|
.if ! ${PORT_OPTIONS:MSERVER}
|
2007-12-14 00:34:22 +01:00
|
|
|
PLIST_SUB+= SERVER="@comment "
|
2013-05-04 23:09:19 +02:00
|
|
|
.if ${PORT_OPTIONS:MMYSQL} || ${PORT_OPTIONS:MPGSQL} || ${PORT_OPTIONS:MSQLITE} || ${PORT_OPTIONS:MODBC}
|
2007-12-14 00:34:22 +01:00
|
|
|
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=""
|
2013-05-04 23:09:19 +02:00
|
|
|
.if ! ${PORT_OPTIONS:MMYSQL} && ! ${PORT_OPTIONS:MPGSQL} && ! ${PORT_OPTIONS:MSQLITE} && ! ${PORT_OPTIONS:MODBC}
|
2007-12-14 00:34:22 +01:00
|
|
|
IGNORE= is useless without a database. Please (re)run 'make config' and choose database support
|
|
|
|
.else
|
|
|
|
USE_RC_SUBR+= netxmsd
|
2013-05-04 23:09:19 +02:00
|
|
|
.if ${PORT_OPTIONS:MAGENT}
|
2007-12-14 00:34:22 +01:00
|
|
|
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
|
|
|
|
|
2013-05-04 23:09:19 +02:00
|
|
|
.if ${PORT_OPTIONS:MCLIENT}
|
2007-09-07 14:15:26 +02:00
|
|
|
CONFIGURE_ARGS+= --with-client
|
|
|
|
PLIST_SUB+= CLIENT=""
|
|
|
|
.else
|
|
|
|
PLIST_SUB+= CLIENT="@comment "
|
|
|
|
.endif
|
|
|
|
|
2013-05-04 23:09:19 +02:00
|
|
|
.if ${PORT_OPTIONS:MAGENT}
|
2007-09-07 14:15:26 +02:00
|
|
|
USE_RC_SUBR+= nxagentd
|
|
|
|
CONFIGURE_ARGS+= --with-agent
|
|
|
|
PLIST_SUB+= AGENT=""
|
|
|
|
.else
|
|
|
|
PLIST_SUB+= AGENT="@comment "
|
|
|
|
.endif
|
|
|
|
|
2013-05-04 23:09:19 +02:00
|
|
|
.if ${PORT_OPTIONS:MNXHTTPD}
|
2007-09-07 14:15:26 +02:00
|
|
|
USE_RC_SUBR+= nxhttpd
|
|
|
|
CONFIGURE_ARGS+= --with-nxhttpd
|
|
|
|
PLIST_SUB+= NXHTTPD=""
|
2013-08-09 16:05:52 +02:00
|
|
|
LIB_DEPENDS+= gd:${PORTSDIR}/graphics/gd
|
2007-09-07 14:15:26 +02:00
|
|
|
.else
|
|
|
|
PLIST_SUB+= NXHTTPD="@comment "
|
|
|
|
.endif
|
|
|
|
|
2013-05-04 23:09:19 +02:00
|
|
|
.if ${PORT_OPTIONS:MMYSQL}
|
2007-09-07 14:15:26 +02:00
|
|
|
CONFIGURE_ARGS+= --with-mysql
|
|
|
|
PLIST_SUB+= MYSQL=""
|
|
|
|
USE_MYSQL= yes
|
|
|
|
.else
|
|
|
|
PLIST_SUB+= MYSQL="@comment "
|
|
|
|
.endif
|
|
|
|
|
2013-05-04 23:09:19 +02:00
|
|
|
.if ${PORT_OPTIONS:MPGSQL}
|
2007-09-07 14:15:26 +02:00
|
|
|
CONFIGURE_ARGS+= --with-pgsql
|
|
|
|
PLIST_SUB+= PGSQL=""
|
|
|
|
USE_PGSQL= yes
|
|
|
|
.else
|
|
|
|
PLIST_SUB+= PGSQL="@comment "
|
|
|
|
.endif
|
|
|
|
|
2013-05-04 23:09:19 +02:00
|
|
|
.if ${PORT_OPTIONS:MSQLITE}
|
2007-12-14 00:34:22 +01:00
|
|
|
CONFIGURE_ARGS+= --with-sqlite
|
|
|
|
PLIST_SUB+= SQLITE=""
|
|
|
|
USE_SQLITE= yes
|
|
|
|
.else
|
|
|
|
PLIST_SUB+= SQLITE="@comment "
|
|
|
|
.endif
|
|
|
|
|
2013-05-04 23:09:19 +02:00
|
|
|
.if ${PORT_OPTIONS:MODBC}
|
2007-12-14 00:34:22 +01:00
|
|
|
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
|
2013-05-04 23:09:19 +02:00
|
|
|
.if ${PORT_OPTIONS:MSERVER}
|
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
|
2013-05-04 23:09:19 +02:00
|
|
|
.if ${PORT_OPTIONS:MSERVER} || ${PORT_OPTIONS:MAGENT}
|
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
|
2013-05-04 23:09:19 +02:00
|
|
|
.if ${PORT_OPTIONS:MNXHTTPD}
|
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>
|