From renato@data.galle.com.br  Mon Jun 13 12:47:23 2005
Return-Path: <renato@data.galle.com.br>
Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125])
	by hub.freebsd.org (Postfix) with ESMTP id 122D616A41C
	for <FreeBSD-gnats-submit@freebsd.org>; Mon, 13 Jun 2005 12:47:23 +0000 (GMT)
	(envelope-from renato@data.galle.com.br)
Received: from data.galle.com.br (data.galle.com.br [200.246.25.10])
	by mx1.FreeBSD.org (Postfix) with ESMTP id 490AE43D49
	for <FreeBSD-gnats-submit@freebsd.org>; Mon, 13 Jun 2005 12:47:22 +0000 (GMT)
	(envelope-from renato@data.galle.com.br)
Received: from data.galle.com.br (data.galle.com.br [200.246.25.10])
	by data.galle.com.br (8.13.3/8.13.1) with ESMTP id j5DClKOI034994
	for <FreeBSD-gnats-submit@freebsd.org>; Mon, 13 Jun 2005 09:47:20 -0300 (BRST)
	(envelope-from renato@data.galle.com.br)
Received: (from root@localhost)
	by data.galle.com.br (8.13.3/8.13.1/Submit) id j5DClFoa034993;
	Mon, 13 Jun 2005 09:47:15 -0300 (BRST)
	(envelope-from renato)
Message-Id: <200506131247.j5DClFoa034993@data.galle.com.br>
Date: Mon, 13 Jun 2005 09:47:15 -0300 (BRST)
From: Renato Botelho <freebsd@galle.com.br>
To: FreeBSD-gnats-submit@freebsd.org
Cc:
Subject: [NEW PORT] net/jabberusers-agent: A Perl based Jabber User Directory
X-Send-Pr-Version: 3.113
X-GNATS-Notify:

>Number:         82195
>Category:       ports
>Synopsis:       [NEW PORT] net/jabberusers-agent: A Perl based Jabber User Directory
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    novel
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          change-request
>Submitter-Id:   current-users
>Arrival-Date:   Mon Jun 13 12:50:28 GMT 2005
>Closed-Date:    Wed Jun 29 11:46:08 GMT 2005
>Last-Modified:  Wed Jun 29 11:46:08 GMT 2005
>Originator:     Renato Botelho
>Release:        FreeBSD 5.4-RELEASE-p2 i386
>Organization:
Galle Folheados - http://www.galle.com.br
>Environment:
System: FreeBSD data.galle.com.br 5.4-RELEASE-p2 FreeBSD 5.4-RELEASE-p2 #1: Thu Jun  9 10:46:04 BRST
>Description:
A Perl based Jabber User Directory. Currently the
one running on users.jabber.org.

Author:	reatmon@jabber.org
WWW:	http://jabberstudio.org/projects/users-agent/

Generated with FreeBSD Port Tools 0.63
>How-To-Repeat:
>Fix:

