DESCRIPTION:= is obselete
[packages.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 PKG_CAT:=bzcat
19
20 PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)
21 PKG_INSTALL_DIR:=$(PKG_BUILD_DIR)/ipkg-install
22
23 include $(INCLUDE_DIR)/package.mk
24
25 define Package/ngrep
26   SECTION:=net
27   CATEGORY:=Network
28   DEPENDS:=+libpcap +libpcre
29   TITLE:=network grep
30   URL:=http://ngrep.sourceforge.net
31 endef
32
33 define Package/ngrep/description
34         ngrep a pcap-aware tool that will allow you to specify extended
35         regular expressions to match against data payloads of packets. It
36         currently recognizes TCP, UDP, and ICMP across Ethernet, PPP, SLIP,
37         FDDI, Token Ring and null interfaces, and understands BPF filter
38         logic in the same fashion as more common packet sniffing tools,
39         like tcpdump and snoop.
40 endef
41
42 define Build/Configure
43         $(call Build/Configure/Default, \
44                 --with-pcap-includes=$(STAGING_DIR)/usr/include \
45                 --enable-pcre \
46                 --with-pcre=$(STAGING_DIR)/usr \
47                 --enable-ipv6 \
48                 --disable-dropprivs \
49                 ,\
50                 LDFLAGS="-L$(STAGING_DIR)/usr/lib -lpcre" \
51         )
52 endef
53
54 define Build/Compile    
55         $(call Build/Compile/Default,\
56                 DESTDIR="$(PKG_INSTALL_DIR)" \
57                 all \
58         )
59 endef
60
61 define Package/ngrep/install    
62         $(INSTALL_DIR) $(1)/usr/sbin
63         $(CP) $(PKG_BUILD_DIR)/$(PKG_NAME) $(1)/usr/sbin/
64 endef
65
66 $(eval $(call BuildPackage,ngrep))