summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--package/ngrep/Makefile31
-rw-r--r--package/ngrep/patches/patch-Makefile_in11
-rw-r--r--package/ngrep/patches/patch-regex-0_12_Makefile_in19
-rw-r--r--package/ngrep/patches/patch-regex-0_12_regex_c13
4 files changed, 74 insertions, 0 deletions
diff --git a/package/ngrep/Makefile b/package/ngrep/Makefile
new file mode 100644
index 000000000..606b9a0b6
--- /dev/null
+++ b/package/ngrep/Makefile
@@ -0,0 +1,31 @@
+# This file is part of the OpenADK project. OpenADK is copyrighted
+# material, please see the LICENCE file in the top-level directory.
+
+include $(ADK_TOPDIR)/rules.mk
+
+PKG_NAME:= ngrep
+PKG_VERSION:= 1.45
+PKG_RELEASE:= 1
+PKG_HASH:= aea6dd337da8781847c75b3b5b876e4de9c58520e0d77310679a979fc6402fa7
+PKG_DESCR:= network grep
+PKG_SECTION:= net/debug
+PKG_DEPENDS:= libpcap libpcre
+PKG_BUILDDEP:= libpcap pcre
+PKG_URL:= http://ngrep.sourceforge.net/
+PKG_SITES:= ${MASTER_SITE_SOURCEFORGE:=ngrep/}
+
+DISTFILES:= $(PKG_NAME)-$(PKG_VERSION).tar.bz2
+
+include $(ADK_TOPDIR)/mk/package.mk
+
+$(eval $(call PKG_template,NGREP,ngrep,$(PKG_VERSION)-$(PKG_RELEASE),$(PKG_DEPENDS),$(PKG_DESCR),$(PKG_SECTION)))
+
+CONFIGURE_ARGS+= --disable-pcap-restart \
+ --with-pcap-includes=$(STAGING_TARGET_DIR)/usr/include
+
+ngrep-install:
+ $(INSTALL_DIR) $(IDIR_NGREP)/usr/bin
+ $(INSTALL_BIN) $(WRKINST)/usr/bin/ngrep \
+ $(IDIR_NGREP)/usr/bin
+
+include $(ADK_TOPDIR)/mk/pkg-bottom.mk
diff --git a/package/ngrep/patches/patch-Makefile_in b/package/ngrep/patches/patch-Makefile_in
new file mode 100644
index 000000000..40659bb8d
--- /dev/null
+++ b/package/ngrep/patches/patch-Makefile_in
@@ -0,0 +1,11 @@
+--- ngrep-1.45.orig/Makefile.in 2006-11-28 14:35:37.000000000 +0100
++++ ngrep-1.45/Makefile.in 2016-02-08 06:24:48.000000000 +0100
+@@ -63,7 +63,7 @@ distclean: clean
+ rm -f config.status config.cache config.log config.h Makefile
+
+ $(REGEX_OBJS): $(REGEX_OBJS:.o=.c) $(REGEX_DIR)/*.h
+- $(MAKE) $(MAKEFLAGS) -C $(REGEX_DIR) $(notdir $(REGEX_OBJS))
++ $(MAKE) -C $(REGEX_DIR) $(notdir $(REGEX_OBJS))
+
+ $(OBJS): Makefile ngrep.c ngrep.h
+
diff --git a/package/ngrep/patches/patch-regex-0_12_Makefile_in b/package/ngrep/patches/patch-regex-0_12_Makefile_in
new file mode 100644
index 000000000..c0873516f
--- /dev/null
+++ b/package/ngrep/patches/patch-regex-0_12_Makefile_in
@@ -0,0 +1,19 @@
+--- ngrep-1.45.orig/regex-0.12/Makefile.in 2006-11-15 02:34:43.000000000 +0100
++++ ngrep-1.45/regex-0.12/Makefile.in 2016-02-08 06:28:44.000000000 +0100
+@@ -26,13 +26,13 @@ version = 0.12
+ # -DEXTRACT_MACROS to use the macros EXTRACT_* (as opposed to
+ # the corresponding C procedures). If not -DDEBUG, the macros
+ # are used.
+-CPPFLAGS =
++CPPFLAGS ?=
+
+ # Likewise, you can override CFLAGS to optimize, use -Wall, etc.
+-CFLAGS = -g
++CFLAGS ?= -g
+
+ # Ditto for LDFLAGS and LOADLIBES.
+-LDFLAGS =
++LDFLAGS ?=
+ LOADLIBES =
+
+ srcdir = @srcdir@
diff --git a/package/ngrep/patches/patch-regex-0_12_regex_c b/package/ngrep/patches/patch-regex-0_12_regex_c
new file mode 100644
index 000000000..417504e0a
--- /dev/null
+++ b/package/ngrep/patches/patch-regex-0_12_regex_c
@@ -0,0 +1,13 @@
+--- ngrep-1.45.orig/regex-0.12/regex.c 2006-11-15 04:36:48.000000000 +0100
++++ ngrep-1.45/regex-0.12/regex.c 2016-02-08 06:29:15.000000000 +0100
+@@ -39,10 +39,6 @@
+ /* We need this for `regex.h', and perhaps for the Emacs include files. */
+ #include <sys/types.h>
+
+-#ifdef HAVE_CONFIG_H
+-#include "config.h"
+-#endif
+-
+ /* The `emacs' switch turns on certain matching commands
+ that make sense only in Emacs. */
+ #ifdef emacs