--- jabberusers-agent-1.2.shar 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:
#
#	jabber-users-agent
#	jabber-users-agent/pkg-descr
#	jabber-users-agent/Makefile
#	jabber-users-agent/pkg-plist
#	jabber-users-agent/distinfo
#	jabber-users-agent/files
#	jabber-users-agent/files/pkg-message.in
#	jabber-users-agent/files/jabber-users-agent.sh.in
#	jabber-users-agent/files/patch-config.xml
#	jabber-users-agent/files/patch-users-agent
#
echo c - jabber-users-agent
mkdir -p jabber-users-agent > /dev/null 2>&1
echo x - jabber-users-agent/pkg-descr
sed 's/^X//' >jabber-users-agent/pkg-descr << 'END-of-jabber-users-agent/pkg-descr'
XA Perl based Jabber User Directory. Currently the
Xone running on users.jabber.org.
X
XAuthor:	reatmon@jabber.org
XWWW:	http://jabberstudio.org/projects/users-agent/
END-of-jabber-users-agent/pkg-descr
echo x - jabber-users-agent/Makefile
sed 's/^X//' >jabber-users-agent/Makefile << 'END-of-jabber-users-agent/Makefile'
X# New ports collection makefile for:	jabber-users-agent
X# Date created:		2005-06-07
X# Whom:			Renato Botelho <freebsd@galle.com.br>
X#
X# $FreeBSD$
X#
X
XPORTNAME=	users-agent
XPORTVERSION=	1.2
XCATEGORIES=	net
XMASTER_SITES=	http://files.jabberstudio.org/users-agent/
XPKGNAMEPREFIX=	jabber
XDISTNAME=	Users-Agent-${PORTVERSION}
X
XMAINTAINER=	freebsd@galle.com.br
XCOMMENT=	A Perl based Jabber User Directory
X
XNO_BUILD=	yes
XSTRIP=
XWRKSRC=		${WRKDIR}/${PORTNAME}-${PORTVERSION}
XINST_DIR=	${PREFIX}/lib/jabber/${PORTNAME}
XPORTDOCS=	README INSTALL
XUSE_RC_SUBR=	jabber-users-agent.sh
XSUB_LIST+=	PERL=${PERL}
X
XBUILD_DEPENDS+=	${SITE_PERL}/Net/Jabber.pm:${PORTSDIR}/net/p5-Net-Jabber \
X		${SITE_PERL}/${PERL_ARCH}/DBD/mysql.pm:${PORTSDIR}/databases/p5-DBD-mysql
X
X.include <bsd.port.pre.mk>
X
Xpost-patch:
X	@${PERL} -pi -e 's|config.xml|${PREFIX}/etc/jabber-users-agent.xml|g' \
X		${WRKSRC}/users-agent
X	@${PERL} -pi -e 's|%%PERL%%|${PERL}|g' ${WRKSRC}/users-agent
X
Xdo-install:
X	${MKDIR} ${INST_DIR}
X	${INSTALL_PROGRAM} ${WRKSRC}/${PORTNAME} ${WRKSRC}/createDB ${INST_DIR}
X
X.if !exists(${PREFIX}/etc/jabber-users-agent.xml)
X	${INSTALL_DATA} ${WRKSRC}/config.xml ${PREFIX}/etc/jabber-users-agent.xml
X.endif
X	${INSTALL_DATA} ${WRKSRC}/config.xml ${PREFIX}/etc/jabber-users-agent.xml.sample
X
X.if !defined(NOPORTDOCS)
X	${MKDIR} ${DOCSDIR}
X	${INSTALL_DATA} ${PORTDOCS:S!^!${WRKSRC}/!} ${DOCSDIR}
X.endif
X
X.include <bsd.port.post.mk>
END-of-jabber-users-agent/Makefile
echo x - jabber-users-agent/pkg-plist
sed 's/^X//' >jabber-users-agent/pkg-plist << 'END-of-jabber-users-agent/pkg-plist'
X@comment $FreeBSD$
Xlib/jabber/users-agent/createDB
Xlib/jabber/users-agent/users-agent
X@dirrm lib/jabber/users-agent
X@unexec rmdir %D/lib/jabber 2>/dev/null || true
X@unexec if cmp -s %D/etc/jabber-users-agent.xml %D/etc/jabber-users-agent.xml.sample; then rm -f %D/etc/jabber-users-agent.xml; fi
Xetc/jabber-users-agent.xml.sample
X@exec [ -f %B/jabber-users-agent.xml ] || cp %B/%f %B/jabber-users-agent.xml
END-of-jabber-users-agent/pkg-plist
echo x - jabber-users-agent/distinfo
sed 's/^X//' >jabber-users-agent/distinfo << 'END-of-jabber-users-agent/distinfo'
XMD5 (Users-Agent-1.2.tar.gz) = e1d580dc34b56d00a1990464659ea766
XSIZE (Users-Agent-1.2.tar.gz) = 7871
END-of-jabber-users-agent/distinfo
echo c - jabber-users-agent/files
mkdir -p jabber-users-agent/files > /dev/null 2>&1
echo x - jabber-users-agent/files/pkg-message.in
sed 's/^X//' >jabber-users-agent/files/pkg-message.in << 'END-of-jabber-users-agent/files/pkg-message.in'
XATTENTION:
X
XBefore start to use this, you need to create a MySQL database. You
Xcan use a script to help you, this script is installed as
X%%PREFIX%%/lib/jabber/users-agent/createDB. You will find instructions
Xto use it on %%DOCSDIR%%/INSTALL.
X
XAfter create the database, configure host, username and password
Xto access it on %%PREFIX%%/etc/jabber-users-agent.xml.
END-of-jabber-users-agent/files/pkg-message.in
echo x - jabber-users-agent/files/jabber-users-agent.sh.in
sed 's/^X//' >jabber-users-agent/files/jabber-users-agent.sh.in << 'END-of-jabber-users-agent/files/jabber-users-agent.sh.in'
X#!/bin/sh
X
X# Start or stop jabber-users-agent
X# $FreeBSD$
X
X# PROVIDE: jabber_users_agent
X# REQUIRE: DAEMON
X# BEFORE: LOGIN
X# KEYWORD: FreeBSD shutdown
X#
X# Define these jabber_users_agent_* variables in one of these files:
X#       /etc/rc.conf
X#       /etc/rc.conf.local
X#
X# DO NOT CHANGE THESE DEFAULT VALUES HERE
X#
Xjabber_users_agent_dir=${jabberd_users_agent_dir-"%%PREFIX%%/lib/jabber/users-agent"}
Xjabber_users_agent_enable=${jabberd_users_agent_enable-"NO"}
X
X. /etc/rc.subr
X
Xname="jabber_users_agent"
Xrcvar=`set_rcvar`
Xcommand_interpreter="%%PERL%%"
Xcommand="${jabber_users_agent_dir}/users-agent"
Xcommand_args="&"
X
Xpidfile="/var/jabberd/pid/users-agent.pid"
X
Xload_rc_config $name
Xstop_postcmd="jabber_users_agent_stop_post"
X
Xjabber_users_agent_stop_post () {
X	rm -f ${pidfile}
X}
X
Xrun_rc_command "$1"
END-of-jabber-users-agent/files/jabber-users-agent.sh.in
echo x - jabber-users-agent/files/patch-config.xml
sed 's/^X//' >jabber-users-agent/files/patch-config.xml << 'END-of-jabber-users-agent/files/patch-config.xml'
X--- config.xml.orig	Thu Jun  9 07:25:05 2005
X+++ config.xml	Thu Jun  9 07:33:13 2005
X@@ -10,6 +10,10 @@
X   </component>
X   <mysql>
X     <dbname>JUD</dbname>
X+    <!--
X+    <host>mysql.remote.server</host>
X+    <port>3306</port>
X+    -->
X     <username>someone</username>
X     <password>something</password>
X     <limit>250</limit>
END-of-jabber-users-agent/files/patch-config.xml
echo x - jabber-users-agent/files/patch-users-agent
sed 's/^X//' >jabber-users-agent/files/patch-users-agent << 'END-of-jabber-users-agent/files/patch-users-agent'
X--- users-agent.orig	Mon Sep  6 23:05:32 2004
X+++ users-agent	Mon Jun 13 09:19:06 2005
X@@ -1,9 +1,4 @@
X-#!/bin/sh
X-#-*-Perl-*-
X-
X-exec perl -x $0 "$@";
X-
X-#!perl
X+#!%%PERL%%
X 
X ##############################################################################
X #
X@@ -29,7 +24,7 @@
X 
X my %optctl = ();
X $optctl{debug} = 0;
X-$optctl{config} = "config.xml";
X+$optctl{config} = "/usr/local/etc/jabber-users-agent.xml";
X &GetOptions(\%optctl, "debug=i","config=s");
X 
X if (!(-f $optctl{config}))
X@@ -39,6 +34,10 @@
X     exit(1);
X } 
X 
X+open(PIDFILE,">/var/jabberd/pid/users-agent.pid");
X+    print PIDFILE "$$";
X+close(PIDFILE);
X+
X my $Debug = new Net::Jabber::Debug(level=>$optctl{debug},
X                                    header=>"Users-Agent");
X 
X@@ -119,8 +118,13 @@
X ##############################################################################
X &readConfigXML();
X 
X+my $data_source = "DBI:mysql:database=".$config{mysql}->{dbname};
X+
X+if ($config{mysql}->{host} ne '') {
X+    $data_source .= ";host=".$config{mysql}->{host}.";port=".($config{mysql}->{port} eq '' ? '3306' : $config{mysql}->{port});
X+}
X 
X-my $dbh = DBI->connect("DBI:mysql:database=".$config{mysql}->{dbname},$config{mysql}->{username},$config{mysql}->{password});
X+my $dbh = DBI->connect($data_source,$config{mysql}->{username},$config{mysql}->{password});
X #$dbh->trace(2) if (($optctl{debug} > 0) && defined($dbh));
X 
X ##############################################################################
X@@ -174,7 +178,7 @@
X 
X ##############################################################################
X #
X-# readConfigXML - read the config.xml file, parse it, and set config hash
X+# readConfigXML - read the /usr/local/etc/jabber-users-agent.xml file, parse it, and set config hash
X #                 with the proper settings.
X #
X ##############################################################################
END-of-jabber-users-agent/files/patch-users-agent
exit
--- jabberusers-agent-1.2.shar ends here ---

