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