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.

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