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.

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