packages/admin/zabbix/Makefile
mirko 81938508b5 [packages/zabbix] level up zabbix to version 2.0.0
git-svn-id: svn://svn.openwrt.org/openwrt/packages@32497 3c298f89-4303-0410-b956-a3cf2f4a3e73
2012-06-24 19:03:42 +00:00

150 lines
3.0 KiB
Makefile

#
# Copyright (C) 2006-2012 OpenWrt.org
#
# This is free software, licensed under the GNU General Public License v2.
# See /LICENSE for more information.
#
include $(TOPDIR)/rules.mk
PKG_NAME:=zabbix
PKG_VERSION:=2.0.0
PKG_RELEASE:=1
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
PKG_SOURCE_URL:=@SF/zabbix
PKG_MD5SUM:=d34d398beddee0eaa999789100cf74e3
PKG_INSTALL:=1
PKG_FIXUP:=autoreconf
include $(INCLUDE_DIR)/package.mk
include $(INCLUDE_DIR)/nls.mk
define Package/zabbix/Default
SECTION:=admin
CATEGORY:=Administration
TITLE:=Zabbix
URL:=http://www.zabbix.com/
SUBMENU:=zabbix
MAINTAINER:=Mirko Vogt <mirko@openwrt.org>
endef
define Package/zabbix-agent
$(call Package/zabbix/Default)
TITLE+= agent
endef
define Package/zabbix-agentd
$(call Package/zabbix/Default)
TITLE+= agentd
endef
define Package/zabbix-sender
$(call Package/zabbix/Default)
TITLE+= sender
endef
define Package/zabbix-get
$(call Package/zabbix/Default)
TITLE+= get
endef
define Package/zabbix-server
$(call Package/zabbix/Default)
TITLE+= server
DEPENDS += +libsqlite3
endef
define Package/zabbix-proxy
$(call Package/zabbix/Default)
TITLE+= proxy
DEPENDS += +libsqlite3
endef
CONFIGURE_ARGS+= \
--enable-agent \
--enable-server \
--enable-proxy \
--disable-java \
--with-sqlite3="$(STAGING_DIR)/usr"
MAKE_FLAGS += ARCH="linux"
define Package/zabbix/install/sbin
$(INSTALL_DIR) \
$(1)/usr/sbin
$(INSTALL_BIN) \
$(PKG_INSTALL_DIR)/usr/sbin/zabbix_$(2) \
$(1)/usr/sbin/
endef
define Package/zabbix/install/bin
$(INSTALL_DIR) \
$(1)/usr/bin
$(INSTALL_BIN) \
$(PKG_INSTALL_DIR)/usr/bin/zabbix_$(2) \
$(1)/usr/bin/
endef
define Package/zabbix/install/etc
$(INSTALL_DIR) \
$(1)/etc
$(INSTALL_CONF) \
$(PKG_INSTALL_DIR)/etc/zabbix_$(2).conf \
$(1)/etc/
endef
define Package/zabbix/install/init.d
$(INSTALL_DIR) \
$(1)/etc/init.d
$(INSTALL_BIN) \
./files/zabbix_$(2).init \
$(1)/etc/init.d/zabbix_$(2)
endef
define Package/zabbix-$(1)/conffiles
/etc/zabbix/zabbix_$(1).conf
endef
define Package/zabbix-agent/install
$(call Package/zabbix/install/sbin,$(1),agent)
$(call Package/zabbix/install/etc,$(1),agent)
endef
define Package/zabbix-agentd/install
$(call Package/zabbix/install/sbin,$(1),agentd)
$(call Package/zabbix/install/etc,$(1),agentd)
$(call Package/zabbix/install/init.d,$(1),agentd)
endef
define Package/zabbix-sender/install
$(call Package/zabbix/install/bin,$(1),sender)
endef
define Package/zabbix-get/install
$(call Package/zabbix/install/bin,$(1),get)
endef
define Package/zabbix-server/install
$(call Package/zabbix/install/sbin,$(1),server)
$(call Package/zabbix/install/etc,$(1),server)
endef
define Package/zabbix-proxy/install
$(call Package/zabbix/install/sbin,$(1),proxy)
$(call Package/zabbix/install/etc,$(1),proxy)
endef
$(eval $(call BuildPackage,zabbix-agent))
$(eval $(call BuildPackage,zabbix-agentd))
$(eval $(call BuildPackage,zabbix-sender))
$(eval $(call BuildPackage,zabbix-server))
$(eval $(call BuildPackage,zabbix-proxy))
$(eval $(call BuildPackage,zabbix-get))