]> git.ipfire.org Git - ipfire-2.x.git/blame - lfs/zabbix_agentd
Update translations
[ipfire-2.x.git] / lfs / zabbix_agentd
CommitLineData
06fc6170
AK
1###############################################################################
2# #
3# IPFire.org - A linux based firewall #
4# Copyright (C) 2007-2019 IPFire Team <info@ipfire.org> #
5# #
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. #
10# #
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. #
15# #
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/>. #
18# #
19###############################################################################
20
21###############################################################################
22# Definitions
23###############################################################################
24
25include Config
26
c818134f 27VER = 4.2.1
06fc6170
AK
28
29THISAPP = zabbix-$(VER)
30DL_FILE = $(THISAPP).tar.gz
31DL_FROM = $(URL_IPFIRE)
32DIR_APP = $(DIR_SRC)/$(THISAPP)
33TARGET = $(DIR_INFO)/$(THISAPP)
34PROG = zabbix_agentd
c818134f 35PAK_VER = 3
06fc6170
AK
36DEPS = ""
37
38###############################################################################
39# Top-level Rules
40###############################################################################
41
42objects = $(DL_FILE)
43
44$(DL_FILE) = $(DL_FROM)/$(DL_FILE)
45
c818134f 46$(DL_FILE)_MD5 = e55ba94060ba2548ae8a1c29fd7cb7dd
06fc6170
AK
47
48install : $(TARGET)
49
50check : $(patsubst %,$(DIR_CHK)/%,$(objects))
51
52download :$(patsubst %,$(DIR_DL)/%,$(objects))
53
54md5 : $(subst %,%_MD5,$(objects))
55
56dist:
57 @$(PAK)
58
59###############################################################################
60# Downloading, checking, md5sum
61###############################################################################
62
63$(patsubst %,$(DIR_CHK)/%,$(objects)) :
64 @$(CHECK)
65
66$(patsubst %,$(DIR_DL)/%,$(objects)) :
67 @$(LOAD)
68
69$(subst %,%_MD5,$(objects)) :
70 @$(MD5)
71
72###############################################################################
73# Installation Details
74###############################################################################
75
76$(TARGET) : $(patsubst %,$(DIR_DL)/%,$(objects))
77 @$(PREBUILD)
78 @rm -rf $(DIR_APP) && cd $(DIR_SRC) && tar axvf $(DIR_DL)/$(DL_FILE)
79 cd $(DIR_APP) && ./configure \
80 --prefix=/usr \
81 --enable-agent \
82 --sysconfdir=/etc/zabbix_agentd \
83 --with-openssl
84
85 cd $(DIR_APP) && make
86 cd $(DIR_APP) && make install
87
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
5737a22c
AK
94 install -v -m 644 $(DIR_SRC)/config/zabbix_agentd/userparameter_pakfire.conf \
95 /etc/zabbix_agentd/zabbix_agentd.d/userparameter_pakfire.conf
06fc6170
AK
96
97 # Create directory for additional agent modules
98 -mkdir -pv /usr/lib/zabbix
99
100 # Create directory for logging
101 -mkdir -pv /var/log/zabbix
102 chown zabbix.zabbix /var/log/zabbix
103
104 # Create directory for pid.
105 -mkdir -pv /var/run/zabbix
106 chown zabbix.zabbix /var/run/zabbix
107
108 # Install initscripts
109 $(call INSTALL_INITSCRIPT,zabbix_agentd)
110
111 # Install sudoers include file
112 install -v -m 644 $(DIR_SRC)/config/zabbix_agentd/sudoers \
41b7369f 113 /etc/sudoers.d/zabbix
06fc6170
AK
114
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
118
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
123
124 @rm -rf $(DIR_APP)
125 @$(POSTBUILD)