ksmbd-tools: update to 3.5.1
[feed/packages.git] / utils / yara / Makefile
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
8 include $(TOPDIR)/rules.mk
9
10 PKG_NAME:=yara
11 PKG_VERSION:=4.2.0
12 PKG_RELEASE:=1
13
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
17
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
22
23 PKG_FIXUP:=autoreconf
24 PKG_INSTALL:=1
25 PKG_BUILD_PARALLEL:=1
26
27 include $(INCLUDE_DIR)/package.mk
28
29 define Package/yara
30 SECTION:=utils
31 CATEGORY:=Utilities
32 TITLE:=Pattern matching swiss knife for malware researchers
33 URL:=http://virustotal.github.io/yara/
34 DEPENDS:= +libopenssl
35 DEPENDS+= +YARA_module_magic:file
36 DEPENDS+= +YARA_module_cuckoo:jansson
37 MENU:=1
38 endef
39
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.
44 endef
45
46 CONFIGURE_ARGS += \
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
50
51 define Package/yara/config
52 source "$(SOURCE)/Config.in"
53 endef
54
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
64 endef
65
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/
72 endef
73
74 $(eval $(call BuildPackage,yara))