>Release-Note:
>Audit-Trail:

From: Renato Botelho <freebsd@galle.com.br>
To: bug-followup@FreeBSD.org, freebsd@galle.com.br
Cc:  
Subject: Re: ports/82195: [NEW PORT] net/jabberusers-agent: A Perl based Jabber User Directory
Date: Mon, 13 Jun 2005 10:03:07 -0300

 I accidentally send a version with PKGNAMEPREFIX wrong, could you add a
 - to it?
 
 -PKGNAMEPREFIX=	jabber
 +PKGNAMEPREFIX=	jabber-
 
 Thanks
 -- 
 Renato Botelho <freebsd at galle dot com dot br>
 AIM: RBGargaBR | ICQ: 54596223
 GnuPG Key: http://www.galle.com.br/~renato/pubkey.asc
 
 Overload -- core meltdown sequence initiated.
Responsible-Changed-From-To: freebsd-ports-bugs->novel 
Responsible-Changed-By: novel 
Responsible-Changed-When: Wed Jun 29 10:27:50 GMT 2005 
Responsible-Changed-Why:  
I'll take it. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=82195 
State-Changed-From-To: open->closed 
State-Changed-By: novel 
State-Changed-When: Wed Jun 29 11:45:56 GMT 2005 
State-Changed-Why:  
New port added, thanks! 

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