From wtp@kryptos.mud.pl  Sat Feb  8 14:36:32 2003
Return-Path: <wtp@kryptos.mud.pl>
Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125])
	by hub.freebsd.org (Postfix) with ESMTP id ABA3037B401
	for <FreeBSD-gnats-submit@freebsd.org>; Sat,  8 Feb 2003 14:36:32 -0800 (PST)
Received: from kryptos.mud.pl (201-moc-7.acn.waw.pl [212.76.58.201])
	by mx1.FreeBSD.org (Postfix) with ESMTP id 8076843F75
	for <FreeBSD-gnats-submit@freebsd.org>; Sat,  8 Feb 2003 14:36:30 -0800 (PST)
	(envelope-from wtp@kryptos.mud.pl)
Received: from localhost (localhost [127.0.0.1])
	by kryptos.mud.pl (Postfix) with ESMTP id B649EFFEF
	for <FreeBSD-gnats-submit@freebsd.org>; Sat,  8 Feb 2003 23:36:36 +0100 (CET)
Received: by kryptos.mud.pl (Postfix, from userid 1000)
	id 49F98FFE8; Sat,  8 Feb 2003 23:36:35 +0100 (CET)
Message-Id: <20030208223635.49F98FFE8@kryptos.mud.pl>
Date: Sat,  8 Feb 2003 23:36:35 +0100 (CET)
From: Krzysztof Stryjek <wtp@kryptos.mud.pl>
Reply-To: Krzysztof Stryjek <wtpooh@acn.waw.pl>
To: FreeBSD-gnats-submit@freebsd.org
Cc:
Subject: add-ons for netsaint and nagios
X-Send-Pr-Version: 3.113
X-GNATS-Notify:

>Number:         48102
>Category:       ports
>Synopsis:       add-ons for netsaint and nagios
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-ports-bugs
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          change-request
>Submitter-Id:   current-users
>Arrival-Date:   Sat Feb 08 14:40:02 PST 2003
>Closed-Date:    Sun Apr 06 17:40:03 PDT 2003
>Last-Modified:  Sun Apr 06 17:40:03 PDT 2003
>Originator:     Krzysztof Stryjek
>Release:        FreeBSD 4.7-STABLE i386
>Organization:
>Environment:
System: FreeBSD kryptos.mud.pl 4.7-STABLE FreeBSD 4.7-STABLE #0: Sun Dec 15 20:45:56 CET 2002 toor@kryptos.mud.pl:/usr/obj/usr/src/sys/POOH i386

>Description:
	
Hello,

telling the truth I am using only netsaint, but I think this will also
work for nagios (especially, that conrigure --help for nagios looks the
same as for netsaint.

It is working for me with MySQL, unfortunatelly I have no possibilities to
check it with POSTGRES (as postgres installs everything in
/usr/local/pgsql).

I made this patches after checking how it is done in snort ports. I hope
you include this in Makefiles.

Greetings
--
/~\ The ASCII                  Krzysztof Stryjek
\ / Ribbon Campaign            wtp@NOSPAM.mud.pl
 X  Against HTML              http://mud.pl/~wtp/
/ \ Email!               GG: 3608113   ICQ: 124986907


>How-To-Repeat:
	Well, now there is only possible to manualy change Makefile
>Fix:

Path for netsaint:
**********************************************************
--- Makefile	Sun Dec 15 17:19:26 2002
+++ /tmp/Makefile.netsaint	Fri Feb  7 11:56:32 2003
@@ -36,6 +36,21 @@
 		--sysconfdir=${PREFIX}/etc/netsaint \
 		--localstatedir=${PREFIX}/var/netsaint
 
+.if defined(WITH_MYSQL)
+LIB_DEPENDS+=	mysqlclient.10:${PORTSDIR}/databases/mysql323-client
+CONFIGURE_ARGS+=--with-mysql-lib=${LOCALBASE}/lib/mysql \
+		--with-mysql-inc=${LOCALBASE}/include/mysql \
+		--with-mysql-xdata
+.endif
+
+.if defined(WITH_POSTGRES)
+POSTGRESQL_PORT?=	databases/postgresql7
+LIB_DEPENDS+=	pq.3:${PORTSDIR}/${POSTGRESQL_PORT}
+CONFIGURE_ARGS+=--with-pgsql-lib=${LOCALBASE}/pgsql \
+		--with-pgsql-inc=${LOCALBASE}/pgsql \
+		--with-pgsql-xdata
+.endif
+
 INSTALL_TARGET=	all install config install-config install-daemoninit install-commandmode
 
 pre-fetch:

patch for nagios:
**********************************************************
--- Makefile	Sat Jan  4 05:42:14 2003
+++ /tmp/Makefile.nagios	Fri Feb  7 12:06:30 2003
@@ -36,6 +36,21 @@
 		--localstatedir=${PREFIX}/var/nagios \
 		--prefix=${PREFIX}
 
+.if defined(WITH_MYSQL)
+LIB_DEPENDS+=	mysqlclient.10:${PORTSDIR}/databases/mysql323-client
+CONFIGURE_ARGS+=--with-mysql-lib=${LOCALBASE}/lib/mysql \
+		--with-mysql-inc=${LOCALBASE}/include/mysql \
+		--with-mysql-xdata
+.endif
+
+.if defined(WITH_POSTGRES)
+POSTGRESQL_PORT?=	databases/postgresql7
+LIB_DEPENDS+=	pq.3:${PORTSDIR}/${POSTGRESQL_PORT}
+CONFIGURE_ARGS+=--with-pgsql-lib=${LOCALBASE}/pgsql \
+		--with-pgsql-inc=${LOCALBASE}/pgsql \
+		--with-pgsql-xdata
+.endif
+
 INSTALL_TARGET=	all install config install-config install-daemoninit install-commandmode
 
 pre-fetch:
>Release-Note:
>Audit-Trail:
State-Changed-From-To: open->closed 
State-Changed-By: edwin 
State-Changed-When: Sun Apr 6 17:39:58 PDT 2003 
State-Changed-Why:  
Commited, thanks! 

http://www.freebsd.org/cgi/query-pr.cgi?pr=48102 
>Unformatted:
