1################################################################################ 2# 3# clamav 4# 5################################################################################ 6 7CLAMAV_VERSION = 0.103.3 8CLAMAV_SITE = https://www.clamav.net/downloads/production 9CLAMAV_LICENSE = GPL-2.0 10CLAMAV_LICENSE_FILES = COPYING COPYING.bzip2 COPYING.file COPYING.getopt \ 11 COPYING.LGPL COPYING.llvm COPYING.lzma COPYING.pcre COPYING.regex \ 12 COPYING.unrar COPYING.zlib 13CLAMAV_CPE_ID_VENDOR = clamav 14CLAMAV_SELINUX_MODULES = clamav 15CLAMAV_DEPENDENCIES = \ 16 host-pkgconf \ 17 libcurl \ 18 libmspack \ 19 openssl \ 20 zlib \ 21 $(TARGET_NLS_DEPENDENCIES) 22 23# mmap cannot be detected when cross-compiling, needed for mempool support 24CLAMAV_CONF_ENV = \ 25 ac_cv_c_mmap_private=yes \ 26 have_cv_ipv6=yes \ 27 OBJC=$(TARGET_CC) 28 29ifeq ($(BR2_TOOLCHAIN_HAS_LIBATOMIC),y) 30CLAMAV_LIBS += -latomic 31endif 32 33ifeq ($(BR2_TOOLCHAIN_USES_GLIBC),) 34CLAMAV_DEPENDENCIES += musl-fts 35CLAMAV_LIBS += -lfts 36endif 37 38CLAMAV_CONF_ENV += LIBS="$(CLAMAV_LIBS)" 39 40CLAMAV_CONF_OPTS = \ 41 --with-dbdir=/var/lib/clamav \ 42 --with-libcurl=$(STAGING_DIR)/usr \ 43 --with-openssl=$(STAGING_DIR)/usr \ 44 --with-system-libmspack=$(STAGING_DIR)/usr \ 45 --with-zlib=$(STAGING_DIR)/usr \ 46 --disable-zlib-vcheck \ 47 --disable-rpath \ 48 --disable-clamav \ 49 --disable-milter \ 50 --disable-llvm \ 51 --disable-clamdtop \ 52 --enable-mempool 53 54ifeq ($(BR2_PACKAGE_BZIP2),y) 55CLAMAV_DEPENDENCIES += bzip2 56# autodetection gets confused if host has bzip2, so force it 57CLAMAV_CONF_ENV += \ 58 ac_cv_libbz2_libs=-lbz2 \ 59 ac_cv_libbz2_ltlibs=-lbz2 60else 61CLAMAV_CONF_OPTS += --disable-bzip2 62endif 63 64ifeq ($(BR2_PACKAGE_JSON_C),y) 65CLAMAV_CONF_OPTS += --with-libjson=$(STAGING_DIR)/usr 66CLAMAV_DEPENDENCIES += json-c 67else 68CLAMAV_CONF_OPTS += --without-libjson 69endif 70 71ifeq ($(BR2_PACKAGE_LIBXML2),y) 72CLAMAV_CONF_OPTS += --with-xml=$(STAGING_DIR)/usr 73CLAMAV_DEPENDENCIES += libxml2 74else 75CLAMAV_CONF_OPTS += --disable-xml 76endif 77 78ifeq ($(BR2_PACKAGE_LIBICONV),y) 79CLAMAV_CONF_OPTS += --with-iconv 80CLAMAV_DEPENDENCIES += libiconv 81else 82CLAMAV_CONF_OPTS += --without-iconv 83endif 84 85ifeq ($(BR2_PACKAGE_PCRE2),y) 86CLAMAV_CONF_OPTS += --with-pcre=$(STAGING_DIR)/usr 87CLAMAV_DEPENDENCIES += pcre2 88else ifeq ($(BR2_PACKAGE_PCRE),y) 89CLAMAV_CONF_OPTS += --with-pcre=$(STAGING_DIR)/usr 90CLAMAV_DEPENDENCIES += pcre 91else 92CLAMAV_CONF_OPTS += --without-pcre 93endif 94 95ifeq ($(BR2_INIT_SYSTEMD),y) 96CLAMAV_CONF_OPTS += --with-systemdsystemunitdir=/usr/lib/systemd/system 97CLAMAV_DEPENDENCIES += systemd 98else 99CLAMAV_CONF_OPTS += --with-systemdsystemunitdir=no 100endif 101 102$(eval $(autotools-package)) 103