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