clamav.mk 2.4 KB

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