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