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
15 PKG_MAINTAINER
:=Luka Perkov
<luka@openwrt.org
>
17 PKG_SOURCE
:=$(PKG_NAME
)-$(PKG_VERSION
).
tar.gz
18 PKG_SOURCE_URL
:=https
://www.snort.org
/downloads
/snort
/ \
20 PKG_HASH
:=db57c532919d9ababac127f29dbdc05ed832394880e46cad81a5dde713ccb4be
22 PKG_BUILD_DEPENDS
:=librpc
23 PKG_BUILD_DIR
:=$(BUILD_DIR
)/$(PKG_NAME
)/$(PKG_NAME
)-$(PKG_VERSION
)
27 include $(INCLUDE_DIR
)/package.mk
33 DEPENDS
:=+libdaq
+libdnet
+libopenssl
+libpcap
+libpcre
+libpthread
+libuuid
+zlib
+SNORT_LZMA
:liblzma
34 TITLE
:=Lightweight Network Intrusion Detection System
35 URL
:=http
://www.snort.org
/
39 define Package
/snort
/description
40 Snort is an open source network intrusion detection and prevention system.
41 It is capable of performing real-time traffic analysis
, alerting
, blocking
42 and packet logging on IP networks. It utilizes a combination of protocol
43 analysis and pattern matching in order to detect anomalies
, misuse and
47 define Package
/snort
/config
48 source
"$(SOURCE)/Config.in"
54 --with-dnet-includes
="$(STAGING_DIR)/usr/include" \
55 --with-dnet-libraries
="$(STAGING_DIR)/usr/lib" \
56 --with-libpcap-includes
="$(STAGING_DIR)/usr/include" \
57 --with-libpcap-libraries
="$(STAGING_DIR)/usr/lib" \
58 --with-libpcre-includes
="$(STAGING_DIR)/usr/include" \
59 --with-libpcre-libraries
="$(STAGING_DIR)/usr/lib" \
60 --with-daq-includes
="$(STAGING_DIR)/usr/include" \
61 --with-daq-libraries
="$(STAGING_DIR)/usr/lib" \
64 ifeq ($(CONFIG_SNORT_LZMA
),)
70 PATH
="$(STAGING_DIR)/usr/lib/libnet-1.0.x/bin:$$$$PATH"
75 define Build
/InstallDev
76 $(INSTALL_DIR
) $(STAGING_DIR
)/usr
/include/snort
/dynamic_preproc
78 $(PKG_INSTALL_DIR
)/usr
/include/snort
/dynamic_preproc
/* \
79 $(STAGING_DIR
)/usr
/include/snort
/dynamic_preproc
/
80 $(INSTALL_DIR
) $(STAGING_DIR
)/usr
/lib
/snort
/dynamic_preproc
82 $(PKG_INSTALL_DIR
)/usr
/lib
/snort
/dynamic_preproc
/* \
83 $(STAGING_DIR
)/usr
/lib
/snort
/dynamic_preproc
/
84 $(INSTALL_DIR
) $(STAGING_DIR
)/usr
/lib
/snort_dynamicengine
86 $(PKG_INSTALL_DIR
)/usr
/lib
/snort_dynamicengine
/* \
87 $(STAGING_DIR
)/usr
/lib
/snort_dynamicengine
/
88 $(INSTALL_DIR
) $(STAGING_DIR
)/usr
/lib
/snort_dynamicpreprocessor
90 $(PKG_INSTALL_DIR
)/usr
/lib
/snort_dynamicpreprocessor
/* \
91 $(STAGING_DIR
)/usr
/lib
/snort_dynamicpreprocessor
/
94 define Package
/snort
/conffiles
99 define Package
/snort
/install
100 $(INSTALL_DIR
) $(1)/usr
/bin
102 $(PKG_INSTALL_DIR
)/usr
/bin
/snort \
106 $(PKG_INSTALL_DIR
)/usr
/bin
/u2
{boat
,spewfoo
} \
109 $(INSTALL_DIR
) $(1)/usr
/lib
/snort_dynamicengine
111 $(PKG_INSTALL_DIR
)/usr
/lib
/snort_dynamicengine
/libsf_engine.so
* \
112 $(1)/usr
/lib
/snort_dynamicengine
/
114 $(INSTALL_DIR
) $(1)/usr
/lib
/snort_dynamicpreprocessor
116 $(PKG_INSTALL_DIR
)/usr
/lib
/snort_dynamicpreprocessor
/libsf
*.so
* \
117 $(1)/usr
/lib
/snort_dynamicpreprocessor
/
119 $(INSTALL_DIR
) $(1)/etc
/snort
121 $(PKG_BUILD_DIR
)/etc
/snort.conf \
124 $(PKG_BUILD_DIR
)/etc
/attribute_table.dtd \
127 $(PKG_BUILD_DIR
)/etc
/classification.config \
130 $(PKG_BUILD_DIR
)/etc
/gen-msg.map \
133 $(PKG_BUILD_DIR
)/etc
/reference.config \
136 $(PKG_BUILD_DIR
)/etc
/unicode.map \
139 $(INSTALL_DIR
) $(1)/etc
/snort
/preproc_rules
141 $(PKG_BUILD_DIR
)/preproc_rules
/*.rules \
142 $(1)/etc
/snort
/preproc_rules
/
144 $(INSTALL_DIR
) $(1)/etc
/init.d
147 $(1)/etc
/init.d
/snort
149 $(INSTALL_DIR
) $(1)/etc
/config
151 .
/files
/snort.config \
152 $(1)/etc
/config
/snort
155 $(eval
$(call BuildPackage
,snort
))