-
Notifications
You must be signed in to change notification settings - Fork 21
/
Makefile
64 lines (54 loc) · 1.79 KB
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
#
# Copyright (C) 2006-2015 OpenWrt.org
#
# This is free software, licensed under the GNU General Public License v2.
# See /LICENSE for more information.
#
include $(TOPDIR)/rules.mk
PKG_NAME:=suricata
PKG_VERSION:=4.0.4
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
PKG_SOURCE_URL:=https://www.openinfosecfoundation.org/download/
PKG_MD5SUM:=0ed72192cca00bea63ffd5463bacbdd5
PKG_FIXUP:=autoreconf
PKG_INSTALL:=1
include $(INCLUDE_DIR)/package.mk
include $(INCLUDE_DIR)/nls.mk
define Package/suricata
SUBMENU:=Firewall
SECTION:=net
CATEGORY:=Network
DEPENDS:=+libyaml +libpcap +libpcre +jansson +libnetfilter-queue +libmagic +libnfnetlink +libpthread +zlib $(ICONV_DEPENDS)
TITLE:=OISF Suricata IDS
URL:=https://www.openinfosecfoundation.org/
endef
CONFIGURE_ARGS = \
--prefix="/usr" \
--sysconfdir="/etc" \
--enable-nfqueue \
--enable-gccprotect \
--enable-debug \
--enable-pie \
--host=$(ARCH)
define Package/suricata/install
$(INSTALL_DIR) $(1)/usr/bin
$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/suricata $(1)/usr/bin/suricata
$(INSTALL_DIR) $(1)/usr/lib
$(CP) $(PKG_INSTALL_DIR)/usr/lib/* $(1)/usr/lib/
$(INSTALL_DIR) $(1)/usr/lib/pkgconfig
$(CP) $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/* $(1)/usr/lib/pkgconfig/
$(INSTALL_DIR) $(1)/etc/suricata
$(CP) \
$(PKG_BUILD_DIR)/suricata.yaml \
$(PKG_BUILD_DIR)/classification.config \
$(PKG_BUILD_DIR)/threshold.config \
$(PKG_BUILD_DIR)/reference.config \
$(1)/etc/suricata/
$(INSTALL_DIR) $(1)/etc/suricata/rules
$(CP) $(PKG_BUILD_DIR)/rules/*.rules $(1)/etc/suricata/rules/
$(INSTALL_DIR) $(1)/etc/init.d
$(INSTALL_BIN) ./files/suricata.init $(1)/etc/init.d/suricata
$(INSTALL_DIR) $(1)/etc/suricata
$(CP) ./files/suricata.yaml $(1)/etc/suricata/
endef
$(eval $(call BuildPackage,suricata))