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
38 define Package
/zabbix-agent
39 $(call Package
/zabbix
/Default
)
43 define Package
/zabbix-agentd
44 $(call Package
/zabbix
/Default
)
48 define Package
/zabbix-extra-mac80211
49 $(call Package
/zabbix
/Default
)
50 TITLE
+= discovery
/userparameters for mac80211
51 DEPENDS
+= +zabbix-agentd @PACKAGE_MAC80211_DEBUGFS @KERNEL_DEBUG_FS
54 define Package
/zabbix-extra-network
55 $(call Package
/zabbix
/Default
)
56 TITLE
+= discovery
/userparameters for network
57 DEPENDS
+= +zabbix-agentd
+libuci-lua
+lua
60 define Package
/zabbix-extra-wifi
61 $(call Package
/zabbix
/Default
)
62 TITLE
+= discovery
/userparameters for wifi
63 DEPENDS
+= +zabbix-agentd
+libiwinfo-lua
+libuci-lua
+lua
66 define Package
/zabbix-sender
67 $(call Package
/zabbix
/Default
)
71 define Package
/zabbix-get
72 $(call Package
/zabbix
/Default
)
76 define Package
/zabbix-server
77 $(call Package
/zabbix
/Default
)
79 DEPENDS
+= +libsqlite3
82 define Package
/zabbix-proxy
83 $(call Package
/zabbix
/Default
)
85 DEPENDS
+= +libsqlite3
88 define Package
/zabbix-extra-mac80211
/description
89 An extra package for zabbix-agentd that adds a discovery rule for mac80211 wifi phy and many userparameters.
90 It contains an suid helper to allow zabbix-agentd to still run
as zabbix user and not
as root.
91 See http
://wiki.openwrt.org
/doc
/howto
/zabbix for ready to use zabbix templates.
94 define Package
/zabbix-extra-network
/description
95 An extra package for zabbix-agentd that adds a discovery rule for openwrt network interfaces.
96 The idea here is to discover only interfaces listed in
/etc
/config
/network
(discover br-lan and not eth0.1 and wlan0
)
97 See http
://wiki.openwrt.org
/doc
/howto
/zabbix for ready to use zabbix templates.
100 define Package
/zabbix-extra-wifi
/description
101 An extra package for zabbix-agentd that adds a discovery rule for wifi interfaces and many userparameters.
102 As it uses libiwinfo
, it works with
all wifi devices supported by openwrt.
103 See http
://wiki.openwrt.org
/doc
/howto
/zabbix for ready to use zabbix templates.
110 $(call autoconf_bool
,CONFIG_IPV6
,ipv6
) \
112 --with-sqlite3
="$(STAGING_DIR)/usr"
114 MAKE_FLAGS
+= ARCH
="linux"
116 define Package
/zabbix
/install/sbin
121 $(PKG_INSTALL_DIR
)/usr
/sbin
/zabbix_
$(2) \
125 define Package
/zabbix
/install/bin
130 $(PKG_INSTALL_DIR
)/usr
/bin
/zabbix_
$(2) \
134 define Package
/zabbix
/install/etc
139 $(PKG_INSTALL_DIR
)/etc
/zabbix_
$(2).conf \
143 define Package
/zabbix
/install/init.d
148 .
/files
/zabbix_
$(2).init \
149 $(1)/etc
/init.d
/zabbix_
$(2)
152 define Package
/zabbix
/install/zabbix.conf.d
154 $(1)/etc
/zabbix_agentd.conf.d
158 $(1)/etc
/zabbix_agentd.conf.d
/$(2)
161 define Package
/zabbix-agent
/conffiles
162 /etc
/zabbix_agent.conf
164 define Package
/zabbix-agentd
/conffiles
165 /etc
/zabbix_agentd.conf
167 define Package
/zabbix-server
/conffiles
168 /etc
/zabbix_server.conf
170 define Package
/zabbix-proxy
/conffiles
171 /etc
/zabbix_proxy.conf
174 ifdef CONFIG_PACKAGE_zabbix-extra-mac80211
175 define Build
/Prepare
/zabbix-extra-mac80211
176 mkdir
-p
$(PKG_BUILD_DIR
)/zabbix-extra-mac80211
177 $(CP
) .
/files
/zabbix_helper_mac80211.c
$(PKG_BUILD_DIR
)/zabbix-extra-mac80211
/
180 define Build
/Compile
/zabbix-extra-mac80211
181 $(TARGET_CC
) $(TARGET_CFLAGS
) $(PKG_BUILD_DIR
)/zabbix-extra-mac80211
/zabbix_helper_mac80211.c
-o
$(PKG_BUILD_DIR
)/zabbix-extra-mac80211
/zabbix_helper_mac80211
186 $(call Build
/Prepare
/Default
)
187 $(call Build
/Prepare
/zabbix-extra-mac80211
)
191 $(call Build
/Compile
/Default
)
192 $(call Build
/Compile
/zabbix-extra-mac80211
)
195 define Package
/zabbix-agent
/install
196 $(call Package
/zabbix
/install/sbin
,$(1),agent
)
197 $(call Package
/zabbix
/install/etc
,$(1),agent
)
200 define Package
/zabbix-agentd
/install
201 $(INSTALL_DIR
) $(1)/etc
/zabbix_agentd.conf.d
202 $(call Package
/zabbix
/install/sbin
,$(1),agentd
)
203 $(call Package
/zabbix
/install/etc
,$(1),agentd
)
204 $(call Package
/zabbix
/install/init.d
,$(1),agentd
)
207 define Package
/zabbix-extra-mac80211
/install
208 $(call Package
/zabbix
/install/zabbix.conf.d
,$(1),mac80211
)
209 $(INSTALL_DIR
) $(1)/usr
/bin
210 $(INSTALL_BIN
) $(PKG_BUILD_DIR
)/zabbix-extra-mac80211
/zabbix_helper_mac80211
$(1)/usr
/bin
/
211 chmod
4755 $(1)/usr
/bin
/zabbix_helper_mac80211
214 define Package
/zabbix-extra-network
/install
215 $(call Package
/zabbix
/install/zabbix.conf.d
,$(1),network
)
218 define Package
/zabbix-extra-wifi
/install
219 $(call Package
/zabbix
/install/zabbix.conf.d
,$(1),wifi
)
222 define Package
/zabbix-sender
/install
223 $(call Package
/zabbix
/install/bin
,$(1),sender
)
226 define Package
/zabbix-get
/install
227 $(call Package
/zabbix
/install/bin
,$(1),get)
230 define Package
/zabbix-server
/install
231 $(call Package
/zabbix
/install/sbin
,$(1),server
)
232 $(call Package
/zabbix
/install/etc
,$(1),server
)
235 define Package
/zabbix-proxy
/install
236 $(call Package
/zabbix
/install/sbin
,$(1),proxy
)
237 $(call Package
/zabbix
/install/etc
,$(1),proxy
)
240 $(eval
$(call BuildPackage
,zabbix-agent
))
241 $(eval
$(call BuildPackage
,zabbix-agentd
))
242 $(eval
$(call BuildPackage
,zabbix-extra-mac80211
))
243 $(eval
$(call BuildPackage
,zabbix-extra-network
))
244 $(eval
$(call BuildPackage
,zabbix-extra-wifi
))
245 $(eval
$(call BuildPackage
,zabbix-sender
))
246 $(eval
$(call BuildPackage
,zabbix-server
))
247 $(eval
$(call BuildPackage
,zabbix-proxy
))
248 $(eval
$(call BuildPackage
,zabbix-get
))