View | Details | Raw Unified | Return to bug 140593
Collapse All | Expand All

(-)Makefile (-30 / +19 lines)
Lines 6-55 Link Here
6
#
6
#
7
7
8
PORTNAME=	grok
8
PORTNAME=	grok
9
PORTVERSION=	20070915
9
PORTVERSION=	20091103
10
CATEGORIES=	sysutils
10
CATEGORIES=	sysutils
11
MASTER_SITES=	http://www.semicomplete.com/files/grok/ \
11
MASTER_SITES=	GOOGLE_CODE
12
		http://www.atarininja.org/~wxs/distfiles/
13
12
14
MAINTAINER=	wxs@FreeBSD.org
13
MAINTAINER=	wxs@FreeBSD.org
15
COMMENT=	An expert system for real-time log analysis
14
COMMENT=	An expert system for real-time log analysis
16
15
17
RUN_DEPENDS=	${SITE_PERL}/Regexp/Common.pm:${PORTSDIR}/textproc/p5-Regexp-Common \
16
BUILD_DEPENDS=	gperf>=3.0.3:${PORTSDIR}/devel/gperf \
18
		${SITE_PERL}/Parse/RecDescent.pm:${PORTSDIR}/devel/p5-Parse-RecDescent \
17
		libevent>=1.3:${PORTSDIR}/devel/libevent \
19
		${SITE_PERL}/${PERL_ARCH}/Unix/Syslog.pm:${PORTSDIR}/sysutils/p5-Unix-Syslog \
18
		pcre>=7.6:${PORTSDIR}/devel/pcre \
20
		${SITE_PERL}/Date/Format.pm:${PORTSDIR}/devel/p5-TimeDate \
19
		tokyocabinet>=1.4.9:${PORTSDIR}/databases/tokyocabinet
21
		${SITE_PERL}/URI.pm:${PORTSDIR}/net/p5-URI
20
22
21
MAKE_ENV+=	GPERF=${LOCALBASE}/bin/gperf \
23
USE_PERL5=	yes
22
		EXTRA_CFLAGS=-I${LOCALBASE}/include \
24
USE_RC_SUBR=	grok.sh
23
		EXTRA_LDFLAGS=-L${LOCALBASE}/lib
25
NO_BUILD=	yes
24
25
USE_GMAKE=	yes
26
USE_LDCONFIG=	yes
26
27
27
SUB_FILES=	pkg-message
28
SUB_FILES=	pkg-message
28
SUB_LIST=	PERL=${PERL}
29
29
30
PORTDOCS=	CHANGELIST
30
PROJECTHOST=	semicomplete
31
PORTEXAMPLES=	line-to-byte-offset.conf
31
PORTDOCS=	CHANGELIST INSTALL
32
MAN1=	grok.1
32
33
33
post-patch:
34
do-install:
34
	@${REINPLACE_CMD} 's|PREFIX=|PREFIX?=|; s|-g root|-g wheel|' \
35
	@${INSTALL_SCRIPT} ${WRKSRC}/grok ${PREFIX}/bin
35
		${WRKSRC}/Makefile
36
	@${INSTALL_SCRIPT} ${WRKSRC}/grok_patfind.pl ${PREFIX}/bin
37
	@${INSTALL_DATA} ${WRKSRC}/grok.conf ${PREFIX}/etc/grok.conf.sample
38
	@${INSTALL_MAN} ${WRKSRC}/grok.1 ${MANPREFIX}/man/man1
39
36
40
post-install:
37
post-install:
41
	@if [ ! -f ${PREFIX}/etc/grok.conf ]; then \
42
		${CP} -p ${PREFIX}/etc/grok.conf.sample ${PREFIX}/etc/grok.conf ; \
43
	fi
44
.if !defined(NOPORTDOCS)
38
.if !defined(NOPORTDOCS)
45
	@${INSTALL} -d ${DOCSDIR}
39
	@${INSTALL} -d ${DOCSDIR}
