Add nufw
[openwrt/svn-archive/archive.git] / net / ngrep / Makefile
1 #
2 # Copyright (C) 2007 OpenWrt.org
3 #
4 # This is free software, licensed under the GNU General Public License v2.
5 # See /LICENSE for more information.
6 #
7 # $Id$
8
9 include $(TOPDIR)/rules.mk
10
11 PKG_NAME:=ngrep
12 PKG_VERSION:=1.45
13 PKG_RELEASE:=1
14
15 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
16 PKG_SOURCE_URL:=@SF/ngrep
17 PKG_MD5SUM:=bc8150331601f3b869549c94866b4f1c
18
19 PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)
20 PKG_INSTALL_DIR:=$(PKG_BUILD_DIR)/ipkg-install
21
22 include $(INCLUDE_DIR)/package.mk
23
24 define Package/ngrep
25 SECTION:=net
26 CATEGORY:=Network
27 DEPENDS:=+libpcap +libpcre
28 TITLE:=network grep
29 URL:=http://ngrep.sourceforge.net
30 endef
31
32 define Package/ngrep/description
33 ngrep a pcap-aware tool that will allow you to specify extended
34 regular expressions to match against data payloads of packets. It
35 currently recognizes TCP, UDP, and ICMP across Ethernet, PPP, SLIP,
36 FDDI, Token Ring and null interfaces, and understands BPF filter
37 logic in the same fashion as more common packet sniffing tools,
38 like tcpdump and snoop.
39 endef
40
41 define Build/Configure
42 $(call Build/Configure/Default, \
43 --with-pcap-includes=$(STAGING_DIR)/usr/include \
44 --enable-pcre \
45 --with-pcre=$(STAGING_DIR)/usr \
46 --enable-ipv6 \
47 --disable-dropprivs \
48 ,\
49 LDFLAGS="-L$(STAGING_DIR)/usr/lib -lpcre" \
50 )
51 endef
52
53 define Build/Compile
54 $(call Build/Compile/Default,\
55 DESTDIR="$(PKG_INSTALL_DIR)" \
56 all \
57 )
58 endef
59
60 define Package/ngrep/install
61 $(INSTALL_DIR) $(1)/usr/sbin
62 $(CP) $(PKG_BUILD_DIR)/$(PKG_NAME) $(1)/usr/sbin/
63 endef
64
65 $(eval $(call BuildPackage,ngrep))