You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

120 lines
3.0 KiB

  1. #
  2. # Copyright (C) 2015 OpenWrt.org
  3. #
  4. # This is free software, licensed under the GNU General Public License v2.
  5. # See /LICENSE for more information.
  6. #
  7. include $(TOPDIR)/rules.mk
  8. PKG_NAME:=clamav
  9. PKG_VERSION:=0.98.7
  10. PKG_RELEASE:=1
  11. PKG_LICENSE:=GPL-2.0
  12. PKG_MAINTAINER:=Marko Ratkaj <marko.ratkaj@sartura.hr>
  13. PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
  14. PKG_SOURCE_URL:=http://sourceforge.net/projects/clamav/files/clamav/$(PKG_VERSION)/
  15. PKG_MD5SUM:=157c601161da1c2d5a0e48ea1b49e067
  16. PKG_BUILD_PARALLEL:=1
  17. PKG_INSTALL:=1
  18. include $(INCLUDE_DIR)/uclibc++.mk
  19. include $(INCLUDE_DIR)/package.mk
  20. define Package/clamav/Default
  21. SECTION:=net
  22. DEPENDS:=+libpthread +uclibcxx +zlib +libcurl +libopenssl
  23. CATEGORY:=Network
  24. SUBMENU:=Web Servers/Proxies
  25. TITLE:=ClamAV
  26. URL:=http://www.clamav.net/
  27. endef
  28. define Package/clamav
  29. $(call Package/clamav/Default)
  30. endef
  31. define Package/freshclam
  32. $(call Package/clamav/Default)
  33. DEPENDS+= +clamav
  34. TITLE+=database updater
  35. endef
  36. define Package/clamav/description
  37. ClamAV is an open source antivirus engine for detecting trojans,
  38. viruses, malware & other malicious threats.
  39. endef
  40. define Package/freshclam/description
  41. Database updater for ClamAV
  42. endef
  43. define Package/clamav/conffiles
  44. endef
  45. CONFIGURE_VARS += \
  46. INCLUDES="" \
  47. CXXFLAGS="$$$$CXXFLAGS -fno-rtti" \
  48. LIBS="-lpthread" \
  49. define Build/Configure
  50. $(call Build/Configure/Default, \
  51. --sysconfdir=/etc/clamav/ \
  52. --prefix=/usr/ \
  53. --exec-prefix=/usr/ \
  54. --disable-xml \
  55. --disable-bzip2 \
  56. --enable-ltdl-install \
  57. --with-user nobody \
  58. --with-group nogroup \
  59. )
  60. endef
  61. define Build/Compile
  62. $(MAKE) -C $(PKG_BUILD_DIR) \
  63. DESTDIR="$(PKG_INSTALL_DIR)" \
  64. all install
  65. endef
  66. define Package/clamav/install
  67. $(INSTALL_DIR) $(1)/usr/sbin
  68. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/clamd $(1)/usr/sbin/
  69. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/clamav-config $(1)/usr/sbin/
  70. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/clambc $(1)/usr/sbin/
  71. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/clamconf $(1)/usr/sbin/
  72. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/clamdscan $(1)/usr/sbin/
  73. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/clamscan $(1)/usr/sbin/
  74. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/sigtool $(1)/usr/sbin/
  75. $(INSTALL_DIR) $(1)/usr/include
  76. $(CP) $(PKG_INSTALL_DIR)/usr/include/clamav.h $(1)/usr/include/
  77. $(INSTALL_DIR) $(1)/usr/lib
  78. $(CP) $(PKG_INSTALL_DIR)/usr/lib*/* $(1)/usr/lib/
  79. $(INSTALL_DIR) $(1)/etc/config
  80. $(INSTALL_CONF) ./files/clamav.config $(1)/etc/config/clamav
  81. $(INSTALL_DIR) $(1)/etc/init.d/
  82. $(INSTALL_BIN) ./files/clamav.init $(1)/etc/init.d/clamav
  83. $(INSTALL_DIR) $(1)/usr/share/clamav
  84. $(CP) ./files/bytecode.cvd $(1)/usr/share/clamav/
  85. endef
  86. define Package/freshclam/install
  87. $(INSTALL_DIR) $(1)/usr/sbin
  88. $(CP) $(PKG_INSTALL_DIR)/usr/bin/freshclam $(1)/usr/sbin/
  89. $(INSTALL_DIR) $(1)/etc/config
  90. $(INSTALL_CONF) ./files/freshclam.config $(1)/etc/config/freshclam
  91. $(INSTALL_DIR) $(1)/etc/init.d/
  92. $(INSTALL_BIN) ./files/freshclam.init $(1)/etc/init.d/freshclam
  93. endef
  94. $(eval $(call BuildPackage,clamav))
  95. $(eval $(call BuildPackage,freshclam))