fixed zabix description
[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 URL:=http://www.zabbix.com/
32 SUBMENU:=zabbix
33 endef
34
35 define Package/zabbix-agent
36 $(call Package/zabbix/Default)
37 TITLE+= agent
38 endef
39
40 define Package/zabbix-sender
41 $(call Package/zabbix/Default)
42 TITLE+= sender
43 endef
44
45 define Package/zabbix-server
46 $(call Package/zabbix/Default)
47 TITLE+= server
48 DEPENDS:=+libsqlite3
49 endef
50
51
52 ifneq ($(SDK),)
53 CONFIG_PACKAGE_zabbix-server:=m
54 endif
55
56 PKG_CONFIGURE_OPTIONS:= \
57 --bindir="/usr/sbin" \
58 --enable-agent
59
60 ifneq ($(CONFIG_PACKAGE_zabbix-server),)
61 PKG_CONFIGURE_OPTIONS+= \
62 --enable-server \
63 --with-sqlite3="$(STAGING_DIR)/usr"
64 endif
65
66 define Build/Configure
67 $(call Build/Configure/Default, \
68 $(PKG_CONFIGURE_OPTIONS) \
69 )
70 endef
71
72 define Build/Compile
73 $(MAKE) -C $(PKG_BUILD_DIR) \
74 DESTDIR="$(PKG_INSTALL_DIR)" \
75 all install
76 endef
77
78 define Package/zabbix-agent/conffiles
79 /etc/zabbix/zabbix_agentd.conf
80 endef
81
82 define Package/zabbix-agent/install
83 $(INSTALL_DIR) $(1)/usr/sbin
84 $(CP) $(PKG_INSTALL_DIR)/usr/sbin/zabbix_agentd $(1)/usr/sbin/
85 $(INSTALL_DIR) $(1)/etc/zabbix
86 $(INSTALL_CONF) $(PKG_BUILD_DIR)/misc/conf/zabbix_agentd.conf $(1)/etc/zabbix/
87 endef
88
89 define Package/zabbix-sender/install
90 $(INSTALL_DIR) $(1)/usr/sbin
91 $(CP) $(PKG_INSTALL_DIR)/usr/sbin/zabbix_sender $(1)/usr/sbin/
92 $(INSTALL_DIR) $(1)/etc/zabbix
93 endef
94
95 define Package/zabbix-server/conffiles
96 /etc/zabbix/zabbix_server.conf
97 endef
98
99 define Package/zabbix-server/install
100 $(INSTALL_DIR) $(1)/usr/sbin
101 $(CP) $(PKG_INSTALL_DIR)/usr/sbin/zabbix_server $(1)/usr/sbin/
102 $(INSTALL_DIR) $(1)/etc/zabbix
103 $(INSTALL_CONF) $(PKG_BUILD_DIR)/misc/conf/zabbix_server.conf $(1)/etc/zabbix/
104 endef
105
106 $(eval $(call BuildPackage,zabbix-agent))
107 $(eval $(call BuildPackage,zabbix-sender))
108 $(eval $(call BuildPackage,zabbix-server))