###############################################################################
# #
# IPFire.org - A linux based firewall #
-# Copyright (C) 2007-2016 IPFire Team <info@ipfire.org> #
+# Copyright (C) 2007-2020 IPFire Team <info@ipfire.org> #
# #
# This program is free software: you can redistribute it and/or modify #
# it under the terms of the GNU General Public License as published by #
include Config
-VER = 0.99.2
+VER = 0.103.0
THISAPP = clamav-$(VER)
DL_FILE = $(THISAPP).tar.gz
DIR_APP = $(DIR_SRC)/$(THISAPP)
TARGET = $(DIR_INFO)/$(THISAPP)
PROG = clamav
-PAK_VER = 34
+PAK_VER = 53
-DEPS = ""
+DEPS =
-ifeq "$(MACHINE_TYPE)" "arm"
+ifeq "$(BUILD_PLATFORM)" "arm"
CONFIGURE_FLAGS = --disable-fanotify
endif
+DATABASE_DIR = /var/lib/clamav
+
###############################################################################
# Top-level Rules
###############################################################################
$(DL_FILE) = $(DL_FROM)/$(DL_FILE)
-$(DL_FILE)_MD5 = 61b51a04619aeafd965892a53f86d192
+$(DL_FILE)_MD5 = 453a389e0147b5df8fae5601b390d7db
install : $(TARGET)
md5 : $(subst %,%_MD5,$(objects))
-dist:
+dist:
$(PAK)
###############################################################################
$(TARGET) : $(patsubst %,$(DIR_DL)/%,$(objects))
@$(PREBUILD)
@rm -rf $(DIR_APP) && cd $(DIR_SRC) && tar zxf $(DIR_DL)/$(DL_FILE)
- cd $(DIR_APP) && patch -Np1 -i $(DIR_SRC)/src/patches/clamav/llvm-glibc.patch
cd $(DIR_APP) && ./configure \
--prefix=/usr \
+ --disable-clamonacc \
--sysconfdir=/var/ipfire/clamav \
+ --with-dbdir=$(DATABASE_DIR) \
$(CONFIGURE_FLAGS)
cd $(DIR_APP) && make $(MAKETUNING)
cd $(DIR_APP) && make install
- mkdir -p /usr/share/clamav/
- chown clamav.clamav -R /usr/share/clamav/
+ mkdir -pv $(DATABASE_DIR)
+ chown clamav.clamav -R $(DATABASE_DIR)
+ rm -rfv $(DATABASE_DIR)/*.cvd
cp -rf $(DIR_SRC)/config/clamav/* /var/ipfire/clamav/
- rm -rfv /usr/share/clamav/*.cvd
mkdir -p /var/run/clamav
chown clamav:clamav /var/run/clamav
-
- # Disable PaX mprotect for clamd, clamscan and freshclam
- paxctl -cm /usr/sbin/clamd
- paxctl -cm /usr/bin/clamscan
- paxctl -cm /usr/bin/freshclam
-
+ #install initscripts
+ $(call INSTALL_INITSCRIPT,clamav)
@rm -rf $(DIR_APP)
@$(POSTBUILD)