]> git.ipfire.org Git - people/arne_f/ipfire-2.x.git/blame - lfs/icinga
tor: Increase PAK_VER for shipping modified CGI file.
[people/arne_f/ipfire-2.x.git] / lfs / icinga
CommitLineData
776029bb
MT
1###############################################################################
2# #
3# IPFire.org - A linux based firewall #
4# Copyright (C) 2007-2012 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
27VER = 1.11.4
28PLUGIN_VER = 2.0.2
29
30THISAPP = icinga-$(VER)
31DL_FILE = $(THISAPP).tar.gz
32DL_FROM = $(URL_IPFIRE)
33DIR_APP = $(DIR_SRC)/$(THISAPP)
34TARGET = $(DIR_INFO)/$(THISAPP)
35PROG = icinga
36PAK_VER = 1
37
38DEPS = ""
39
40CFLAGS += -fno-strict-aliasing
41
42###############################################################################
43# Top-level Rules
44###############################################################################
45
46objects = $(DL_FILE) nagios-plugins-$(PLUGIN_VER).tar.gz
47
48$(DL_FILE) = $(DL_FROM)/$(DL_FILE)
49nagios-plugins-$(PLUGIN_VER).tar.gz = \
50 $(DL_FROM)/nagios-plugins-$(PLUGIN_VER).tar.gz
51
52$(DL_FILE)_MD5 = cfe64b91ec84f5431e53959e31ff07b5
53nagios-plugins-$(PLUGIN_VER).tar.gz_MD5 = 2f6d9c43adcf9f024175e48a44d099d4
54
55install : $(TARGET)
56
57check : $(patsubst %,$(DIR_CHK)/%,$(objects))
58
59download :$(patsubst %,$(DIR_DL)/%,$(objects))
60
61md5 : $(subst %,%_MD5,$(objects))
62
63dist:
64 @$(PAK)
65
66###############################################################################
67# Downloading, checking, md5sum
68###############################################################################
69
70$(patsubst %,$(DIR_CHK)/%,$(objects)) :
71 @$(CHECK)
72
73$(patsubst %,$(DIR_DL)/%,$(objects)) :
74 @$(LOAD)
75
76$(subst %,%_MD5,$(objects)) :
77 @$(MD5)
78
79###############################################################################
80# Installation Details
81###############################################################################
82
83$(TARGET) : $(patsubst %,$(DIR_DL)/%,$(objects))
84 @$(PREBUILD)
85 @rm -rf $(DIR_APP) && cd $(DIR_SRC) && tar zxf $(DIR_DL)/$(DL_FILE)
86 @rm -rf $(DIR_SRC)/nagios-plugins-$(PLUGIN_VER) && cd $(DIR_SRC) && \
87 tar axf $(DIR_DL)/nagios-plugins-$(PLUGIN_VER).tar.gz
88
89 # Compile core
90 cd $(DIR_APP) && \
91 ./configure \
92 --prefix=/usr \
93 --sysconfdir=/etc/icinga \
94 --datadir=/usr/share/icinga \
95 --datarootdir=/usr/share/icinga \
96 --sbindir=/usr/share/icinga/cgi-bin \
97 --localstatedir=/var/icinga \
98 --libdir=/usr/lib/icinga \
99 --libexecdir=/usr/lib/icinga/plugins \
100 --with-lockfile=/var/run/icinga.pid \
101 --with-httpd-conf=/etc/httpd/conf/conf.d \
102 --with-icinga-user=nobody \
103 --with-icinga-group=nobody \
104 --enable-event-broker \
105 --enable-embedded-perl \
106 --disable-idoutils
107 cd $(DIR_APP) && make all $(MAKETUNING)
108
109 # Compile plugins
110 cd $(DIR_SRC)/nagios-plugins-$(PLUGIN_VER) && \
111 ./configure \
112 --prefix=/usr \
113 --libexecdir=/usr/lib/icinga/plugins \
114 --with-nagios-user=nobody \
282c47bc
SK
115 --with-nagios-group=nobody \
116 --without-ipv6
776029bb
MT
117 cd $(DIR_SRC)/nagios-plugins-$(PLUGIN_VER) && make $(MAKETUNING)
118
119 # Install core
120 cd $(DIR_APP) && make \
121 install install-init install-commandmode install-config \
122 install-webconf install-eventhandlers
123 rm -vf /etc/httpd/conf/conf.d/icinga.conf
124 install -v -m 644 $(DIR_SRC)/config/icinga/icinga.conf \
125 /etc/httpd/conf/vhosts.d/icinga.conf
126
127 # Install plugins
128 cd $(DIR_SRC)/nagios-plugins-$(PLUGIN_VER) && make install
129
130 ln -svf /etc/rc.d/init.d/icinga /etc/rc.d/rc3.d/S67icinga
131 ln -svf /etc/rc.d/init.d/icinga /etc/rc.d/rc0.d/K33icinga
132 ln -svf /etc/rc.d/init.d/icinga /etc/rc.d/rc6.d/K33icinga
133
134 install -v -m 644 $(DIR_SRC)/config/backup/includes/icinga \
135 /var/ipfire/backup/addons/includes/icinga
136
137 @rm -rf $(DIR_APP) $(DIR_SRC)/nagios-plugins-$(PLUGIN_VER)
138 @$(POSTBUILD)