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
:=a82eb0d55d3ca947e10a4a55238f4388
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.
111 --with-sqlite3
="$(STAGING_DIR)/usr"
113 MAKE_FLAGS
+= ARCH
="linux"
115 define Package
/zabbix
/install/sbin
120 $(PKG_INSTALL_DIR
)/usr
/sbin
/zabbix_
$(2) \
124 define Package
/zabbix
/install/bin
129 $(PKG_INSTALL_DIR
)/usr
/bin
/zabbix_
$(2) \
133 define Package
/zabbix
/install/etc
138 $(PKG_INSTALL_DIR
)/etc
/zabbix_
$(2).conf \
142 define Package
/zabbix
/install/init.d
147 .
/files
/zabbix_
$(2).init \
148 $(1)/etc
/init.d
/zabbix_
$(2)
151 define Package
/zabbix
/install/zabbix.conf.d
153 $(1)/etc
/zabbix_agentd.conf.d
157 $(1)/etc
/zabbix_agentd.conf.d
/$(2)
160 define Package
/zabbix-agent
/conffiles
161 /etc
/zabbix_agent.conf
163 define Package
/zabbix-agentd
/conffiles
164 /etc
/zabbix_agentd.conf
166 define Package
/zabbix-server
/conffiles
167 /etc
/zabbix_server.conf
169 define Package
/zabbix-proxy
/conffiles
170 /etc
/zabbix_proxy.conf
173 ifdef CONFIG_PACKAGE_zabbix-extra-mac80211
174 define Build
/Prepare
/zabbix-extra-mac80211
175 mkdir
-p
$(PKG_BUILD_DIR
)/zabbix-extra-mac80211
176 $(CP
) .
/files
/zabbix_helper_mac80211.c
$(PKG_BUILD_DIR
)/zabbix-extra-mac80211
/
179 define Build
/Compile
/zabbix-extra-mac80211
180 $(TARGET_CC
) $(TARGET_CFLAGS
) $(PKG_BUILD_DIR
)/zabbix-extra-mac80211
/zabbix_helper_mac80211.c
-o
$(PKG_BUILD_DIR
)/zabbix-extra-mac80211
/zabbix_helper_mac80211
185 $(call Build
/Prepare
/Default
)
186 $(call Build
/Prepare
/zabbix-extra-mac80211
)
190 $(call Build
/Compile
/Default
)
191 $(call Build
/Compile
/zabbix-extra-mac80211
)
194 define Package
/zabbix-agent
/install
195 $(call Package
/zabbix
/install/sbin
,$(1),agent
)
196 $(call Package
/zabbix
/install/etc
,$(1),agent
)
199 define Package
/zabbix-agentd
/install
200 $(INSTALL_DIR
) $(1)/etc
/zabbix_agentd.conf.d
201 $(call Package
/zabbix
/install/sbin
,$(1),agentd
)
202 $(call Package
/zabbix
/install/etc
,$(1),agentd
)
203 $(call Package
/zabbix
/install/init.d
,$(1),agentd
)
206 define Package
/zabbix-extra-mac80211
/install
207 $(call Package
/zabbix
/install/zabbix.conf.d
,$(1),mac80211
)
208 $(INSTALL_DIR
) $(1)/usr
/bin
209 $(INSTALL_BIN
) $(PKG_BUILD_DIR
)/zabbix-extra-mac80211
/zabbix_helper_mac80211
$(1)/usr
/bin
/
210 chmod
4755 $(1)/usr
/bin
/zabbix_helper_mac80211
213 define Package
/zabbix-extra-network
/install
214 $(call Package
/zabbix
/install/zabbix.conf.d
,$(1),network
)
217 define Package
/zabbix-extra-wifi
/install
218 $(call Package
/zabbix
/install/zabbix.conf.d
,$(1),wifi
)
221 define Package
/zabbix-sender
/install
222 $(call Package
/zabbix
/install/bin
,$(1),sender
)
225 define Package
/zabbix-get
/install
226 $(call Package
/zabbix
/install/bin
,$(1),get)
229 define Package
/zabbix-server
/install
230 $(call Package
/zabbix
/install/sbin
,$(1),server
)
231 $(call Package
/zabbix
/install/etc
,$(1),server
)
234 define Package
/zabbix-proxy
/install
235 $(call Package
/zabbix
/install/sbin
,$(1),proxy
)
236 $(call Package
/zabbix
/install/etc
,$(1),proxy
)
239 $(eval
$(call BuildPackage
,zabbix-agent
))
240 $(eval
$(call BuildPackage
,zabbix-agentd
))
241 $(eval
$(call BuildPackage
,zabbix-extra-mac80211
))
242 $(eval
$(call BuildPackage
,zabbix-extra-network
))
243 $(eval
$(call BuildPackage
,zabbix-extra-wifi
))
244 $(eval
$(call BuildPackage
,zabbix-sender
))
245 $(eval
$(call BuildPackage
,zabbix-server
))
246 $(eval
$(call BuildPackage
,zabbix-proxy
))
247 $(eval
$(call BuildPackage
,zabbix-get
))