2013-04-23 16:20:25 +02:00
|
|
|
# Created by: Jim Riggs <ports@christianserving.org>
|
2009-12-13 23:30:18 +01:00
|
|
|
# $FreeBSD$
|
|
|
|
|
2012-08-15 16:28:31 +02:00
|
|
|
PORTNAME= zabbix2
|
2015-01-03 19:10:45 +01:00
|
|
|
PORTVERSION= 2.0.14
|
2014-11-09 12:34:23 +01:00
|
|
|
PORTREVISION?= 0
|
2009-12-13 23:30:18 +01:00
|
|
|
CATEGORIES= net-mgmt
|
|
|
|
MASTER_SITES= SF/zabbix/ZABBIX%20Latest%20Stable/${PORTVERSION}
|
|
|
|
PKGNAMESUFFIX?= -server
|
2012-08-15 16:28:31 +02:00
|
|
|
DISTNAME= zabbix-${PORTVERSION}
|
2009-12-13 23:30:18 +01:00
|
|
|
|
2012-08-15 16:28:31 +02:00
|
|
|
MAINTAINER= pakhom706@gmail.com
|
2009-12-13 23:30:18 +01:00
|
|
|
COMMENT= Enterprise-class open source distributed monitoring (${PKGNAMESUFFIX:S/^-//})
|
|
|
|
|
2011-04-22 17:07:36 +02:00
|
|
|
LICENSE= GPLv2
|
|
|
|
|
2012-08-15 16:28:31 +02:00
|
|
|
CONFLICTS= ${PKGBASE}-1.[0-8]*
|
2009-12-13 23:30:18 +01:00
|
|
|
|
2013-12-16 07:02:22 +01:00
|
|
|
IGNORE_WITH_MYSQL= 41
|
|
|
|
|
2009-12-13 23:30:18 +01:00
|
|
|
.if ${PKGNAMESUFFIX} != "-agent"
|
2012-08-15 16:28:31 +02:00
|
|
|
CONFLICTS+= ${PORTNAME}-1.[0-8]*
|
2009-12-13 23:30:18 +01:00
|
|
|
.endif
|
|
|
|
|
|
|
|
ZABBIX_BUILD= ${PKGNAMESUFFIX:S/^-//}
|
|
|
|
|
|
|
|
.if ${ZABBIX_BUILD} != "frontend" # frontend only needs the version/distribution settings
|
|
|
|
.if ${ZABBIX_BUILD} != "agent"
|
2012-08-15 16:28:31 +02:00
|
|
|
USE_RC_SUBR= zabbix_${ZABBIX_BUILD}
|
2009-12-13 23:30:18 +01:00
|
|
|
.else
|
2012-08-15 16:28:31 +02:00
|
|
|
USE_RC_SUBR= zabbix_${ZABBIX_BUILD}d
|
2009-12-13 23:30:18 +01:00
|
|
|
.endif
|
|
|
|
|
2013-04-27 13:59:28 +02:00
|
|
|
USES= pkgconfig iconv
|
2012-08-15 16:28:31 +02:00
|
|
|
|
2009-12-13 23:30:18 +01:00
|
|
|
USERS= zabbix
|
|
|
|
GROUPS= zabbix
|
|
|
|
|
2012-08-15 16:28:31 +02:00
|
|
|
.if ${ZABBIX_BUILD} != "proxy"
|
|
|
|
PLIST_SUB= PROXY="@comment "
|
|
|
|
.else
|
|
|
|
PLIST_SUB= PROXY=""
|
|
|
|
.endif
|
|
|
|
|
2013-05-09 00:05:49 +02:00
|
|
|
.if ${ZABBIX_BUILD} == "server"
|
|
|
|
PLIST_SUB+= SERVER=""
|
|
|
|
.else
|
|
|
|
PLIST_SUB+= SERVER="@comment "
|
|
|
|
.endif
|
|
|
|
|
2013-09-23 16:26:59 +02:00
|
|
|
PLIST_SUB+= ZABBIX_BUILD=${ZABBIX_BUILD} PORTVERSION=${PORTVERSION}
|
2009-12-18 17:10:14 +01:00
|
|
|
SUB_LIST= ZABBIX_BUILD=${ZABBIX_BUILD} ZABBIX_REQUIRE=${ZABBIX_REQUIRE}
|
2009-12-13 23:30:18 +01:00
|
|
|
|
|
|
|
MAKE_ARGS+= ARCH=freebsd
|
|
|
|
GNU_CONFIGURE= yes
|
2012-08-15 16:28:31 +02:00
|
|
|
CONFIGURE_ARGS+= --enable-${ZABBIX_BUILD} \
|
|
|
|
--sysconfdir=${ETCDIR} \
|
|
|
|
--datadir=${ETCDIR}
|
2009-12-13 23:30:18 +01:00
|
|
|
|
|
|
|
.if ${ZABBIX_BUILD} != "agent"
|
2014-04-22 20:14:34 +02:00
|
|
|
LIB_DEPENDS= libnetsnmp.so:${PORTSDIR}/net-mgmt/net-snmp \
|
|
|
|
libexecinfo.so:${PORTSDIR}/devel/libexecinfo
|
2009-12-18 17:10:14 +01:00
|
|
|
|
|
|
|
SUB_FILES= pkg-message
|
|
|
|
|
|
|
|
CONFIGURE_ARGS+= --with-net-snmp
|
|
|
|
|
2009-12-13 23:30:18 +01:00
|
|
|
OPTIONSFILE= ${PORT_DBDIR}/${PORTNAME}${PKGNAMESUFFIX}/options
|
2012-08-15 16:28:31 +02:00
|
|
|
|
2014-05-09 22:14:47 +02:00
|
|
|
OPTIONS_DEFINE= IPV6 FPING JABBER CURL LDAP IPMI SSH NMAP JAVAGW
|
2014-07-19 00:47:39 +02:00
|
|
|
OPTIONS_DEFAULT= MYSQL IPV6 FPING JABBER CURL UNIXODBC
|
|
|
|
OPTIONS_SUB= yes
|
2012-08-15 16:28:31 +02:00
|
|
|
|
|
|
|
CURL_DESC= Support for web monitoring
|
|
|
|
FPING_DESC= Build/install fping for ping checks
|
|
|
|
IPMI_DESC= Support for IPMI checks
|
|
|
|
JABBER_DESC= Support for Jabber media type
|
|
|
|
LDAP_DESC= Support for LDAP server checks
|
|
|
|
NMAP_DESC= Build/install nmap for o/s detection
|
|
|
|
SSH_DESC= Support for SSH-based checks
|
2012-12-13 04:58:50 +01:00
|
|
|
JAVAGW_DESC= Support for Java gateway
|
2014-07-19 00:47:39 +02:00
|
|
|
ODBC_DESC= Support for database checks via ODBC
|
2012-08-15 16:28:31 +02:00
|
|
|
|
2014-07-19 00:47:39 +02:00
|
|
|
OPTIONS_SINGLE= DB ODBC
|
|
|
|
OPTIONS_SINGLE_DB= MYSQL PGSQL SQLITE ORACLE
|
|
|
|
OPTIONS_SINGLE_ODBC= IODBC UNIXODBC
|
2009-12-13 23:30:18 +01:00
|
|
|
|
2014-07-19 00:47:39 +02:00
|
|
|
MYSQL_CONFIGURE_WITH= mysql
|
|
|
|
MYSQL_USE= MYSQL=yes
|
2009-12-13 23:30:18 +01:00
|
|
|
|
2014-07-19 00:47:39 +02:00
|
|
|
PGSQL_CONFIGURE_WITH= postgresql
|
|
|
|
PGSQL_USES= pgsql
|
2012-08-15 16:28:31 +02:00
|
|
|
|
2014-07-19 00:47:39 +02:00
|
|
|
SQLITE_CONFIGURE_WITH= sqlite3
|
|
|
|
SQLITE_USE= SQLITE=3
|
2012-08-15 16:28:31 +02:00
|
|
|
|
2014-07-19 00:47:39 +02:00
|
|
|
ORACLE_CONFIGURE_WITH= oracle
|
2009-12-13 23:30:18 +01:00
|
|
|
|
2014-07-19 00:47:39 +02:00
|
|
|
CURL_CONFIGURE_WITH= libcurl
|
|
|
|
CURL_LIB_DEPENDS= libcurl.so:${PORTSDIR}/ftp/curl
|
2013-12-16 07:02:22 +01:00
|
|
|
|
2014-07-19 00:47:39 +02:00
|
|
|
LDAP_CONFIGURE_WITH= ldap
|
|
|
|
LDAP_USE= OPENLDAP=yes
|
2010-08-23 22:15:43 +02:00
|
|
|
|
2014-07-19 00:47:39 +02:00
|
|
|
IPMI_CONFIGURE_WITH= openipmi
|
|
|
|
IPMI_LIB_DEPENDS= libOpenIPMI.so:${PORTSDIR}/sysutils/openipmi
|
2009-12-13 23:30:18 +01:00
|
|
|
|
2014-07-19 00:47:39 +02:00
|
|
|
JABBER_CONFIGURE_WITH= jabber
|
|
|
|
JABBER_LIB_DEPENDS= libiksemel.so:${PORTSDIR}/textproc/iksemel
|
2010-06-30 21:43:40 +02:00
|
|
|
|
2014-07-19 00:47:39 +02:00
|
|
|
FPING_RUN_DEPENDS= fping:${PORTSDIR}/net/fping
|
2009-12-13 23:30:18 +01:00
|
|
|
|
2014-07-19 00:47:39 +02:00
|
|
|
SSH_CONFIGURE_WITH= ssh2
|
|
|
|
SSH_LIB_DEPENDS= libssh2.so:${PORTSDIR}/security/libssh2
|
2010-04-02 14:08:29 +02:00
|
|
|
|
2014-07-19 00:47:39 +02:00
|
|
|
IODBC_CONFIGURE_WITH= iodbc
|
|
|
|
IODBC_LIB_DEPENDS= libiodbc.so:${PORTSDIR}/databases/libiodbc
|
2010-08-23 22:15:43 +02:00
|
|
|
|
2014-07-19 00:47:39 +02:00
|
|
|
UNIXODBC_CONFIGURE_WITH= unixodbc
|
|
|
|
UNIXODBC_LIB_DEPENDS= libodbc.so:${PORTSDIR}/databases/unixODBC
|
2009-12-13 23:30:18 +01:00
|
|
|
.endif # if ${ZABBIX_BUILD} != "agent"
|
|
|
|
|
2014-07-19 00:47:39 +02:00
|
|
|
IPV6_CONFIGURE_ENABLE= ipv6
|
2009-12-13 23:30:18 +01:00
|
|
|
|
2014-07-19 00:47:39 +02:00
|
|
|
NMAP_RUN_DEPENDS= nmap:${PORTSDIR}/security/nmap \
|
|
|
|
sudo:${PORTSDIR}/security/sudo
|
2012-08-15 16:28:31 +02:00
|
|
|
|
2014-07-19 00:47:39 +02:00
|
|
|
JAVAGW_CONFIGURE_ENABLE= java
|
|
|
|
JAVAGW_USE= JAVA=yes
|
|
|
|
|
|
|
|
.include <bsd.port.options.mk>
|
2012-12-13 04:58:50 +01:00
|
|
|
|
2009-12-13 23:30:18 +01:00
|
|
|
post-patch:
|
|
|
|
@${GREP} -rl "/etc/zabbix" ${WRKSRC} \
|
2011-10-15 03:26:35 +02:00
|
|
|
| ${XARGS} ${REINPLACE_CMD} -e 's#/etc/zabbix#${ETCDIR}#g'
|
2012-08-15 16:28:31 +02:00
|
|
|
@${REINPLACE_CMD} -e 's#/usr/sbin/fping#${LOCALBASE}/sbin/fping#g' ${WRKSRC}/conf/zabbix_*.conf
|
2009-12-13 23:30:18 +01:00
|
|
|
|
|
|
|
.if ${ZABBIX_BUILD} != "agent"
|
2012-08-15 16:28:31 +02:00
|
|
|
.for d in mysql oracle postgresql sqlite3
|
|
|
|
@${REINPLACE_CMD} -e 's|/bin/ping|/sbin/ping|g; \
|
2013-12-16 07:02:22 +01:00
|
|
|
s|/usr/bin/traceroute|/usr/sbin/traceroute|g; \
|
|
|
|
s|sudo /usr/bin/nmap|sudo ${LOCALBASE}/bin/nmap|g;' \
|
|
|
|
${WRKSRC}/database/${d}/data.sql
|
2012-08-15 16:28:31 +02:00
|
|
|
.endfor
|
|
|
|
.endif
|
|
|
|
@${REINPLACE_CMD} -Ee 's|(@sysconfdir@/(\$$\([A-Z]*_CONFIG\)))" ([|][|] cp "../../conf/\$$\([A-Z]*_CONFIG\)" "\$$\(DESTDIR\)@sysconfdir@)"|\1.sample" \3/\2.sample"|;' \
|
|
|
|
${WRKSRC}/src/zabbix_${ZABBIX_BUILD}/Makefile.in
|
|
|
|
@${FIND} ${WRKSRC} -type f \( -name '*.bak' -or -name '*.orig' \) -exec ${RM} -f {} +
|
2009-12-13 23:30:18 +01:00
|
|
|
|
|
|
|
post-install:
|
2014-07-19 00:47:39 +02:00
|
|
|
.if ${PORT_OPTIONS:MJAVAGW}
|
|
|
|
@${MV} ${STAGEDIR}${PREFIX}/sbin/zabbix_java/settings.sh ${STAGEDIR}${PREFIX}/sbin/zabbix_java/settings.sh.sample
|
2013-12-16 07:02:22 +01:00
|
|
|
.endif
|
|
|
|
|
2009-12-13 23:30:18 +01:00
|
|
|
.if ${ZABBIX_BUILD} != "agent"
|
2014-04-22 20:14:34 +02:00
|
|
|
@${MKDIR} "${STAGEDIR}${DATADIR}/${ZABBIX_BUILD}/database"
|
|
|
|
@cd ${WRKSRC}/upgrades/ && ${COPYTREE_SHARE} dbpatches ${STAGEDIR}${DATADIR}/${ZABBIX_BUILD}/upgrades/
|
|
|
|
@cd ${WRKSRC}/database/ && ${COPYTREE_SHARE} "ibm_db2 mysql oracle postgresql sqlite3" ${STAGEDIR}${DATADIR}/${ZABBIX_BUILD}/database/
|
2009-12-13 23:30:18 +01:00
|
|
|
.endif
|
|
|
|
.endif # if ${ZABBIX_BUILD} != "frontend"
|
|
|
|
|
|
|
|
.include <bsd.port.mk>
|