source: packages/admin/zabbix/Makefile @ 9349

Last change on this file since 9349 was 9349, checked in by blogic, 9 years ago

remove PKG_CAT from packages

  • Property copyright set to Copyright (C) 2006 OpenWrt.org
  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 2.3 KB
Line 
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
9include $(TOPDIR)/rules.mk
10
11PKG_NAME:=zabbix
12PKG_VERSION:=1.3.2
13PKG_RELEASE:=1
14PKG_MD5SUM:=698a07f4e53820e44ef4a72c7c191e92
15
16PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
17PKG_SOURCE_URL:=@SF/zabbix
18
19PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)
20PKG_INSTALL_DIR:=$(PKG_BUILD_DIR)/ipkg-install
21
22PKG_BUILD_DEPENDS:=libsqlite3
23
24include $(INCLUDE_DIR)/package.mk
25
26define Package/zabbix/Default
27  SECTION:=admin
28  CATEGORY:=Administration
29  TITLE:=Zabbix
30  URL:=http://www.zabbix.com/
31  SUBMENU:=zabbix
32endef
33
34define Package/zabbix-agent
35  $(call Package/zabbix/Default)
36  TITLE+= agent
37endef
38
39define Package/zabbix-sender
40  $(call Package/zabbix/Default)
41  TITLE+= sender
42endef
43
44define Package/zabbix-server
45  $(call Package/zabbix/Default)
46  TITLE+= server
47  DEPENDS:=+libsqlite3
48endef
49
50
51ifneq ($(SDK),)
52CONFIG_PACKAGE_zabbix-server:=m
53endif
54
55PKG_CONFIGURE_OPTIONS:= \
56        --bindir="/usr/sbin" \
57        --enable-agent
58
59ifneq ($(CONFIG_PACKAGE_zabbix-server),)
60PKG_CONFIGURE_OPTIONS+= \
61        --enable-server \
62        --with-sqlite3="$(STAGING_DIR)/usr"
63endif
64
65define Build/Configure
66        $(call Build/Configure/Default, \
67                $(PKG_CONFIGURE_OPTIONS) \
68        )
69endef
70
71define Build/Compile
72        $(MAKE) -C $(PKG_BUILD_DIR) \
73                DESTDIR="$(PKG_INSTALL_DIR)" \
74                all install
75endef
76
77define Package/zabbix-agent/conffiles
78/etc/zabbix/zabbix_agentd.conf
79endef
80
81define Package/zabbix-agent/install
82        $(INSTALL_DIR) $(1)/usr/sbin
83        $(CP) $(PKG_INSTALL_DIR)/usr/sbin/zabbix_agentd $(1)/usr/sbin/
84        $(INSTALL_DIR) $(1)/etc/zabbix
85        $(INSTALL_CONF) $(PKG_BUILD_DIR)/misc/conf/zabbix_agentd.conf $(1)/etc/zabbix/
86endef
87
88define Package/zabbix-sender/install
89        $(INSTALL_DIR) $(1)/usr/sbin
90        $(CP) $(PKG_INSTALL_DIR)/usr/sbin/zabbix_sender $(1)/usr/sbin/
91        $(INSTALL_DIR) $(1)/etc/zabbix
92endef
93
94define Package/zabbix-server/conffiles
95/etc/zabbix/zabbix_server.conf
96endef
97
98define Package/zabbix-server/install
99        $(INSTALL_DIR) $(1)/usr/sbin
100        $(CP) $(PKG_INSTALL_DIR)/usr/sbin/zabbix_server $(1)/usr/sbin/
101        $(INSTALL_DIR) $(1)/etc/zabbix
102        $(INSTALL_CONF) $(PKG_BUILD_DIR)/misc/conf/zabbix_server.conf $(1)/etc/zabbix/
103endef
104
105$(eval $(call BuildPackage,zabbix-agent))
106$(eval $(call BuildPackage,zabbix-sender))
107$(eval $(call BuildPackage,zabbix-server))
Note: See TracBrowser for help on using the repository browser.