2010-05-03 07:58:45 -04:00
|
|
|
# $OpenBSD: Makefile,v 1.22 2010/05/03 11:58:45 ajacoutot Exp $
|
2009-04-22 11:03:52 -04:00
|
|
|
|
|
|
|
COMMENT-main = network and application monitoring - agent
|
|
|
|
COMMENT-server = network and application monitoring - server
|
|
|
|
COMMENT-web = network and application monitoring - web frontend
|
|
|
|
|
2010-04-09 06:17:59 -04:00
|
|
|
VERSION = 1.8.2
|
2009-04-22 11:03:52 -04:00
|
|
|
DISTNAME = zabbix-${VERSION}
|
2010-05-03 07:58:45 -04:00
|
|
|
FULLPKGNAME-main = zabbix-agent-${VERSION}p2
|
2010-02-27 13:47:19 -05:00
|
|
|
FULLPKGPATH-main = net/zabbix,-main
|
2010-04-09 12:41:45 -04:00
|
|
|
PKGNAME-server = zabbix-server-${VERSION}p0
|
2010-05-03 07:46:08 -04:00
|
|
|
FULLPKGNAME-web = zabbix-web-${VERSION}p1
|
2010-04-09 06:17:59 -04:00
|
|
|
FULLPKGPATH-web = net/zabbix,-web
|
2009-04-22 11:03:52 -04:00
|
|
|
CATEGORIES = net
|
|
|
|
|
|
|
|
HOMEPAGE = http://www.zabbix.com/
|
|
|
|
|
|
|
|
# GPLv2
|
|
|
|
PERMIT_PACKAGE_CDROM = Yes
|
|
|
|
PERMIT_PACKAGE_FTP = Yes
|
2010-01-11 13:30:01 -05:00
|
|
|
PERMIT_DISTFILES_CDROM =Yes
|
|
|
|
PERMIT_DISTFILES_FTP = Yes
|
2009-04-22 11:03:52 -04:00
|
|
|
|
|
|
|
MASTER_SITES = ${MASTER_SITE_SOURCEFORGE:=zabbix/}
|
|
|
|
|
2010-01-15 04:08:02 -05:00
|
|
|
MODULES= converters/libiconv
|
|
|
|
|
2010-04-09 12:41:45 -04:00
|
|
|
MULTI_PACKAGES = -main -web
|
2009-06-03 13:54:12 -04:00
|
|
|
PSEUDO_FLAVORS = no_server
|
|
|
|
FLAVORS = mysql pgsql
|
|
|
|
|
2010-01-24 09:09:00 -05:00
|
|
|
SUBST_VARS += PREFIX-web ZABBIX_WEB
|
2009-04-22 11:03:52 -04:00
|
|
|
|
|
|
|
WANTLIB = c kvm m
|
|
|
|
LIB_DEPENDS = lber,ldap::databases/openldap
|
|
|
|
|
|
|
|
LIB_DEPENDS-server = ${LIB_DEPENDS} \
|
|
|
|
curl::net/curl \
|
2009-08-31 16:52:29 -04:00
|
|
|
netsnmp::net/net-snmp \
|
|
|
|
iksemel::textproc/iksemel
|
2009-04-22 11:03:52 -04:00
|
|
|
RUN_DEPENDS-server = ::net/fping
|
2009-06-11 12:38:17 -04:00
|
|
|
WANTLIB-server = ${WANTLIB} crypto idn ssl z
|
2009-04-22 11:03:52 -04:00
|
|
|
|
|
|
|
CONFIGURE_STYLE = gnu
|
|
|
|
CONFIGURE_ARGS = --enable-server \
|
|
|
|
--enable-agent \
|
|
|
|
--enable-proxy \
|
|
|
|
--enable-ipv6 \
|
|
|
|
--with-libcurl \
|
|
|
|
--with-net-snmp \
|
2009-08-31 16:52:29 -04:00
|
|
|
--with-ldap \
|
|
|
|
--with-jabber="${LOCALBASE}"
|
2009-04-22 11:03:52 -04:00
|
|
|
CONFIGURE_ENV = CPPFLAGS="-I${LOCALBASE}/include" \
|
2009-06-11 12:38:17 -04:00
|
|
|
LDFLAGS="-L${LOCALBASE}/lib" \
|
|
|
|
ac_cv_search___res_query=no
|
2009-04-22 11:03:52 -04:00
|
|
|
|
|
|
|
PREFIX-web = /var/www
|
2009-06-11 12:38:17 -04:00
|
|
|
LIB_DEPENDS-web =
|
2010-05-03 07:46:08 -04:00
|
|
|
RUN_DEPENDS-web = ::www/php5/extensions,-gd \
|
|
|
|
::www/php5/extensions,-mbstring
|
2009-06-11 12:38:17 -04:00
|
|
|
WANTLIB-web =
|
2009-07-15 08:28:06 -04:00
|
|
|
ZABBIX_WEB = ${PREFIX-web}/zabbix
|
2009-06-03 13:54:12 -04:00
|
|
|
|
|
|
|
FLAVOR ?= no_server
|
|
|
|
|
|
|
|
#if non-backend-related flavors are added, add them to
|
|
|
|
#the following line as ":L:Nflavor1:Nflavor2" so that
|
|
|
|
#they don't trigger a "Conflicting flavors" error.
|
|
|
|
BACKEND = ${FLAVOR}
|
|
|
|
.if ${BACKEND} == "mysql"
|
2010-04-09 12:41:45 -04:00
|
|
|
MULTI_PACKAGES += -server
|
2009-06-03 13:54:12 -04:00
|
|
|
LIB_DEPENDS-server += mysqlclient::databases/mysql,-main
|
|
|
|
CONFIGURE_ARGS += --with-mysql
|
|
|
|
.elif ${BACKEND} == "pgsql"
|
2010-04-09 12:41:45 -04:00
|
|
|
MULTI_PACKAGES += -server
|
2009-06-03 13:54:12 -04:00
|
|
|
LIB_DEPENDS-server += pq::databases/postgresql,-main
|
|
|
|
CONFIGURE_ARGS += --with-pgsql
|
|
|
|
.elif ${BACKEND} == "no_server"
|
|
|
|
CONFIGURE_ARGS += --disable-server \
|
2010-04-09 12:41:45 -04:00
|
|
|
--disable-proxy
|
2009-06-03 13:54:12 -04:00
|
|
|
.else
|
|
|
|
ERRORS += "Fatal: Conflicting flavors: ${FLAVOR}";
|
|
|
|
.endif
|
2009-04-22 11:03:52 -04:00
|
|
|
|
2009-07-12 15:51:51 -04:00
|
|
|
pre-configure:
|
|
|
|
${SUBST_CMD} ${WRKSRC}/misc/conf/zabbix_server.conf \
|
|
|
|
${WRKSRC}/misc/conf/zabbix_proxy.conf
|
|
|
|
|
2009-04-22 11:03:52 -04:00
|
|
|
post-install:
|
|
|
|
${INSTALL_DATA_DIR} ${DESTDIR}${PREFIX-web}/zabbix
|
|
|
|
cd ${WRKBUILD}/frontends/php && tar -cf - . | \
|
|
|
|
tar -C ${DESTDIR}${PREFIX-web}/zabbix -xf -
|
|
|
|
${INSTALL_DATA_DIR} ${PREFIX}/share/doc/zabbix
|
2009-06-03 13:54:12 -04:00
|
|
|
${SUBST_CMD} -c ${FILESDIR}/README.OpenBSD \
|
|
|
|
${PREFIX}/share/doc/zabbix/README.OpenBSD
|
|
|
|
${INSTALL_DATA_DIR} ${DESTDIR}${PREFIX-web}/conf/
|
|
|
|
${INSTALL_DATA_DIR} ${DESTDIR}${PREFIX-web}/conf/modules.sample
|
|
|
|
${SUBST_CMD} -c ${FILESDIR}/zabbix.conf \
|
|
|
|
${DESTDIR}${PREFIX-web}/conf/modules.sample/zabbix.conf
|
|
|
|
${INSTALL_DATA_DIR} ${DESTDIR}${PREFIX-web}/conf/php5.sample
|
|
|
|
${SUBST_CMD} -c ${FILESDIR}/zabbix.ini \
|
|
|
|
${DESTDIR}${PREFIX-web}/conf/php5.sample/zabbix.ini
|
2009-04-22 11:03:52 -04:00
|
|
|
${INSTALL_DATA_DIR} ${PREFIX}/share/zabbix/schema
|
|
|
|
${INSTALL_DATA_DIR} ${PREFIX}/share/zabbix/data
|
|
|
|
${INSTALL_DATA_DIR} ${PREFIX}/share/zabbix/data/images
|
|
|
|
${INSTALL_DATA} ${WRKBUILD}/create/schema/*.sql \
|
|
|
|
${PREFIX}/share/zabbix/schema
|
|
|
|
${INSTALL_DATA} ${WRKBUILD}/create/data/*.sql \
|
|
|
|
${PREFIX}/share/zabbix/data
|
|
|
|
${INSTALL_DATA} ${WRKBUILD}/create/data/images/*.png \
|
|
|
|
${PREFIX}/share/zabbix/data/images
|
|
|
|
${INSTALL_DATA_DIR} ${PREFIX}/share/examples/zabbix
|
|
|
|
${INSTALL_DATA} ${WRKBUILD}/misc/conf/*.conf \
|
|
|
|
${PREFIX}/share/examples/zabbix
|
|
|
|
# Script to easy upgrading from previous major version
|
|
|
|
cd ${WRKSRC}/upgrades/ && tar -cf - dbpatches | \
|
|
|
|
tar -C ${PREFIX}/share/zabbix -xf -
|
2009-07-12 15:51:51 -04:00
|
|
|
chown ${SHAREOWN}:${SHAREGRP} \
|
|
|
|
${PREFIX}/share/doc/zabbix/README.OpenBSD \
|
|
|
|
${DESTDIR}${PREFIX-web}/conf/modules.sample/zabbix.conf \
|
2009-07-13 13:13:01 -04:00
|
|
|
${DESTDIR}${PREFIX-web}/conf/php5.sample/zabbix.ini
|
2009-04-22 11:03:52 -04:00
|
|
|
|
|
|
|
.include <bsd.port.mk>
|