2 # Copyright (C) 2007 OpenWrt.org
4 # This is free software, licensed under the GNU General Public License v2.
5 # See /LICENSE for more information.
9 include $(TOPDIR)/rules.mk
15 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
16 PKG_SOURCE_URL:=@SF/ngrep
17 PKG_MD5SUM:=bc8150331601f3b869549c94866b4f1c
20 PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)
21 PKG_INSTALL_DIR:=$(PKG_BUILD_DIR)/ipkg-install
23 include $(INCLUDE_DIR)/package.mk
28 DEPENDS:=+libpcap +libpcre
31 ngrep a pcap-aware tool that will allow you to specify extended\\\
32 regular expressions to match against data payloads of packets. It\\\
33 currently recognizes TCP, UDP, and ICMP across Ethernet, PPP, SLIP,\\\
34 FDDI, Token Ring and null interfaces, and understands BPF filter\\\
35 logic in the same fashion as more common packet sniffing tools,\\\
36 like tcpdump and snoop.
37 URL:=http://ngrep.sourceforge.net
40 define Build/Configure
41 $(call Build/Configure/Default, \
42 --with-pcap-includes=$(STAGING_DIR)/usr/include \
44 --with-pcre=$(STAGING_DIR)/usr \
48 LDFLAGS="-L$(STAGING_DIR)/usr/lib -lpcre" \
53 $(call Build/Compile/Default,\
54 DESTDIR="$(PKG_INSTALL_DIR)" \
59 define Package/ngrep/install
60 $(INSTALL_DIR) $(1)/usr/sbin
61 $(CP) $(PKG_BUILD_DIR)/$(PKG_NAME) $(1)/usr/sbin/
64 $(eval $(call BuildPackage,ngrep))