OpenPKG CVS Repository http://cvs.openpkg.org/ ____________________________________________________________________________
Server: cvs.openpkg.org Name: Ralf S. Engelschall Root: /v/openpkg/cvs Email: [EMAIL PROTECTED] Module: openpkg-src Date: 01-Dec-2006 14:45:51 Branch: HEAD Handle: 2006120113455000 Added files: openpkg-src/ngrep ngrep.patch ngrep.spec Log: new package: ngrep 1.45 (Network Global Regular Expression Print) Summary: Revision Changes Path 1.1 +76 -0 openpkg-src/ngrep/ngrep.patch 1.1 +106 -0 openpkg-src/ngrep/ngrep.spec ____________________________________________________________________________ patch -p0 <<'@@ .' Index: openpkg-src/ngrep/ngrep.patch ============================================================================ $ cvs diff -u -r0 -r1.1 ngrep.patch --- /dev/null 2006-12-01 14:45:14 +0100 +++ ngrep.patch 2006-12-01 14:45:50 +0100 @@ -0,0 +1,76 @@ +Index: Makefile.in +--- Makefile.in.orig 2006-11-28 14:35:37 +0100 ++++ Makefile.in 2006-11-30 10:32:45 +0100 +@@ -11,7 +11,7 @@ + [EMAIL PROTECTED]@ @PCAP_INCLUDE@ @EXTRA_INCLUDES@ + + [EMAIL PROTECTED]@ @PCAP_LINK@ +-LIBS=-lpcap @EXTRA_LIBS@ ++LIBS=-lpcap @LIBS@ @EXTRA_LIBS@ + + [EMAIL PROTECTED]@ + +@@ -25,7 +25,7 @@ + + bindir = $(prefix)/bin + datadir = $(prefix)/share +-mandir = $(datadir)/man ++mandir = @mandir@ + + BINDIR_INSTALL = $(prefix)/bin + MANDIR_INSTALL = $(mandir)/man8 +@@ -62,8 +62,8 @@ + make -C $(REGEX_DIR) distclean + 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)) ++# $(REGEX_OBJS): $(REGEX_OBJS:.o=.c) $(REGEX_DIR)/*.h ++# $(MAKE) $(MAKEFLAGS) -C $(REGEX_DIR) $(notdir $(REGEX_OBJS)) + + $(OBJS): Makefile ngrep.c ngrep.h + +Index: configure +--- configure.orig 2006-11-15 04:40:56 +0100 ++++ configure 2006-11-30 10:30:29 +0100 +@@ -3628,8 +3628,8 @@ + echo 'Configuring Perl-Compatible Regular Expression (PCRE) library ...' + echo + +- REGEX_DIR='pcre-5.0' +- REGEX_OBJS="$REGEX_DIR/pcre.o $REGEX_DIR/study.o" ++ REGEX_DIR='.' ++ REGEX_OBJS="" + USE_PCRE="1" + + else +@@ -3644,7 +3644,7 @@ + + fi + +-( cd $REGEX_DIR && ./configure ) ++# ( cd $REGEX_DIR && ./configure ) + + + +@@ -4052,7 +4052,7 @@ + + { echo "$as_me:$LINENO: checking for BPF include path" >&5 + echo $ECHO_N "checking for BPF include path... $ECHO_C" >&6; } +-BPF=`/usr/bin/perl -ne '/include\s+<(.*bpf\.h)>/ && print "$1\n"' $pcap_dir/pcap.h` ++BPF=`perl -ne '/include\s+<(.*bpf\.h)>/ && print "$1\n"' $pcap_dir/pcap.h` + echo $BPF + + +Index: ngrep.c +--- ngrep.c.orig 2006-11-28 14:38:43 +0100 ++++ ngrep.c 2006-11-30 10:30:29 +0100 +@@ -92,7 +92,7 @@ + #endif + + #if USE_PCRE +-#include "pcre-5.0/pcre.h" ++#include "pcre.h" + #else + #include "regex-0.12/regex.h" + #endif @@ . patch -p0 <<'@@ .' Index: openpkg-src/ngrep/ngrep.spec ============================================================================ $ cvs diff -u -r0 -r1.1 ngrep.spec --- /dev/null 2006-12-01 14:45:14 +0100 +++ ngrep.spec 2006-12-01 14:45:50 +0100 @@ -0,0 +1,106 @@ +## +## ngrep.spec -- OpenPKG RPM Package Specification +## Copyright (c) 2000-2006 OpenPKG Foundation e.V. <http://openpkg.net/> +## Copyright (c) 2000-2006 Ralf S. Engelschall <http://engelschall.com/> +## +## Permission to use, copy, modify, and distribute this software for +## any purpose with or without fee is hereby granted, provided that +## the above copyright notice and this permission notice appear in all +## copies. +## +## THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED +## WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF +## MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. +## IN NO EVENT SHALL THE AUTHORS AND COPYRIGHT HOLDERS AND THEIR +## CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +## SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +## LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF +## USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND +## ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, +## OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT +## OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +## SUCH DAMAGE. +## + +# package information +Name: ngrep +Summary: Network Global Regular Expression Print +URL: http://ngrep.sourceforge.net/ +Vendor: Jordan Ritter +Packager: OpenPKG Foundation e.V. +Distribution: OpenPKG Community +Class: EVAL +Group: Capturing +License: GPL +Version: 1.45 +Release: 20061201 + +# package options +%option with_ipv6 no + +# list of sources +Source0: http://switch.dl.sourceforge.net/ngrep/ngrep-%{version}.tar.bz2 +Patch0: ngrep.patch + +# build information +Prefix: %{l_prefix} +BuildRoot: %{l_buildroot} +BuildPreReq: OpenPKG, openpkg >= 20040130, perl +PreReq: OpenPKG, openpkg >= 20040130 +BuildPreReq: libpcap, pcre +PreReq: libpcap, pcre +AutoReq: no +AutoReqProv: no + +%description + ngrep(1) strives to provide most of the grep(1) common features, + applying them to the network layer. ngrep(1) is a PCAP-aware tool + that will allow you to specify extended regular or hexadecimal + expressions (based on PCRE) to match against data payloads of + packets. It currently recognizes IPv4/6, TCP, UDP, ICMPv4/6, IGMP + and Raw across Ethernet, PPP, SLIP, FDDI, Token Ring and null + interfaces, and understands BPF filter logic in the same fashion as + more common packet sniffing tools such as tcpdump(1). + +%track + prog ngrep = { + version = %{version} + url = http://prdownloads.sourceforge.net/ngrep/ + regex = ngrep-(__VER__)\.tar\.bz2 + } + +%prep + %setup -q + %patch -p0 + +%build + CC="%{l_cc}" \ + CFLAGS="%{l_cflags -O}" \ + CPPFLAGS="%{l_cppflags}" \ + LDFLAGS="%{l_ldflags}" \ + LIBS="-lpcre" \ + ./configure \ + --prefix=%{l_prefix} \ + --mandir=%{l_prefix}/man \ + --with-pcap-includes=%{l_prefix}/include \ + --enable-dropprivs \ + --with-dropprivs-user=%{l_nusr} \ +%if "%{with_ipv6}" == "yes" + --enable-ipv6 \ +%else + --disable-ipv6 \ +%endif + --enable-pcre + %{l_make} %{l_mflags -O} + +%install + rm -rf $RPM_BUILD_ROOT + %{l_make} %{l_mflags} install DESTDIR=$RPM_BUILD_ROOT + strip $RPM_BUILD_ROOT%{l_prefix}/bin/* >/dev/null 2>&1 || true + %{l_rpmtool} files -v -ofiles -r$RPM_BUILD_ROOT %{l_files_std} + +%files -f files + +%clean + rm -rf $RPM_BUILD_ROOT + @@ . ______________________________________________________________________ The OpenPKG Project www.openpkg.org CVS Repository Commit List openpkg-cvs@openpkg.org