2 # Copyright (C) 2015 OpenWrt.org
4 # This is free software, licensed under the GNU General Public License v2.
5 # See /LICENSE for more information.
8 include $(TOPDIR
)/rules.mk
12 PKG_RELEASE
:=$(AUTORELEASE
)
14 PKG_SOURCE
:=$(PKG_NAME
)-$(PKG_VERSION
).
tar.gz
15 PKG_SOURCE_URL
:=https
://www.clamav.net
/downloads
/production
/
16 PKG_HASH
:=a079d64cd55d6184510adfe0f341b2f278f7fb1bcc080d28d374298160f19cb2
18 PKG_MAINTAINER
:=Marko Ratkaj
<marko.ratkaj@sartura.hr
> \
19 Lucian Cristian
<lucian.cristian@gmail.com
>
20 PKG_LICENSE
:=GPL-2.0
-only
21 PKG_LICENSE_FILES
:=COPYING
*
22 PKG_CPE_ID
:=cpe
:/a
:clamav
:clamav
24 PKG_BUILD_DEPENDS
:=ncurses
26 include $(INCLUDE_DIR
)/package.mk
27 include $(INCLUDE_DIR
)/nls.mk
28 include $(INCLUDE_DIR
)/cmake.mk
30 define Package
/clamav
/Default
32 DEPENDS
:=+check +libstdcpp
+libpthread
+zlib
+libbz2
+libxml2
+libcurl
+libjson-c
+libmilter-sendmail
+libopenssl
+libltdl
+libpcre2
$(ICONV_DEPENDS
)
34 SUBMENU
:=Web Servers
/Proxies
36 URL
:=https
://www.clamav.net
/
40 $(call Package
/clamav
/Default
)
43 define Package
/freshclam
44 $(call Package
/clamav
/Default
)
46 TITLE
+=database updater
49 define Package
/clamav
/description
50 ClamAV is an open source antivirus engine for detecting trojans
,
51 viruses
, malware
& other malicious threats.
54 define Package
/freshclam
/description
55 Database updater for ClamAV
60 -DHAVE_ATTRIB_PACKED
=ON \
61 -DHAVE_ATTRIB_ALIGNED
=ON \
62 -Dtest_run_result
=ON \
63 -Dtest_run_result__TRYRUN_OUTPUT
=ON \
64 -DCLAMAV_USER
=nobody \
65 -DCLAMAV_GROUP
=nogroup \
66 -DMMAP_FOR_CROSSCOMPILING
=ON \
67 -DENABLE_CLAMONACC
=ON \
69 -DENABLE_DOXYGEN
=OFF \
70 -DENABLE_EXAMPLES
=OFF \
72 -DENABLE_SYSTEMD
=OFF \
73 -DIconv_INCLUDE_DIR
=$(ICONV_PREFIX
)/include \
74 -DIconv_LIBRARY
=$(ICONV_PREFIX
)/lib
/libiconv.
$(if
$(ICONV_FULL
),so
,a
) \
75 -DHAVE_SYSTEM_LFS_FTS
=O
$(if
$(CONFIG_USE_GLIBC
),N
,FF
)
77 TARGET_CXXFLAGS
+= -ffunction-sections
-fdata-sections
-fno-rtti
-flto
78 TARGET_LDFLAGS
+= -Wl
,--gc-sections
,--as-needed
80 define Package
/clamav
/conffiles
82 /etc
/config
/clamav-milter
85 define Package
/clamav
/install
86 $(INSTALL_DIR
) $(1)/usr
/sbin
87 $(INSTALL_BIN
) $(PKG_INSTALL_DIR
)/usr
/sbin
/clamd
$(1)/usr
/sbin
/
88 $(INSTALL_BIN
) $(PKG_INSTALL_DIR
)/usr
/sbin
/clamav-milter
$(1)/usr
/sbin
/
89 $(INSTALL_BIN
) $(PKG_INSTALL_DIR
)/usr
/bin
/clambc
$(1)/usr
/sbin
/
90 $(INSTALL_BIN
) $(PKG_INSTALL_DIR
)/usr
/bin
/clamconf
$(1)/usr
/sbin
/
91 $(INSTALL_BIN
) $(PKG_INSTALL_DIR
)/usr
/bin
/clamdscan
$(1)/usr
/sbin
/
92 $(INSTALL_BIN
) $(PKG_INSTALL_DIR
)/usr
/bin
/clamscan
$(1)/usr
/sbin
/
93 $(INSTALL_BIN
) $(PKG_INSTALL_DIR
)/usr
/sbin
/clamonacc
$(1)/usr
/sbin
/
94 $(INSTALL_BIN
) $(PKG_INSTALL_DIR
)/usr
/bin
/sigtool
$(1)/usr
/sbin
/
96 $(INSTALL_DIR
) $(1)/usr
/lib
97 $(CP
) $(PKG_INSTALL_DIR
)/usr
/lib
*/lib
*.so.
* $(1)/usr
/lib
/
99 $(INSTALL_DIR
) $(1)/etc
/config
100 $(INSTALL_CONF
) .
/files
/clamav.config
$(1)/etc
/config
/clamav
101 $(INSTALL_CONF
) .
/files
/clamav-milter.config
$(1)/etc
/config
/clamav-milter
103 $(INSTALL_DIR
) $(1)/etc
/init.d
/
104 $(INSTALL_BIN
) .
/files
/clamav.init
$(1)/etc
/init.d
/clamav
105 $(INSTALL_BIN
) .
/files
/clamav-milter.init
$(1)/etc
/init.d
/clamav-milter
107 $(INSTALL_DIR
) $(1)/usr
/share
/clamav
108 $(CP
) .
/files
/bytecode.cvd
$(1)/usr
/share
/clamav
/
111 define Package
/freshclam
/conffiles
112 /etc
/config
/freshclam
115 define Package
/freshclam
/install
116 $(INSTALL_DIR
) $(1)/usr
/sbin
117 $(CP
) $(PKG_INSTALL_DIR
)/usr
/bin
/freshclam
$(1)/usr
/sbin
/
119 $(INSTALL_DIR
) $(1)/etc
/config
120 $(INSTALL_CONF
) .
/files
/freshclam.config
$(1)/etc
/config
/freshclam
122 $(INSTALL_DIR
) $(1)/etc
/init.d
/
123 $(INSTALL_BIN
) .
/files
/freshclam.init
$(1)/etc
/init.d
/freshclam
126 $(eval
$(call BuildPackage
,clamav
))
127 $(eval
$(call BuildPackage
,freshclam
))