]> git.ipfire.org Git - people/pmueller/ipfire-2.x.git/blame - lfs/clamav
clamav 0.105.1: New package to resolve several CVEs
[people/pmueller/ipfire-2.x.git] / lfs / clamav
CommitLineData
cd1a2927 1###############################################################################
cd1a2927 2# #
70df8302 3# IPFire.org - A linux based firewall #
ac809b02 4# Copyright (C) 2007-2022 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
25include Config
26
66c36198 27SUMMARY = Antivirus Toolkit
f15707c7 28
b2ab2f4c 29VER = 0.105.1
c899c04b 30SUBVER = -2
cd1a2927 31
d1dd6669 32THISAPP = clamav-$(VER)
c899c04b 33DL_FILE = $(THISAPP)$(SUBVER).tar.gz
f417cab6 34DL_FROM = $(URL_IPFIRE)
cd1a2927
MT
35DIR_APP = $(DIR_SRC)/$(THISAPP)
36TARGET = $(DIR_INFO)/$(THISAPP)
a8b159e7 37PROG = clamav
c899c04b 38PAK_VER = 63
cd1a2927 39
2dc2a278 40DEPS =
f86b0cc3 41
f15707c7
RR
42SERVICES = clamav
43
aeefbca7
MT
44DATABASE_DIR = /var/lib/clamav
45
cd1a2927
MT
46###############################################################################
47# Top-level Rules
48###############################################################################
49
50objects = $(DL_FILE)
51
52$(DL_FILE) = $(DL_FROM)/$(DL_FILE)
53
c899c04b 54$(DL_FILE)_BLAKE2 = 09e67f4ae4f9689e634aa18cd672b16d8a4cb8b3923527c7c92ffa264b415dc49b5ee82ceaa518cf701a910b49a344753c7d0de894a772b0b871e492c95d60f4
cd1a2927
MT
55
56install : $(TARGET)
57
58check : $(patsubst %,$(DIR_CHK)/%,$(objects))
59
60download :$(patsubst %,$(DIR_DL)/%,$(objects))
61
9a7e4d85 62b2 : $(subst %,%_BLAKE2,$(objects))
cd1a2927 63
66c36198 64dist:
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)