ports/88384: New port: textproc/grepip Print lines contains IP matching a pattern in CIDR format

Serge Maslov serge at maslov.biz
Wed Nov 2 04:50:16 UTC 2005


>Number:         88384
>Category:       ports
>Synopsis:       New port: textproc/grepip Print lines contains IP matching a pattern in CIDR format
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-ports-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          change-request
>Submitter-Id:   current-users
>Arrival-Date:   Wed Nov 02 04:50:15 GMT 2005
>Closed-Date:
>Last-Modified:
>Originator:     Serge Maslov
>Release:        
>Organization:
Siberian State University of Telecommunication
>		and Information Sciences, Novosibirsk, Russia
>Environment:

--- grepip.port begins here ---
# This is a shell archive.  Save it in a file, remove anything before
# this line, and then unpack it by entering "sh file".  Note, it may
# create directories; files and directories will be owned by you and
# have default permissions.
#
# This archive contains:
#
#	grepip
#	grepip/files
#	grepip/files/patch-Makefile
#	grepip/Makefile
#	grepip/pkg-plist
#	grepip/distinfo
#	grepip/pkg-descr
#
echo c - grepip
mkdir -p grepip > /dev/null 2>&1
echo c - grepip/files
mkdir -p grepip/files > /dev/null 2>&1
echo x - grepip/files/patch-Makefile
sed 's/^X//' >grepip/files/patch-Makefile << 'END-of-grepip/files/patch-Makefile'
X--- Makefile.orig	Tue Nov  1 13:08:16 2005
X+++ Makefile	Tue Nov  1 13:22:30 2005
X@@ -1,5 +1,4 @@
X-CFLAGS=-O3 -Wall -fwritable-strings -I/usr/local/include
X-LIBS=-L/usr/local/lib -lpcre
X+CCFLAGS=$(CFLAGS) -fwritable-strings
X 
X all: grepip 
X 
X@@ -7,10 +6,10 @@
X 	install -c -m 0755 -o root grepip /usr/local/bin
X 
X grepip: grepip.c Makefile patricia.o
X-	gcc ${CFLAGS} -I/usr/local/include  -o grepip grepip.c patricia.o ${LIBS}
X+	$(CC) $(CCFLAGS) -I$(LOCALBASE)/include -o grepip grepip.c patricia.o -L$(PREFIX)/lib -lpcre
X 
X patricia.o: patricia.c patricia.h Makefile
X-	gcc ${CFLAGS} -c patricia.c
X+	$(CC) $(CCFLAGS) -c patricia.c
X 
X clean:
X 	rm -fr 	*.o *~  grepip
END-of-grepip/files/patch-Makefile
echo x - grepip/Makefile
sed 's/^X//' >grepip/Makefile << 'END-of-grepip/Makefile'
X# New ports collection makefile for:	grepip
X# Date created:		2 Nov 2005
X# Whom:			Serge Maslov <serge at maslov.biz>
X#
X# $FreeBSD$
X#
X
XPORTNAME=	grepip
XPORTVERSION=	1.0
XCATEGORIES=	textproc
XMASTER_SITES=	ftp://ftp.lexa.ru/pub/domestic/lexa/ \
X		ftp://ftp.des.tstu.ru/pub/mirror/Unix/apache/apache.lexa.ru/pub/domestic/lexa/
X
XMAINTAINER=	Serge at Maslov.biz
XCOMMENT=	Print lines contans IP matching a pattern in CIDR format
X
XLIB_DEPENDS=	pcre:${PORTSDIR}/devel/pcre
X
Xdo-install:
X	@${INSTALL_PROGRAM} ${WRKSRC}/grepip ${PREFIX}/bin
X.if !defined(NOPORTDOCS)
X	@${MKDIR} ${PREFIX}/share/doc/grepip
X	@${INSTALL_MAN} ${WRKSRC}/README.* ${PREFIX}/share/doc/grepip
X.endif
X
X.include <bsd.port.mk>
END-of-grepip/Makefile
echo x - grepip/pkg-plist
sed 's/^X//' >grepip/pkg-plist << 'END-of-grepip/pkg-plist'
Xbin/grepip
X%%PORTDOCS%%%%DOCSDIR%%/README.txt
X%%PORTDOCS%%%%DOCSDIR%%/README.html
X%%PORTDOCS%%@dirrm %%DOCSDIR%%
END-of-grepip/pkg-plist
echo x - grepip/distinfo
sed 's/^X//' >grepip/distinfo << 'END-of-grepip/distinfo'
XMD5 (grepip-1.0.tar.gz) = 5f4528775f196a59f646195629dede4c
XSIZE (grepip-1.0.tar.gz) = 15490
END-of-grepip/distinfo
echo x - grepip/pkg-descr
sed 's/^X//' >grepip/pkg-descr << 'END-of-grepip/pkg-descr'
Xgrepip searches the named input FILE (or standard input if no files are named),
Xfor lines containing an IP address matched to the given CIDR.
Xgrepip finds IP in any context of a line, while grepcidr only if all line is IP.
X
XUsage: grepip [options] [-f pattern-file|PATTERN] file1 file2...
X
XExample: grepip 192.168.0.0/16 /var/log/maillog
Xthis command will print all lines from file /var/log/maillog containing IP
Xaddresses from 192.168.0.0 to 192.168.255.255
END-of-grepip/pkg-descr
exit
--- grepip.port ends here ---


>Description:
>How-To-Repeat:
>Fix:
>Release-Note:
>Audit-Trail:
>Unformatted:



More information about the freebsd-ports-bugs mailing list