2 # Copyright (C) 2006-2015 OpenWrt.org
4 # This is free software, licensed under the GNU General Public License v2.
5 # See /LICENSE for more information.
8 include $(TOPDIR
)/rules.mk
14 PKG_SOURCE
:=$(PKG_NAME
)-$(PKG_VERSION
).
tar.gz
15 PKG_SOURCE_URL
:=@SF
/zabbix
16 PKG_MD5SUM
:=06ad8d5808a0eddf2b9f0a256b6a5fde
19 PKG_LICENSE_FILES
:=COPYING
25 include $(INCLUDE_DIR
)/package.mk
26 include $(INCLUDE_DIR
)/nls.mk
28 define Package
/zabbix
/Default
30 CATEGORY
:=Administration
32 URL
:=http
://www.zabbix.com
/
34 MAINTAINER
:=Etienne CHAMPETIER
<champetier.etienne@gmail.com
>
35 USERID
:=zabbix
=53:zabbix
=53
36 DEPENDS
+= $(ICONV_DEPENDS
)
39 define Package
/zabbix-agent
40 $(call Package
/zabbix
/Default
)
44 define Package
/zabbix-agentd
45 $(call Package
/zabbix
/Default
)
49 define Package
/zabbix-extra-mac80211
50 $(call Package
/zabbix
/Default
)
51 TITLE
+= discovery
/userparameters for mac80211
52 DEPENDS
= +zabbix-agentd @PACKAGE_MAC80211_DEBUGFS @KERNEL_DEBUG_FS
55 define Package
/zabbix-extra-network
56 $(call Package
/zabbix
/Default
)
57 TITLE
+= discovery
/userparameters for network
58 DEPENDS
= +zabbix-agentd
+libuci-lua
+lua
61 define Package
/zabbix-extra-wifi
62 $(call Package
/zabbix
/Default
)
63 TITLE
+= discovery
/userparameters for wifi
64 DEPENDS
= +zabbix-agentd
+libiwinfo-lua
+libuci-lua
+lua
67 define Package
/zabbix-sender
68 $(call Package
/zabbix
/Default
)
72 define Package
/zabbix-get
73 $(call Package
/zabbix
/Default
)
77 define Package
/zabbix-server
78 $(call Package
/zabbix
/Default
)
80 DEPENDS
+= +libsqlite3
83 define Package
/zabbix-proxy
84 $(call Package
/zabbix
/Default
)
86 DEPENDS
+= +libsqlite3
89 define Package
/zabbix-extra-mac80211
/description
90 An extra package for zabbix-agentd that adds a discovery rule for mac80211 wifi phy and many userparameters.
91 It contains an suid helper to allow zabbix-agentd to still run
as zabbix user and not
as root.
92 See http
://wiki.openwrt.org
/doc
/howto
/zabbix for ready to use zabbix templates.
95 define Package
/zabbix-extra-network
/description
96 An extra package for zabbix-agentd that adds a discovery rule for openwrt network interfaces.
97 The idea here is to discover only interfaces listed in
/etc
/config
/network
(discover br-lan and not eth0.1 and wlan0
)
98 See http
://wiki.openwrt.org
/doc
/howto
/zabbix for ready to use zabbix templates.
101 define Package
/zabbix-extra-wifi
/description
102 An extra package for zabbix-agentd that adds a discovery rule for wifi interfaces and many userparameters.
103 As it uses libiwinfo
, it works with
all wifi devices supported by openwrt.
104 See http
://wiki.openwrt.org
/doc
/howto
/zabbix for ready to use zabbix templates.
111 $(call autoconf_bool
,CONFIG_IPV6
,ipv6
) \
113 --with-sqlite3
="$(STAGING_DIR)/usr"
115 MAKE_FLAGS
+= ARCH
="linux"
117 define Package
/zabbix
/install/sbin
122 $(PKG_INSTALL_DIR
)/usr
/sbin
/zabbix_
$(2) \
126 define Package
/zabbix
/install/bin
131 $(PKG_INSTALL_DIR
)/usr
/bin
/zabbix_
$(2) \
135 define Package
/zabbix
/install/etc
140 $(PKG_INSTALL_DIR
)/etc
/zabbix_
$(2).conf \
144 define Package
/zabbix
/install/init.d
149 .
/files
/zabbix_
$(2).init \
150 $(1)/etc
/init.d
/zabbix_
$(2)
153 define Package
/zabbix
/install/zabbix.conf.d
155 $(1)/etc
/zabbix_agentd.conf.d
159 $(1)/etc
/zabbix_agentd.conf.d
/$(2)
162 define Package
/zabbix-agent
/conffiles
163 /etc
/zabbix_agent.conf
165 define Package
/zabbix-agentd
/conffiles
166 /etc
/zabbix_agentd.conf
168 define Package
/zabbix-server
/conffiles
169 /etc
/zabbix_server.conf
171 define Package
/zabbix-proxy
/conffiles
172 /etc
/zabbix_proxy.conf
175 ifdef CONFIG_PACKAGE_zabbix-extra-mac80211
176 define Build
/Prepare
/zabbix-extra-mac80211
177 mkdir
-p
$(PKG_BUILD_DIR
)/zabbix-extra-mac80211
178 $(CP
) .
/files
/zabbix_helper_mac80211.c
$(PKG_BUILD_DIR
)/zabbix-extra-mac80211
/
181 define Build
/Compile
/zabbix-extra-mac80211
182 $(TARGET_CC
) $(TARGET_CFLAGS
) $(PKG_BUILD_DIR
)/zabbix-extra-mac80211
/zabbix_helper_mac80211.c
-o
$(PKG_BUILD_DIR
)/zabbix-extra-mac80211
/zabbix_helper_mac80211
187 $(call Build
/Prepare
/Default
)
188 $(call Build
/Prepare
/zabbix-extra-mac80211
)
192 $(call Build
/Compile
/Default
)
193 $(call Build
/Compile
/zabbix-extra-mac80211
)
196 define Package
/zabbix-agent
/install
197 $(call Package
/zabbix
/install/sbin
,$(1),agent
)
198 $(call Package
/zabbix
/install/etc
,$(1),agent
)
201 define Package
/zabbix-agentd
/install
202 $(INSTALL_DIR
) $(1)/etc
/zabbix_agentd.conf.d
203 $(call Package
/zabbix
/install/sbin
,$(1),agentd
)
204 $(call Package
/zabbix
/install/etc
,$(1),agentd
)
205 $(call Package
/zabbix
/install/init.d
,$(1),agentd
)
208 define Package
/zabbix-extra-mac80211
/install
209 $(call Package
/zabbix
/install/zabbix.conf.d
,$(1),mac80211
)
210 $(INSTALL_DIR
) $(1)/usr
/bin
211 $(INSTALL_BIN
) $(PKG_BUILD_DIR
)/zabbix-extra-mac80211
/zabbix_helper_mac80211
$(1)/usr
/bin
/
212 chmod
4755 $(1)/usr
/bin
/zabbix_helper_mac80211
215 define Package
/zabbix-extra-network
/install
216 $(call Package
/zabbix
/install/zabbix.conf.d
,$(1),network
)
219 define Package
/zabbix-extra-wifi
/install
220 $(call Package
/zabbix
/install/zabbix.conf.d
,$(1),wifi
)
223 define Package
/zabbix-sender
/install
224 $(call Package
/zabbix
/install/bin
,$(1),sender
)
227 define Package
/zabbix-get
/install
228 $(call Package
/zabbix
/install/bin
,$(1),get)
231 define Package
/zabbix-server
/install
232 $(call Package
/zabbix
/install/sbin
,$(1),server
)
233 $(call Package
/zabbix
/install/etc
,$(1),server
)
236 define Package
/zabbix-proxy
/install
237 $(call Package
/zabbix
/install/sbin
,$(1),proxy
)
238 $(call Package
/zabbix
/install/etc
,$(1),proxy
)
241 $(eval
$(call BuildPackage
,zabbix-agent
))
242 $(eval
$(call BuildPackage
,zabbix-agentd
))
243 $(eval
$(call BuildPackage
,zabbix-extra-mac80211
))
244 $(eval
$(call BuildPackage
,zabbix-extra-network
))
245 $(eval
$(call BuildPackage
,zabbix-extra-wifi
))
246 $(eval
$(call BuildPackage
,zabbix-sender
))
247 $(eval
$(call BuildPackage
,zabbix-server
))
248 $(eval
$(call BuildPackage
,zabbix-proxy
))
249 $(eval
$(call BuildPackage
,zabbix-get
))