2007-05-20 14:22:20 +00:00
|
|
|
#
|
2009-04-29 12:56:17 +00:00
|
|
|
# Copyright (C) 2007-2009 OpenWrt.org
|
2007-05-20 14:22:20 +00:00
|
|
|
#
|
|
|
|
# This is free software, licensed under the GNU General Public License v2.
|
|
|
|
# See /LICENSE for more information.
|
|
|
|
#
|
|
|
|
|
|
|
|
include $(TOPDIR)/rules.mk
|
|
|
|
|
|
|
|
PKG_NAME:=ngrep
|
|
|
|
PKG_VERSION:=1.45
|
2009-07-26 11:57:29 +00:00
|
|
|
PKG_RELEASE:=2
|
2007-05-20 14:22:20 +00:00
|
|
|
|
|
|
|
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
|
|
|
|
PKG_SOURCE_URL:=@SF/ngrep
|
|
|
|
PKG_MD5SUM:=bc8150331601f3b869549c94866b4f1c
|
|
|
|
|
|
|
|
include $(INCLUDE_DIR)/package.mk
|
|
|
|
|
|
|
|
define Package/ngrep
|
|
|
|
SECTION:=net
|
|
|
|
CATEGORY:=Network
|
|
|
|
DEPENDS:=+libpcap +libpcre
|
|
|
|
TITLE:=network grep
|
|
|
|
URL:=http://ngrep.sourceforge.net
|
|
|
|
endef
|
|
|
|
|
2007-10-14 04:32:56 +00:00
|
|
|
define Package/ngrep/description
|
|
|
|
ngrep a pcap-aware tool that will allow you to specify extended
|
|
|
|
regular expressions to match against data payloads of packets. It
|
|
|
|
currently recognizes TCP, UDP, and ICMP across Ethernet, PPP, SLIP,
|
|
|
|
FDDI, Token Ring and null interfaces, and understands BPF filter
|
|
|
|
logic in the same fashion as more common packet sniffing tools,
|
|
|
|
like tcpdump and snoop.
|
|
|
|
endef
|
|
|
|
|
2007-05-20 14:22:20 +00:00
|
|
|
define Build/Configure
|
|
|
|
$(call Build/Configure/Default, \
|
|
|
|
--with-pcap-includes=$(STAGING_DIR)/usr/include \
|
|
|
|
--enable-pcre \
|
|
|
|
--with-pcre=$(STAGING_DIR)/usr \
|
|
|
|
--disable-dropprivs \
|
|
|
|
,\
|
2009-04-29 12:56:17 +00:00
|
|
|
LDFLAGS="$(TARGET_LDFLAGS) -lpcre" \
|
2007-05-20 14:22:20 +00:00
|
|
|
)
|
|
|
|
endef
|
|
|
|
|
|
|
|
define Build/Compile
|
|
|
|
$(call Build/Compile/Default,\
|
|
|
|
DESTDIR="$(PKG_INSTALL_DIR)" \
|
|
|
|
all \
|
|
|
|
)
|
|
|
|
endef
|
|
|
|
|
|
|
|
define Package/ngrep/install
|
|
|
|
$(INSTALL_DIR) $(1)/usr/sbin
|
|
|
|
$(CP) $(PKG_BUILD_DIR)/$(PKG_NAME) $(1)/usr/sbin/
|
|
|
|
endef
|
|
|
|
|
|
|
|
$(eval $(call BuildPackage,ngrep))
|