2 # Copyright (C) 2006-2015 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
12 PKG_RELEASE
:=$(AUTORELEASE
)
15 PKG_MAINTAINER
:=W. Michael Petullo
<mike@flyn.org
>
16 PKG_CPE_ID
:=cpe
:/a
:snort
:snort
18 PKG_SOURCE
:=$(PKG_NAME
)-$(PKG_VERSION
).
tar.gz
19 PKG_SOURCE_URL
:=https
://www.snort.org
/downloads
/archive
/snort
/ \
21 PKG_HASH
:=b12fc6db72afb58987a2bf1954b8f45bde02047c235513c7663857b9506369c7
23 PKG_BUILD_DEPENDS
:=libtirpc
24 PKG_BUILD_DIR
:=$(BUILD_DIR
)/$(PKG_NAME
)/$(PKG_NAME
)-$(PKG_VERSION
)
28 include $(INCLUDE_DIR
)/package.mk
34 DEPENDS
:=+libdaq
+libdnet
+libnghttp2
+libopenssl
+libpcap
+libpcre
+libpthread
+libtirpc
+libuuid
+zlib
+luajit
+SNORT_LZMA
:liblzma
35 TITLE
:=Lightweight Network Intrusion Detection System
36 URL
:=http
://www.snort.org
/
41 define Package
/snort
/description
42 Snort is an open source network intrusion detection and prevention system.
43 It is capable of performing real-time traffic analysis
, alerting
, blocking
44 and packet logging on IP networks. It utilizes a combination of protocol
45 analysis and pattern matching in order to detect anomalies
, misuse and
49 define Package
/snort
/config
50 source
"$(SOURCE)/Config.in"
56 --with-dnet-includes
="$(STAGING_DIR)/usr/include" \
57 --with-dnet-libraries
="$(STAGING_DIR)/usr/lib" \
58 --with-libpcap-includes
="$(STAGING_DIR)/usr/include" \
59 --with-libpcap-libraries
="$(STAGING_DIR)/usr/lib" \
60 --with-libpcre-includes
="$(STAGING_DIR)/usr/include" \
61 --with-libpcre-libraries
="$(STAGING_DIR)/usr/lib" \
62 --with-daq-includes
="$(STAGING_DIR)/usr/include/daq2" \
63 --with-daq-libraries
="$(STAGING_DIR)/usr/lib/daq2" \
66 ifeq ($(CONFIG_SNORT_LZMA
),)
72 PATH
="$(STAGING_DIR)/usr/lib/libnet-1.0.x/bin:$$$$PATH"
77 TARGET_CFLAGS
+= -I
$(STAGING_DIR
)/usr
/include/tirpc
79 define Build
/InstallDev
80 $(INSTALL_DIR
) $(STAGING_DIR
)/usr
/include/snort
/dynamic_preproc
82 $(PKG_INSTALL_DIR
)/usr
/include/snort
/dynamic_preproc
/* \
83 $(STAGING_DIR
)/usr
/include/snort
/dynamic_preproc
/
84 $(INSTALL_DIR
) $(STAGING_DIR
)/usr
/lib
/snort
/dynamic_preproc
86 $(PKG_INSTALL_DIR
)/usr
/lib
/snort
/dynamic_preproc
/* \
87 $(STAGING_DIR
)/usr
/lib
/snort
/dynamic_preproc
/
88 $(INSTALL_DIR
) $(STAGING_DIR
)/usr
/lib
/snort_dynamicengine
90 $(PKG_INSTALL_DIR
)/usr
/lib
/snort_dynamicengine
/* \
91 $(STAGING_DIR
)/usr
/lib
/snort_dynamicengine
/
92 $(INSTALL_DIR
) $(STAGING_DIR
)/usr
/lib
/snort_dynamicpreprocessor
94 $(PKG_INSTALL_DIR
)/usr
/lib
/snort_dynamicpreprocessor
/* \
95 $(STAGING_DIR
)/usr
/lib
/snort_dynamicpreprocessor
/
98 define Package
/snort
/conffiles
100 /etc
/snort
/snort.conf
103 define Package
/snort
/install
104 $(INSTALL_DIR
) $(1)/usr
/bin
106 $(PKG_INSTALL_DIR
)/usr
/bin
/snort \
110 $(PKG_INSTALL_DIR
)/usr
/bin
/u2
{boat
,spewfoo
} \
113 $(INSTALL_DIR
) $(1)/usr
/lib
/snort_dynamicengine
115 $(PKG_INSTALL_DIR
)/usr
/lib
/snort_dynamicengine
/libsf_engine.so
* \
116 $(1)/usr
/lib
/snort_dynamicengine
/
118 $(INSTALL_DIR
) $(1)/usr
/lib
/snort_dynamicpreprocessor
120 $(PKG_INSTALL_DIR
)/usr
/lib
/snort_dynamicpreprocessor
/libsf
*.so
* \
121 $(1)/usr
/lib
/snort_dynamicpreprocessor
/
123 $(INSTALL_DIR
) $(1)/etc
/snort
125 $(PKG_BUILD_DIR
)/etc
/snort.conf \
128 $(PKG_BUILD_DIR
)/etc
/attribute_table.dtd \
131 $(PKG_BUILD_DIR
)/etc
/classification.config \
134 $(PKG_BUILD_DIR
)/etc
/gen-msg.map \
137 $(PKG_BUILD_DIR
)/etc
/reference.config \
140 $(PKG_BUILD_DIR
)/etc
/unicode.map \
143 $(INSTALL_DIR
) $(1)/etc
/snort
/preproc_rules
145 $(PKG_BUILD_DIR
)/preproc_rules
/*.rules \
146 $(1)/etc
/snort
/preproc_rules
/
148 $(INSTALL_DIR
) $(1)/etc
/init.d
151 $(1)/etc
/init.d
/snort
153 $(INSTALL_DIR
) $(1)/etc
/config
155 .
/files
/snort.config \
156 $(1)/etc
/config
/snort
159 $(eval
$(call BuildPackage
,snort
))