diff options
author | Andrew Pantyukhin <sat@FreeBSD.org> | 2007-06-13 13:53:11 +0000 |
---|---|---|
committer | Andrew Pantyukhin <sat@FreeBSD.org> | 2007-06-13 13:53:11 +0000 |
commit | 283d436a2ed45cc0fdc29617f9fc3a43ed3120a1 (patch) | |
tree | f2b1444968dba0df35e639d90a6ef41e1fdea175 /net-mgmt/zabbix2/Makefile | |
parent | a09dfc79ecacabdba8e10edb88e236a3b868cca7 (diff) |
Notes
Diffstat (limited to 'net-mgmt/zabbix2/Makefile')
-rw-r--r-- | net-mgmt/zabbix2/Makefile | 126 |
1 files changed, 40 insertions, 86 deletions
diff --git a/net-mgmt/zabbix2/Makefile b/net-mgmt/zabbix2/Makefile index 25b4798b0e95..012b175458b0 100644 --- a/net-mgmt/zabbix2/Makefile +++ b/net-mgmt/zabbix2/Makefile @@ -6,8 +6,7 @@ # PORTNAME= zabbix -PORTVERSION= 1.1.7 -PORTREVISION= 1 +PORTVERSION= 1.4 PORTEPOCH= 1 CATEGORIES= net-mgmt MASTER_SITES= SF @@ -15,79 +14,52 @@ MASTER_SITES= SF MAINTAINER= ports@FreeBSD.org COMMENT= Application and network monitoring solution -.ifdef(ZABBIX_AGENT_ONLY) -PKGNAMESUFFIX= -agent -CATEGORIES= net -CONFLICTS= zabbix-[0-9]* -.else -CONFLICTS= zabbix-agent-[0-9]* -OPTIONS= PGSQL "Use a PostgreSQL backend" off \ - MYSQL "Use a MySQL backend" on \ +LIB_DEPENDS= netsnmp.10:${PORTSDIR}/net-mgmt/net-snmp \ + iksemel.3:${PORTSDIR}/textproc/iksemel \ + curl.4:${PORTSDIR}/ftp/curl + +OPTIONS= MYSQL "Use MySQL backend" on \ + PGSQL "Use PostgreSQL backend" off \ + SQLITE "Use SQLite backend" off \ + LDAP "Support for checking LDAP servers" on \ FPING "Use fping for pinging hosts" on -.endif USE_GMAKE= yes -CONFIGURE_ARGS+=--enable-agent -.ifdef(ZABBIX_AGENT_ONLY) -PKGNAMESUFFIX= -agent -PLIST= "" -.else # ZABBIX_AGENT_ONLY -CONFIGURE_ARGS+=--enable-server -# TODO add snmp knob -LIB_DEPENDS= netsnmp.10:${PORTSDIR}/net-mgmt/net-snmp -USE_PHP= gd snmp sockets pcre +USE_PHP= gd snmp sockets pcre bcmath +USE_RC_SUBR= zabbix_server.sh +GNU_CONFIGURE= yes +CONFIGURE_ARGS= --disable-agent --enable-server --with-net-snmp --with-jabber +MAKE_ARGS= ARCH=freebsd SUB_FILES= pkg-message -.endif # ZABBIX_AGENT_ONLY .include <bsd.port.pre.mk> -.ifndef(WITHOUT_FPING) -RUN_DEPENDS+= fping:${PORTSDIR}/net/fping +.ifndef WITHOUT_LDAP +USE_OPENLDAP= yes +CONFIGURE_ARGS+=--with-ldap +LIB_DEPENDS+= gnutls.15:${PORTSDIR}/security/gnutls \ + sasl2.2:${PORTSDIR}/security/cyrus-sasl2 .endif - -.ifndef(ZABBIX_AGENT_ONLY) -.ifndef(WITH_PGSQL) -.ifdef(WITHOUT_MYSQL) -IGNORE= you should configure to use either a MySQL or PostgreSQL backend -.endif -.endif - -.ifdef(WITH_PGSQL) -USE_PGSQL= yes -CONFIGURE_ARGS+=--with-pgsql -RUN_DEPENDS+= ${LOCALBASE}/lib/php/${PHP_EXT_DIR}/pgsql.so:${PORTSDIR}/${pgsql_DEPENDS} +.ifndef WITHOUT_FPING +RUN_DEPENDS+= fping:${PORTSDIR}/net/fping .endif -.ifndef(WITHOUT_MYSQL) -USE_MYSQL= yes +.ifndef WITHOUT_MYSQL +USE_PHP+= mysql CONFIGURE_ARGS+=--with-mysql -RUN_DEPENDS+= ${LOCALBASE}/lib/php/${PHP_EXT_DIR}/mysql.so:${PORTSDIR}/${mysql_DEPENDS} -.endif -CONFIGURE_ARGS+=--with-net-snmp -.endif # ZABBIX_AGENT_ONLY - -USE_RC_SUBR= zabbix_agentd.sh -.ifndef(ZABBIX_AGENT_ONLY) -USE_RC_SUBR+= zabbix_server.sh -.endif - -GNU_CONFIGURE= yes -CONFIGURE_ENV= CPPFLAGS="${CPPFLAGS}" -CPPFLAGS= -I${LOCALBASE}/include - -ZABBIX_BIN= agent agentd get sender -ZABBIX_CFG= agent agentd -.ifndef(ZABBIX_AGENT_ONLY) -ZABBIX_BIN+= server -ZABBIX_CFG+= server +.elifdef WITH_PGSQL +USE_PHP+= pgsql +CONFIGURE_ARGS+=--with-pgsql +.elifdef WITH_SQLITE +USE_PHP+= sqlite +CONFIGURE_ARGS+=--with-sqlite +.else +IGNORE= zabbix needs a database backend .endif -ZABBIX_BINFILES= ${ZABBIX_BIN:S|^|zabbix_|:C|.+|&/&|:S|agentd/|agent/|} -ZABBIX_CFGFILES= ${ZABBIX_CFG:S|^|zabbix_|:S|$|.conf|} -PLIST_FILES= ${ZABBIX_BIN:S|^|bin/zabbix_|} \ - ${ZABBIX_CFG:S|^|etc/zabbix/zabbix_|:S|$|.conf.sample|} post-patch: - @${FIND} ${WRKSRC}/src -type f -print0 | ${XARGS} -0 \ + @${FIND} ${WRKSRC}/src/ -type f|${XARGS} \ ${REINPLACE_CMD} -Ee 's|(/etc/zabbix)|${PREFIX}\1|;s|/usr/sbin|${LOCALBASE}/sbin|' + @${REINPLACE_CMD} -e '/test.*rf/s|-rf|-f|;/LDFLAGS/s|-static||' ${WRKSRC}/configure .ifdef WITHOUT_FPING @${ECHO} 'DisablePinger=yes' >> ${WRKSRC}/misc/conf/zabbix_server.conf .endif @@ -98,31 +70,13 @@ post-configure: .endif do-install: - @${ECHO_CMD} '@unexec rmdir %D/etc/zabbix 2>/dev/null || true' >> ${TMPPLIST} - ${INSTALL_PROGRAM} ${ZABBIX_BINFILES:S,^,${WRKSRC}/src/,} ${PREFIX}/bin/ - ${INSTALL} -d ${PREFIX}/etc/zabbix/ -.for FILE in ${ZABBIX_CFGFILES} - ${INSTALL_DATA} ${WRKSRC}/misc/conf/${FILE} ${PREFIX}/etc/zabbix/${FILE}.sample -.endfor -.ifndef(ZABBIX_AGENT_ONLY) - ${INSTALL} -d ${DATADIR}/create/ - ${CP} -Rf ${WRKSRC}/frontends/ ${WRKSRC}/upgrades/dbpatches ${DATADIR}/ - ${CP} -Rf ${WRKSRC}/create/ ${DATADIR}/create/ - ${INSTALL_SCRIPT} ${MASTERDIR}/scripts/dbsetup.sh ${DATADIR}/create/ -.endif - ${SH} ${PKGINSTALL} ${PKGNAME} PRE-INSTALL -.ifndef(ZABBIX_AGENT_ONLY) + @${INSTALL_PROGRAM} ${WRKSRC}/src/zabbix_server/zabbix_server ${PREFIX}/bin/ + @${INSTALL} -d ${PREFIX}/etc/zabbix/ ${DATADIR}/create/ + @${INSTALL_DATA} ${WRKSRC}/misc/conf/zabbix_server.conf\ + ${PREFIX}/etc/zabbix/zabbix_server.conf.sample + @${CP} -Rf ${WRKSRC}/frontends/ ${WRKSRC}/upgrades/dbpatches ${DATADIR}/ + @${CP} -Rf ${WRKSRC}/create/data ${WRKSRC}/create/schema ${DATADIR}/create/ + @${SH} ${PKGINSTALL} ${PKGNAME} PRE-INSTALL @${CAT} ${PKGMESSAGE} -.endif - -# This target is only meant to be used by the port maintainer. -x-generate-plist: - (${PORTSDIR}/Tools/scripts/plist -d -m ${MTREE_FILE} ${PREFIX} \ - | ${SED} -E \ - 's,.*share/nls/.+$$,,g \ - ;s,.*/rc.d/.+,,g \ - ;s,@dirrm share/man(/.*)?$$,,g \ - ;s,share/zabbix,%%DATADIR%%,g \ - ' | ${TR} -s '\n') > temp-pkg-plist .include <bsd.port.post.mk> |