]>
Commit | Line | Data |
---|---|---|
cd1a2927 | 1 | ############################################################################### |
cd1a2927 | 2 | # # |
70df8302 | 3 | # IPFire.org - A linux based firewall # |
da3e2774 | 4 | # Copyright (C) 2007-2023 IPFire Team <info@ipfire.org> # |
70df8302 MT |
5 | # # |
6 | # This program is free software: you can redistribute it and/or modify # | |
cd1a2927 | 7 | # it under the terms of the GNU General Public License as published by # |
70df8302 | 8 | # the Free Software Foundation, either version 3 of the License, or # |
cd1a2927 MT |
9 | # (at your option) any later version. # |
10 | # # | |
70df8302 | 11 | # This program is distributed in the hope that it will be useful, # |
cd1a2927 MT |
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 # | |
70df8302 | 17 | # along with this program. If not, see <http://www.gnu.org/licenses/>. # |
cd1a2927 | 18 | # # |
cd1a2927 MT |
19 | ############################################################################### |
20 | ||
21 | ############################################################################### | |
22 | # Definitions | |
23 | ############################################################################### | |
24 | ||
25 | include Config | |
26 | ||
66c36198 | 27 | SUMMARY = Antivirus Toolkit |
f15707c7 | 28 | |
bbd49cbc | 29 | VER = 1.2.1 |
cd1a2927 | 30 | |
d1dd6669 | 31 | THISAPP = clamav-$(VER) |
949c109a | 32 | DL_FILE = $(THISAPP).tar.gz |
f417cab6 | 33 | DL_FROM = $(URL_IPFIRE) |
cd1a2927 MT |
34 | DIR_APP = $(DIR_SRC)/$(THISAPP) |
35 | TARGET = $(DIR_INFO)/$(THISAPP) | |
a8b159e7 | 36 | PROG = clamav |
bbd49cbc | 37 | PAK_VER = 70 |
cd1a2927 | 38 | |
2dc2a278 | 39 | DEPS = |
f86b0cc3 | 40 | |
f15707c7 RR |
41 | SERVICES = clamav |
42 | ||
aeefbca7 MT |
43 | DATABASE_DIR = /var/lib/clamav |
44 | ||
cd1a2927 MT |
45 | ############################################################################### |
46 | # Top-level Rules | |
47 | ############################################################################### | |
48 | ||
49 | objects = $(DL_FILE) | |
50 | ||
51 | $(DL_FILE) = $(DL_FROM)/$(DL_FILE) | |
52 | ||
bbd49cbc | 53 | $(DL_FILE)_BLAKE2 = 1373c6882b165e769dcc3c3631dfe7183231b2fe4830608b57d919af1a8e9a5a73aa3cc4767981a27bb9845390165b5241750904d50e1a90b7237200b97f7ef3 |
f53ec8fa | 54 | |
cd1a2927 MT |
55 | |
56 | install : $(TARGET) | |
57 | ||
58 | check : $(patsubst %,$(DIR_CHK)/%,$(objects)) | |
59 | ||
60 | download :$(patsubst %,$(DIR_DL)/%,$(objects)) | |
61 | ||
9a7e4d85 | 62 | b2 : $(subst %,%_BLAKE2,$(objects)) |
cd1a2927 | 63 | |
66c36198 | 64 | dist: |
ee78a5ef | 65 | $(PAK) |
d1dd6669 | 66 | |
cd1a2927 | 67 | ############################################################################### |
9a7e4d85 | 68 | # Downloading, checking, b2sum |
cd1a2927 MT |
69 | ############################################################################### |
70 | ||
71 | $(patsubst %,$(DIR_CHK)/%,$(objects)) : | |
72 | @$(CHECK) | |
73 | ||
74 | $(patsubst %,$(DIR_DL)/%,$(objects)) : | |
75 | @$(LOAD) | |
76 | ||
9a7e4d85 PM |
77 | $(subst %,%_BLAKE2,$(objects)) : |
78 | @$(B2SUM) | |
cd1a2927 MT |
79 | |
80 | ############################################################################### | |
81 | # Installation Details | |
82 | ############################################################################### | |
83 | ||
84 | $(TARGET) : $(patsubst %,$(DIR_DL)/%,$(objects)) | |
85 | @$(PREBUILD) | |
d1dd6669 | 86 | @rm -rf $(DIR_APP) && cd $(DIR_SRC) && tar zxf $(DIR_DL)/$(DL_FILE) |
f7627d86 MF |
87 | |
88 | cd $(DIR_APP) && mkdir -pv build | |
89 | cd $(DIR_APP)/build && cmake .. -G Ninja \ | |
90 | -DCMAKE_BUILD_TYPE=Release \ | |
91 | -DCMAKE_INSTALL_PREFIX=/usr \ | |
92 | -DCMAKE_INSTALL_LIBDIR=/usr/lib \ | |
93 | -DOPTIMIZE=ON \ | |
94 | -DBYTECODE_RUNTIME="interpreter" \ | |
95 | -DENABLE_TESTS=OFF \ | |
96 | -DENABLE_CLAMONACC=OFF \ | |
97 | -DENABLE_MILTER=OFF \ | |
98 | -DENABLE_MAN_PAGES=OFF \ | |
99 | -DENABLE_EXTERNAL_MSPACK=OFF \ | |
100 | -DENABLE_FRESHCLAM_DNS_FIX=ON \ | |
101 | -DAPP_CONFIG_DIRECTORY=/var/ipfire/clamav \ | |
5391e722 | 102 | -DCURSES_LIBRARY=/usr/lib/libncurses.so \ |
f7627d86 MF |
103 | -DDATABASE_DIRECTORY=$(DATABASE_DIR) |
104 | ||
105 | cd $(DIR_APP)/build && ninja $(MAKETUNING) && ninja install | |
106 | ||
aeefbca7 MT |
107 | mkdir -pv $(DATABASE_DIR) |
108 | chown clamav.clamav -R $(DATABASE_DIR) | |
109 | rm -rfv $(DATABASE_DIR)/*.cvd | |
f7627d86 | 110 | mkdir -pv /var/ipfire/clamav |
38965639 | 111 | cp -rf $(DIR_SRC)/config/clamav/* /var/ipfire/clamav/ |
f7627d86 | 112 | mkdir -pv /var/run/clamav |
4f57d698 | 113 | chown clamav:clamav /var/run/clamav |
afb143bd | 114 | #install initscripts |
f15707c7 | 115 | $(call INSTALL_INITSCRIPTS,$(SERVICES)) |
cd1a2927 MT |
116 | @rm -rf $(DIR_APP) |
117 | @$(POSTBUILD) |