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.

72 lines
2.2 KiB

  1. #
  2. # Copyright (C) 2017 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:=yara
  9. PKG_VERSION:=3.10.0
  10. PKG_RELEASE:=1
  11. PKG_LICENSE:=BSD-3-Clause
  12. PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
  13. PKG_SOURCE_URL:=https://codeload.github.com/VirusTotal/yara/tar.gz/v$(PKG_VERSION)?
  14. PKG_HASH:=3281d43d6b49a4ca8d3a5d2521e06a0b72863702022f981b051856c2b83449c2
  15. PKG_CPE_ID:=cpe:/a:virustotal:yara
  16. PKG_FIXUP:=autoreconf
  17. PKG_BUILD_PARALLEL:=1
  18. PKG_INSTALL:=1
  19. include $(INCLUDE_DIR)/package.mk
  20. define Package/yara
  21. SECTION:=utils
  22. CATEGORY:=Utilities
  23. TITLE:=Pattern matching swiss knife for malware researchers
  24. URL:=http://virustotal.github.io/yara/
  25. MAINTAINER:=Marko Ratkaj <marko.ratkaj@sartura.hr>
  26. DEPENDS:= +libopenssl
  27. DEPENDS+= +YARA_module_magic:file
  28. DEPENDS+= +YARA_module_cuckoo:jansson
  29. MENU:=1
  30. endef
  31. define Package/yara/description
  32. YARA is a tool aimed at (but not limited to) helping malware researchers
  33. to identify and classify malware samples. With YARA you can create
  34. descriptions of malware families based on textual or binary patterns.
  35. endef
  36. CONFIGURE_ARGS += \
  37. $(if $(CONFIG_YARA_module_dotnet),--enable,--disable)-dotnet \
  38. $(if $(CONFIG_YARA_module_magic),--enable,--disable)-magic \
  39. $(if $(CONFIG_YARA_module_cuckoo),--enable,--disable)-cuckoo
  40. define Package/yara/config
  41. source "$(SOURCE)/Config.in"
  42. endef
  43. define Build/InstallDev
  44. $(INSTALL_DIR) $(1)/usr/include
  45. $(CP) $(PKG_INSTALL_DIR)/usr/include/yara.h $(1)/usr/include
  46. $(INSTALL_DIR) $(1)/usr/include/yara
  47. $(CP) $(PKG_INSTALL_DIR)/usr/include/yara/* $(1)/usr/include/yara
  48. $(INSTALL_DIR) $(1)/usr/lib
  49. $(CP) $(PKG_INSTALL_DIR)/usr/lib/libyara.{a,la,so*} $(1)/usr/lib/
  50. $(INSTALL_DIR) $(1)/usr/lib/pkgconfig
  51. $(CP) $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/yara.pc $(1)/usr/lib/pkgconfig
  52. endef
  53. define Package/yara/install
  54. $(INSTALL_DIR) $(1)/usr/bin
  55. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/yara $(1)/usr/bin/
  56. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/yarac $(1)/usr/bin/
  57. $(INSTALL_DIR) $(1)/usr/lib/
  58. $(CP) $(PKG_INSTALL_DIR)/usr/lib/libyara.so* $(1)/usr/lib/
  59. endef
  60. $(eval $(call BuildPackage,yara))