2 # Copyright (C) 2017 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
14 PKG_SOURCE
:=$(PKG_NAME
)-$(PKG_VERSION
).
tar.gz
15 PKG_SOURCE_URL
:=https
://codeload.github.com
/VirusTotal
/yara
/tar.gz
/v
$(PKG_VERSION
)?
16 PKG_HASH
:=6f567d4e4b79a210cd57a820f59f19ee69b024188ef4645b1fc11488a4660951
18 PKG_MAINTAINER
:=Marko Ratkaj
<markoratkaj@gmail.com
>
19 PKG_LICENSE
:=BSD-3-Clause
20 PKG_LICENSE_FILES
:=COPYING
21 PKG_CPE_ID
:=cpe
:/a
:virustotal
:yara
27 include $(INCLUDE_DIR
)/package.mk
32 TITLE
:=Pattern matching swiss knife for malware researchers
33 URL
:=http
://virustotal.github.io
/yara
/
35 DEPENDS
+= +YARA_module_magic
:file
36 DEPENDS
+= +YARA_module_cuckoo
:jansson
40 define Package
/yara
/description
41 YARA is a tool aimed at
(but not limited to
) helping malware researchers
42 to identify and classify malware samples. With YARA you can create
43 descriptions of malware families based on textual or binary patterns.
47 $(if
$(CONFIG_YARA_module_dotnet
),--enable
,--disable
)-dotnet \
48 $(if
$(CONFIG_YARA_module_magic
),--enable
,--disable
)-magic \
49 $(if
$(CONFIG_YARA_module_cuckoo
),--enable
,--disable
)-cuckoo
51 define Package
/yara
/config
52 source
"$(SOURCE)/Config.in"
55 define Build
/InstallDev
56 $(INSTALL_DIR
) $(1)/usr
/include
57 $(CP
) $(PKG_INSTALL_DIR
)/usr
/include/yara.h
$(1)/usr
/include
58 $(INSTALL_DIR
) $(1)/usr
/include/yara
59 $(CP
) $(PKG_INSTALL_DIR
)/usr
/include/yara
/* $(1)/usr
/include/yara
60 $(INSTALL_DIR
) $(1)/usr
/lib
61 $(CP
) $(PKG_INSTALL_DIR
)/usr
/lib
/libyara.
{a
,la
,so
*} $(1)/usr
/lib
/
62 $(INSTALL_DIR
) $(1)/usr
/lib
/pkgconfig
63 $(CP
) $(PKG_INSTALL_DIR
)/usr
/lib
/pkgconfig
/yara.
pc $(1)/usr
/lib
/pkgconfig
66 define Package
/yara
/install
67 $(INSTALL_DIR
) $(1)/usr
/bin
68 $(INSTALL_BIN
) $(PKG_INSTALL_DIR
)/usr
/bin
/yara
$(1)/usr
/bin
/
69 $(INSTALL_BIN
) $(PKG_INSTALL_DIR
)/usr
/bin
/yarac
$(1)/usr
/bin
/
70 $(INSTALL_DIR
) $(1)/usr
/lib
/
71 $(CP
) $(PKG_INSTALL_DIR
)/usr
/lib
/libyara.so
* $(1)/usr
/lib
/
74 $(eval
$(call BuildPackage
,yara
))