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
14 PKG_SOURCE
:=$(PKG_NAME
)-$(PKG_VERSION
).
tar.gz
15 PKG_SOURCE_URL
:=https
://www.clamav.net
/downloads
/production
/
16 PKG_HASH
:=0a86a6496320d91576037b33101119af6fd8d5b91060cd316a3a9c229e9604aa
18 PKG_MAINTAINER
:=Marko Ratkaj
<markoratkaj@gmail.com
> \
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 rust
/host
25 PKG_BUILD_FLAGS
:=gc-sections lto
27 include $(INCLUDE_DIR
)/package.mk
28 include ..
/..
/lang
/rust
/rust-values.mk
29 include $(INCLUDE_DIR
)/nls.mk
30 include $(INCLUDE_DIR
)/cmake.mk
32 define Package
/clamav
/Default
34 DEPENDS
:=+check +libstdcpp
+libpthread
+zlib
+libbz2
+libxml2
+libcurl
+libjson-c
+libmilter-sendmail
+libopenssl
+libltdl
+libpcre2
$(ICONV_DEPENDS
)
36 SUBMENU
:=Web Servers
/Proxies
38 URL
:=https
://www.clamav.net
/
42 $(call Package
/clamav
/Default
)
45 define Package
/freshclam
46 $(call Package
/clamav
/Default
)
48 TITLE
+=database updater
51 define Package
/clamav
/description
52 ClamAV is an open source antivirus engine for detecting trojans
,
53 viruses
, malware
& other malicious threats.
56 define Package
/freshclam
/description
57 Database updater for ClamAV
61 -DHAVE_ATTRIB_PACKED
=ON \
62 -DHAVE_ATTRIB_ALIGNED
=ON \
63 -Dtest_run_result
=ON \
64 -Dtest_run_result__TRYRUN_OUTPUT
=ON \
65 -DCLAMAV_USER
=nobody \
66 -DCLAMAV_GROUP
=nogroup \
67 -DMMAP_FOR_CROSSCOMPILING
=ON \
68 -DENABLE_CLAMONACC
=ON \
69 -DENABLE_MAN_PAGES
=OFF \
71 -DENABLE_EXAMPLES
=OFF \
73 -DENABLE_SYSTEMD
=OFF \
74 -DRUST_COMPILER_TARGET
=$(RUSTC_TARGET_ARCH
) \
75 -DHAVE_SYSTEM_LFS_FTS
=O
$(if
$(CONFIG_USE_GLIBC
),N
,FF
)
77 TARGET_CXXFLAGS
+= -fno-rtti
78 TARGET_LDFLAGS
+= -Wl
,--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
))