46
	@${INSTALL_DATA} ${PORTDOCS:S|^|${WRKSRC}/|} ${DOCSDIR}
40
	@${INSTALL_DATA} ${PORTDOCS:S|^|${WRKSRC}/|} ${DOCSDIR}
47
.endif
41
.endif
48
.if !defined(NOPORTEXAMPLES)
49
	@${INSTALL} -d ${EXAMPLESDIR}/
50
	@cd ${WRKSRC}/examples/ && \
51
		${INSTALL_DATA} ${PORTEXAMPLES} ${EXAMPLESDIR}/
52
.endif
53
	@${CAT} ${PKGMESSAGE}
42
	@${CAT} ${PKGMESSAGE}
54
43
55
.include <bsd.port.mk>
44
.include <bsd.port.mk>
(-)distinfo (-3 / +3 lines)
Lines 1-3 Link Here
1
MD5 (grok-20070915.tar.gz) = ce19c29d0eca6ed0129286cab9ade282
1
MD5 (grok-20091103.tar.gz) = 6e5d325c7943c867fc7918c993c66788
2
SHA256 (grok-20070915.tar.gz) = 8b1c1ef1940b493ebd14ac12fbf16985d277c36e10ad64ae01aed46dc70c3ec6
2
SHA256 (grok-20091103.tar.gz) = db7e0b42bae831deb010879771c6e1fe9f2d7408d0c59e4d976d38bc0739b7f5
3
SIZE (grok-20070915.tar.gz) = 163840
3
SIZE (grok-20091103.tar.gz) = 139188
(-)pkg-plist (-4 / +8 lines)
Lines 1-5 Link Here
1
bin/grok
1
bin/grok
2
bin/grok_patfind.pl
2
include/grok.h 
3
@unexec if cmp -s %D/etc/grok.conf.sample %D/etc/grok.conf; then rm -f %D/etc/grok.conf; fi
3
include/grok_capture.h
4
etc/grok.conf.sample
4
include/grok_capture_xdr.h 
5
@exec if [ ! -f %D/etc/grok.conf ] ; then cp -p %D/%F %B/grok.conf; fi
5
include/grok_logging.h
6
include/grok_match.h
7
include/grok_pattern.h 
8
include/grokre.h
9
lib/libgrok.so
(-)files/grok.sh.in (-28 lines)
Removed Link Here
1
#!/bin/sh
2
3
# PROVIDE: grok 
4
# REQUIRE: LOGIN
5
6
#
7
# Add the following lines to /etc/rc.conf.local or /etc/rc.conf to enable grok:
8
# grok_enable (bool):            Set to "NO" by default.
9
#                                Set it to "YES" to enable grok 
10
# grok_config (path):            Set to "%%PREFIX%%/etc/grok.conf" by default.
11
#
12
13
. %%RC_SUBR%%
14
15
name="grok"
16
rcvar=`set_rcvar`
17
18
load_rc_config $name
19
20
: ${grok_enable="NO"}
21
: ${grok_config="%%PREFIX%%/etc/grok.conf"}
22
23
command_interpreter=%%PERL%%
24
command=%%PREFIX%%/bin/grok
25
command_args="-f $grok_config -b -d"
26
required_files=%%PREFIX%%/etc/grok.conf
27
28
run_rc_command "$1"
(-)files/pkg-message.in (-4 / +2 lines)
Lines 1-9 Link Here
1
============================================================
1
============================================================
2
You'll have to edit %%PREFIX%%/etc/grok.conf to your
2
Examples and documentation are available at:
3
liking.  Examples and documentation are available at
4
grok(1) and at:
5
3
6
http://www.semicomplete.com/projects/grok/
4
http://code.google.com/p/semicomplete/wiki/Grok
7
5
8
Also, modifications to syslog.conf may be necessary.
6
Also, modifications to syslog.conf may be necessary.
9
Usually "user.info /var/log/messages" is enough.
7
Usually "user.info /var/log/messages" is enough.

Return to bug 140593