]>
Commit | Line | Data |
---|---|---|
58dca4e5 DW |
1 | ############################################################################### |
2 | # # | |
3 | # IPFire.org - A linux based firewall # | |
cf73af23 | 4 | # Copyright (C) 2007-2022 IPFire Team <info@ipfire.org> # |
58dca4e5 DW |
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 | ||
25 | include Config | |
26 | ||
80a47746 | 27 | VER = 5.32.0 |
f15707c7 RR |
28 | SUMMARY = Utility for monitoring services on a Unix system |
29 | ||
58dca4e5 DW |
30 | THISAPP = monit-$(VER) |
31 | DL_FILE = $(THISAPP).tar.gz | |
32 | DL_FROM = $(URL_IPFIRE) | |
33 | DIR_APP = $(DIR_SRC)/$(THISAPP) | |
34 | TARGET = $(DIR_INFO)/$(THISAPP) | |
35 | PROG = monit | |
c183124f | 36 | PAK_VER = 20 |
58dca4e5 | 37 | |
2dc2a278 | 38 | DEPS = |
58dca4e5 | 39 | |
f15707c7 RR |
40 | SERVICES = monit |
41 | ||
58dca4e5 DW |
42 | ############################################################################### |
43 | # Top-level Rules | |
44 | ############################################################################### | |
45 | ||
46 | objects = $(DL_FILE) | |
47 | ||
48 | $(DL_FILE) = $(DL_FROM)/$(DL_FILE) | |
49 | ||
5dc1ce99 | 50 | $(DL_FILE)_BLAKE2 = 48b824365dca349914ffc066a19758f23fee122fb29b1aed5cecad6f97799a987752e3e59cbed488282738c755fdf4d7c95dbe85069f2e070c28f03a324e0a7f |
58dca4e5 DW |
51 | |
52 | install : $(TARGET) | |
53 | ||
54 | check : $(patsubst %,$(DIR_CHK)/%,$(objects)) | |
55 | ||
56 | download :$(patsubst %,$(DIR_DL)/%,$(objects)) | |
57 | ||
9a7e4d85 | 58 | b2 : $(subst %,%_BLAKE2,$(objects)) |
58dca4e5 | 59 | |
af5db809 | 60 | dist: |
58dca4e5 DW |
61 | @$(PAK) |
62 | ||
63 | ############################################################################### | |
9a7e4d85 | 64 | # Downloading, checking, b2sum |
58dca4e5 DW |
65 | ############################################################################### |
66 | ||
67 | $(patsubst %,$(DIR_CHK)/%,$(objects)) : | |
68 | @$(CHECK) | |
69 | ||
70 | $(patsubst %,$(DIR_DL)/%,$(objects)) : | |
71 | @$(LOAD) | |
72 | ||
9a7e4d85 PM |
73 | $(subst %,%_BLAKE2,$(objects)) : |
74 | @$(B2SUM) | |
58dca4e5 DW |
75 | |
76 | ############################################################################### | |
77 | # Installation Details | |
78 | ############################################################################### | |
79 | ||
80 | $(TARGET) : $(patsubst %,$(DIR_DL)/%,$(objects)) | |
81 | @$(PREBUILD) | |
82 | @rm -rf $(DIR_APP) && cd $(DIR_SRC) && tar zxf $(DIR_DL)/$(DL_FILE) | |
a0767955 MF |
83 | cd $(DIR_APP) && ./configure \ |
84 | --prefix=/usr \ | |
85 | --sysconfdir=/etc \ | |
86 | --localstatedir=/var | |
87 | ||
58dca4e5 DW |
88 | cd $(DIR_APP) && make $(MAKETUNING) |
89 | cd $(DIR_APP) && make install | |
6047b2c1 | 90 | |
a40a1e25 DW |
91 | mkdir -p /var/lib/monit |
92 | ||
58dca4e5 | 93 | install -v -m 644 $(DIR_SRC)/config/backup/includes/monit \ |
a0767955 | 94 | /var/ipfire/backup/addons/includes/monit |
58dca4e5 | 95 | |
a0767955 MF |
96 | # Install default configuration |
97 | install -v -m 600 $(DIR_SRC)/config/monit/monitrc /etc | |
58dca4e5 | 98 | |
586761dd | 99 | #install initscripts |
f15707c7 | 100 | $(call INSTALL_INITSCRIPTS,$(SERVICES)) |
586761dd | 101 | |
a0767955 | 102 | # Install start links and backup include file. |
57865e53 DW |
103 | ln -sf ../init.d/monit /etc/rc.d/rc3.d/S60monit |
104 | ln -sf ../init.d/monit /etc/rc.d/rc0.d/K40monit | |
105 | ln -sf ../init.d/monit /etc/rc.d/rc6.d/K40monit | |
106 | ||
7ce49ff0 | 107 | @rm -rf $(DIR_APP) |
58dca4e5 | 108 | @$(POSTBUILD) |