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>
17 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
18 PKG_SOURCE_URL:=http://sourceforge.net/projects/clamav/files/clamav/$(PKG_VERSION)/
19 PKG_MD5SUM:=157c601161da1c2d5a0e48ea1b49e067
24 include $(INCLUDE_DIR)/uclibc++.mk
25 include $(INCLUDE_DIR)/package.mk
27 define Package/clamav/Default
29 DEPENDS:=+libpthread +uclibcxx +zlib +libcurl +libopenssl
31 SUBMENU:=Web Servers/Proxies
33 URL:=http://www.clamav.net/
37 $(call Package/clamav/Default)
40 define Package/freshclam
41 $(call Package/clamav/Default)
43 TITLE+=database updater
46 define Package/clamav/description
47 ClamAV is an open source antivirus engine for detecting trojans,
48 viruses, malware & other malicious threats.
51 define Package/freshclam/description
52 Database updater for ClamAV
55 define Package/clamav/conffiles
60 CXXFLAGS="$$$$CXXFLAGS -fno-rtti" \
63 define Build/Configure
64 $(call Build/Configure/Default, \
65 --sysconfdir=/etc/clamav/ \
70 --enable-ltdl-install \
72 --with-group nogroup \
77 $(MAKE) -C $(PKG_BUILD_DIR) \
78 DESTDIR="$(PKG_INSTALL_DIR)" \
82 define Package/clamav/install
83 $(INSTALL_DIR) $(1)/usr/sbin
84 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/clamd $(1)/usr/sbin/
85 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/clamav-config $(1)/usr/sbin/
86 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/clambc $(1)/usr/sbin/
87 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/clamconf $(1)/usr/sbin/
88 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/clamdscan $(1)/usr/sbin/
89 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/clamscan $(1)/usr/sbin/
90 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/sigtool $(1)/usr/sbin/
92 $(INSTALL_DIR) $(1)/usr/include
93 $(CP) $(PKG_INSTALL_DIR)/usr/include/clamav.h $(1)/usr/include/
95 $(INSTALL_DIR) $(1)/usr/lib
96 $(CP) $(PKG_INSTALL_DIR)/usr/lib*/* $(1)/usr/lib/
98 $(INSTALL_DIR) $(1)/etc/config
99 $(INSTALL_CONF) ./files/clamav.config $(1)/etc/config/clamav
101 $(INSTALL_DIR) $(1)/etc/init.d/
102 $(INSTALL_BIN) ./files/clamav.init $(1)/etc/init.d/clamav
104 $(INSTALL_DIR) $(1)/usr/share/clamav
105 $(CP) ./files/bytecode.cvd $(1)/usr/share/clamav/
108 define Package/freshclam/install
109 $(INSTALL_DIR) $(1)/usr/sbin
110 $(CP) $(PKG_INSTALL_DIR)/usr/bin/freshclam $(1)/usr/sbin/
112 $(INSTALL_DIR) $(1)/etc/config
113 $(INSTALL_CONF) ./files/freshclam.config $(1)/etc/config/freshclam
115 $(INSTALL_DIR) $(1)/etc/init.d/
116 $(INSTALL_BIN) ./files/freshclam.init $(1)/etc/init.d/freshclam
119 $(eval $(call BuildPackage,clamav))
120 $(eval $(call BuildPackage,freshclam))