1 ###############################################################################
3 # IPFire.org - A linux based firewall #
4 # Copyright (C) 2007-2019 IPFire Team <info@ipfire.org> #
6 # This program is free software: you can redistribute it and/or modify #
7 # it under the terms of the GNU General Public License as published by #
8 # the Free Software Foundation, either version 3 of the License, or #
9 # (at your option) any later version. #
11 # This program is distributed in the hope that it will be useful, #
12 # but WITHOUT ANY WARRANTY; without even the implied warranty of #
13 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the #
14 # GNU General Public License for more details. #
16 # You should have received a copy of the GNU General Public License #
17 # along with this program. If not, see <http://www.gnu.org/licenses/>. #
19 ###############################################################################
21 ###############################################################################
23 ###############################################################################
29 THISAPP = zabbix-$(VER)
30 DL_FILE = $(THISAPP).tar.gz
31 DL_FROM = $(URL_IPFIRE)
32 DIR_APP = $(DIR_SRC)/$(THISAPP)
33 TARGET = $(DIR_INFO)/$(THISAPP)
38 ###############################################################################
40 ###############################################################################
44 $(DL_FILE) = $(DL_FROM)/$(DL_FILE)
46 $(DL_FILE)_MD5 = 6cd55cd743d416d9ffbf2e6fdee680ee
50 check : $(patsubst %,$(DIR_CHK)/%,$(objects))
52 download :$(patsubst %,$(DIR_DL)/%,$(objects))
54 md5 : $(subst %,%_MD5,$(objects))
59 ###############################################################################
60 # Downloading, checking, md5sum
61 ###############################################################################
63 $(patsubst %,$(DIR_CHK)/%,$(objects)) :
66 $(patsubst %,$(DIR_DL)/%,$(objects)) :
69 $(subst %,%_MD5,$(objects)) :
72 ###############################################################################
73 # Installation Details
74 ###############################################################################
76 $(TARGET) : $(patsubst %,$(DIR_DL)/%,$(objects))
78 @rm -rf $(DIR_APP) && cd $(DIR_SRC) && tar axvf $(DIR_DL)/$(DL_FILE)
79 cd $(DIR_APP) && ./configure \
82 --sysconfdir=/etc/zabbix_agentd \
86 cd $(DIR_APP) && make install
88 # Create config directory and create files
89 -rmdir /etc/zabbix_agentd/zabbix_agentd.conf.d
90 -mkdir -pv /etc/zabbix_agentd/zabbix_agentd.d
91 -mkdir -pv /etc/zabbix_agentd/scripts
92 install -v -m 644 $(DIR_SRC)/config/zabbix_agentd/zabbix_agentd.conf \
93 /etc/zabbix_agentd/zabbix_agentd.conf
94 install -v -m 644 $(DIR_SRC)/config/zabbix_agentd/userparameter_pakfire.conf \
95 /etc/zabbix_agentd/zabbix_agentd.d/userparameter_pakfire.conf
97 # Create directory for additional agent modules
98 -mkdir -pv /usr/lib/zabbix
100 # Create directory for logging
101 -mkdir -pv /var/log/zabbix
102 chown zabbix.zabbix /var/log/zabbix
104 # Create directory for pid.
105 -mkdir -pv /var/run/zabbix
106 chown zabbix.zabbix /var/run/zabbix
108 # Install initscripts
109 $(call INSTALL_INITSCRIPT,zabbix_agentd)
111 # Install sudoers include file
112 install -v -m 644 $(DIR_SRC)/config/zabbix_agentd/sudoers \
113 /etc/sudoers.d/zabbix
115 # Install include file for backup
116 install -v -m 644 $(DIR_SRC)/config/backup/includes/zabbix_agentd \
117 /var/ipfire/backup/addons/includes/zabbix_agentd
119 # Install include file for Logrotate
120 -mkdir -pv /etc/logrotate.d
121 install -v -m 644 $(DIR_SRC)/config/zabbix_agentd/logrotate \
122 /etc/logrotate.d/zabbix_agentd