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
15 PKG_MAINTAINER
:=Marko Ratkaj
<marko.ratkaj@sartura.hr
> \
16 Lucian Cristian
<lucian.cristian@gmail.com
>
18 PKG_SOURCE
:=$(PKG_NAME
)-$(PKG_VERSION
).
tar.gz
19 PKG_SOURCE_URL
:=https
://www.clamav.net
/downloads
/production
/
20 PKG_HASH
:=167bd6a13e05ece326b968fdb539b05c2ffcfef6018a274a10aeda85c2c0027a
25 include $(INCLUDE_DIR
)/uclibc
++.mk
26 include $(INCLUDE_DIR
)/package.mk
28 define Package
/clamav
/Default
30 DEPENDS
:=+libpthread
+uclibcxx
+zlib
+libcurl
+libopenssl
+libltdl
+libpcre2
+USE_MUSL
:musl-fts
32 SUBMENU
:=Web Servers
/Proxies
34 URL
:=http
://www.clamav.net
/
38 $(call Package
/clamav
/Default
)
41 define Package
/freshclam
42 $(call Package
/clamav
/Default
)
44 TITLE
+=database updater
47 define Package
/clamav
/description
48 ClamAV is an open source antivirus engine for detecting trojans
,
49 viruses
, malware
& other malicious threats.
52 define Package
/freshclam
/description
53 Database updater for ClamAV
56 define Package
/clamav
/conffiles
61 CXXFLAGS
="$$$$CXXFLAGS -fno-rtti" \
62 $(if
$(CONFIG_USE_MUSL
),LIBS
="-lpthread -lfts",LIBS
="-lpthread") \
64 define Build
/Configure
65 $(call Build
/Configure
/Default
, \
66 --sysconfdir
=/etc
/clamav
/ \
72 --with-group nogroup \
73 --with-pcre
="$(STAGING_DIR)/usr/" \
78 $(MAKE
) -C
$(PKG_BUILD_DIR
) \
79 DESTDIR
="$(PKG_INSTALL_DIR)" \
83 define Package
/clamav
/install
84 $(INSTALL_DIR
) $(1)/usr
/sbin
85 $(INSTALL_BIN
) $(PKG_INSTALL_DIR
)/usr
/sbin
/clamd
$(1)/usr
/sbin
/
86 $(INSTALL_BIN
) $(PKG_INSTALL_DIR
)/usr
/bin
/clamav-config
$(1)/usr
/sbin
/
87 $(INSTALL_BIN
) $(PKG_INSTALL_DIR
)/usr
/bin
/clambc
$(1)/usr
/sbin
/
88 $(INSTALL_BIN
) $(PKG_INSTALL_DIR
)/usr
/bin
/clamconf
$(1)/usr
/sbin
/
89 $(INSTALL_BIN
) $(PKG_INSTALL_DIR
)/usr
/bin
/clamdscan
$(1)/usr
/sbin
/
90 $(INSTALL_BIN
) $(PKG_INSTALL_DIR
)/usr
/bin
/clamscan
$(1)/usr
/sbin
/
91 $(INSTALL_BIN
) $(PKG_INSTALL_DIR
)/usr
/bin
/sigtool
$(1)/usr
/sbin
/
93 $(INSTALL_DIR
) $(1)/usr
/include
94 $(CP
) $(PKG_INSTALL_DIR
)/usr
/include/clamav.h
$(1)/usr
/include/
96 $(INSTALL_DIR
) $(1)/usr
/lib
97 $(CP
) $(PKG_INSTALL_DIR
)/usr
/lib
*/* $(1)/usr
/lib
/
99 $(INSTALL_DIR
) $(1)/etc
/config
100 $(INSTALL_CONF
) .
/files
/clamav.config
$(1)/etc
/config
/clamav
102 $(INSTALL_DIR
) $(1)/etc
/init.d
/
103 $(INSTALL_BIN
) .
/files
/clamav.init
$(1)/etc
/init.d
/clamav
105 $(INSTALL_DIR
) $(1)/usr
/share
/clamav
106 $(CP
) .
/files
/bytecode.cvd
$(1)/usr
/share
/clamav
/
109 define Package
/freshclam
/install
110 $(INSTALL_DIR
) $(1)/usr
/sbin
111 $(CP
) $(PKG_INSTALL_DIR
)/usr
/bin
/freshclam
$(1)/usr
/sbin
/
113 $(INSTALL_DIR
) $(1)/etc
/config
114 $(INSTALL_CONF
) .
/files
/freshclam.config
$(1)/etc
/config
/freshclam
116 $(INSTALL_DIR
) $(1)/etc
/init.d
/
117 $(INSTALL_BIN
) .
/files
/freshclam.init
$(1)/etc
/init.d
/freshclam
120 $(eval
$(call BuildPackage
,clamav
))
121 $(eval
$(call BuildPackage
,freshclam
))