add dependency on python (closes: #2283)
[openwrt/svn-archive/archive.git] / admin / zabbix / Makefile
1 #
2 # Copyright (C) 2006 OpenWrt.org
3 #
4 # This is free software, licensed under the GNU General Public License v2.
5 # See /LICENSE for more information.
6 #
7 # $Id$
8
9 include $(TOPDIR)/rules.mk
10
11 PKG_NAME:=zabbix
12 PKG_VERSION:=1.3.2
13 PKG_RELEASE:=1
14 PKG_MD5SUM:=698a07f4e53820e44ef4a72c7c191e92
15
16 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
17 PKG_SOURCE_URL:=@SF/zabbix
18 PKG_CAT:=zcat
19
20 PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)
21 PKG_INSTALL_DIR:=$(PKG_BUILD_DIR)/ipkg-install
22
23 PKG_BUILD_DEPENDS:=libsqlite3
24
25 include $(INCLUDE_DIR)/package.mk
26
27 define Package/zabbix/Default
28 SECTION:=admin
29 CATEGORY:=Administration
30 TITLE:=Zabbix
31 DESCRIPTION:=\
32 ZABBIX is an enterprise-class distributed monitoring solution for networks \\\
33 and applications. Native high-performance ZABBIX agents allow monitoring of \\\
34 performance and availability data of all operating systems.
35 URL:=http://www.zabbix.com/
36 SUBMENU:=zabbix
37 endef
38
39 define Package/zabbix-agent
40 $(call Package/zabbix/Default)
41 TITLE+= agent
42 endef
43
44 define Package/zabbix-sender
45 $(call Package/zabbix/Default)
46 TITLE+= sender
47 endef
48
49 define Package/zabbix-server
50 $(call Package/zabbix/Default)
51 TITLE+= server
52 DEPENDS:=+libsqlite3
53 endef
54
55
56 ifneq ($(SDK),)
57 CONFIG_PACKAGE_zabbix-server:=m
58 endif
59
60 PKG_CONFIGURE_OPTIONS:= \
61 --bindir="/usr/sbin" \
62 --enable-agent
63
64 ifneq ($(CONFIG_PACKAGE_zabbix-server),)
65 PKG_CONFIGURE_OPTIONS+= \
66 --enable-server \
67 --with-sqlite3="$(STAGING_DIR)/usr"
68 endif
69
70 define Build/Configure
71 $(call Build/Configure/Default, \
72 $(PKG_CONFIGURE_OPTIONS) \
73 )
74 endef
75
76 define Build/Compile
77 $(MAKE) -C $(PKG_BUILD_DIR) \
78 DESTDIR="$(PKG_INSTALL_DIR)" \
79 all install
80 endef
81
82 define Package/zabbix-agent/conffiles
83 /etc/zabbix/zabbix_agentd.conf
84 endef
85
86 define Package/zabbix-agent/install
87 $(INSTALL_DIR) $(1)/usr/sbin
88 $(CP) $(PKG_INSTALL_DIR)/usr/sbin/zabbix_agentd $(1)/usr/sbin/
89 $(INSTALL_DIR) $(1)/etc/zabbix
90 $(INSTALL_CONF) $(PKG_BUILD_DIR)/misc/conf/zabbix_agentd.conf $(1)/etc/zabbix/
91 endef
92
93 define Package/zabbix-sender/install
94 $(INSTALL_DIR) $(1)/usr/sbin
95 $(CP) $(PKG_INSTALL_DIR)/usr/sbin/zabbix_sender $(1)/usr/sbin/
96 $(INSTALL_DIR) $(1)/etc/zabbix
97 endef
98
99 define Package/zabbix-server/conffiles
100 /etc/zabbix/zabbix_server.conf
101 endef
102
103 define Package/zabbix-server/install
104 $(INSTALL_DIR) $(1)/usr/sbin
105 $(CP) $(PKG_INSTALL_DIR)/usr/sbin/zabbix_server $(1)/usr/sbin/
106 $(INSTALL_DIR) $(1)/etc/zabbix
107 $(INSTALL_CONF) $(PKG_BUILD_DIR)/misc/conf/zabbix_server.conf $(1)/etc/zabbix/
108 endef
109
110 $(eval $(call BuildPackage,zabbix-agent))
111 $(eval $(call BuildPackage,zabbix-sender))
112 $(eval $(call BuildPackage,zabbix-server))