e6a11952218143926310b1203c903a6b22e9e19f
[packages/trusty/cirros-testvm.git] / cirros-testvm / src-cirros / buildroot-2015.05 / package / clamav / clamav.mk
1 ################################################################################
2 #
3 # clamav
4 #
5 ################################################################################
6
7 CLAMAV_VERSION = 0.98.7
8 CLAMAV_SITE = http://sourceforge.net/projects/clamav/files/clamav/$(CLAMAV_VERSION)
9 CLAMAV_LICENSE = GPLv2
10 CLAMAV_LICENSE_FILES = COPYING COPYING.bzip2 COPYING.file COPYING.getopt \
11         COPYING.LGPL COPYING.llvm COPYING.lzma COPYING.regex COPYING.sha256 \
12         COPYING.unrar COPYING.zlib
13 # clamav-0002-static-linking.patch touches configure.ac
14 CLAMAV_AUTORECONF = YES
15 CLAMAV_DEPENDENCIES = openssl zlib $(if $(BR2_NEEDS_GETTEXT_IF_LOCALE),gettext)
16
17 # mmap cannot be detected when cross-compiling, needed for mempool support
18 CLAMAV_CONF_ENV = \
19         ac_cv_c_mmap_private=yes \
20         have_cv_ipv6=yes
21
22 CLAMAV_CONF_OPTS = \
23         --with-dbdir=/var/lib/clamav \
24         --with-openssl=$(STAGING_DIR)/usr \
25         --with-zlib=$(STAGING_DIR)/usr \
26         --disable-rpath \
27         --disable-clamuko \
28         --disable-clamav \
29         --disable-milter \
30         --disable-llvm \
31         --disable-clamdtop \
32         --enable-mempool
33
34 ifeq ($(BR2_PACKAGE_BZIP2),y)
35 CLAMAV_DEPENDENCIES += bzip2
36 # autodetection gets confused if host has bzip2, so force it
37 CLAMAV_CONF_ENV += \
38         ac_cv_libbz2_libs=-lbz2 \
39         ac_cv_libbz2_ltlibs=-lbz2
40 else
41 CLAMAV_CONF_OPTS += --disable-bzip2
42 endif
43
44 ifeq ($(BR2_PACKAGE_LIBXML2),y)
45 CLAMAV_CONF_OPTS += --with-xml=$(STAGING_DIR)/usr
46 CLAMAV_DEPENDENCIES += libxml2
47 else
48 CLAMAV_CONF_OPTS += --disable-xml
49 endif
50
51 ifeq ($(BR2_PACKAGE_LIBCURL),y)
52 CLAMAV_CONF_OPTS += --with-libcurl=$(STAGING_DIR)/usr
53 CLAMAV_DEPENDENCIES += libcurl
54 else
55 CLAMAV_CONF_OPTS += --without-libcurl
56 endif
57
58 ifeq ($(BR2_PACKAGE_LIBICONV),y)
59 CLAMAV_CONF_OPTS += --with-iconv
60 CLAMAV_DEPENDENCIES += libiconv
61 else
62 CLAMAV_CONF_OPTS += --without-iconv
63 endif
64
65 $(eval $(autotools-package))