# New ports collection makefile for:	py-gozerbot
# Date created:		Wed Sep 19 00:04:39 CEST 2007
# Whom:			Sten Spans <sten@blinkenlights.nl>
#
# $FreeBSD: ports/irc/py-gozerbot/Makefile,v 1.2 2007/12/14 23:15:16 miwi Exp $
#

PORTNAME=	gozerbot
PORTVERSION=	0.7.1.1
PORTREVISION=	1
CATEGORIES=	irc python
MASTER_SITES=	http://gozerbot.org/media/tarball/ http://gozerbot.googlecode.com/files/
PKGNAMEPREFIX=	${PYTHON_PKGNAMEPREFIX}
DISTNAME=	gozerbot-${PORTVERSION}

MAINTAINER=	sten@blinkenlights.nl
COMMENT=	Gozerbot - A modular Python IRC and Jabber bot

USE_PYTHON=	2.4+
USE_PYDISTUTILS=	yes
PYDISTUTILS_EGGINFO=	gozerbot-GOZERBOT.${PORTVERSION}-py${PYTHON_VER}.egg-info
SUB_FILES=		pkg-message

OPTIONS=	XMPP  "Jabber functions" off \
		MYSQL "Mysql functions" off
LATEST_LINK=	${PKGNAMESUFFIX}-${PORTNAME}
OPTIONSFILE?=	${PORT_DBDIR}/${LATEST_LINK}/options

MAN1=		gozerbot.1
DOCS=BASIC COLLECTIVE FAQ FLEET FLOW JABBER \
	OPER PROGRAMPLUGIN RELAY RSS \
	THNX TOURDECODE UDP UPGRADE USER WEBSERVER

RUN_DEPENDS+=	${LOCALBASE}/bin/gpg:${PORTSDIR}/security/gnupg

post-install:
.if !defined(BATCH)
	@${SED} -e 's:%%PREFIX%%:${PREFIX}:g'
.endif
	@${CAT} ${PKGMESSAGE}

.if !defined(NOPORTDOCS)
	@${MKDIR} ${DOCSDIR}
.for i in ${DOCS}
	${INSTALL_DATA} ${WRKSRC}/doc/${i} ${DOCSDIR}
.endfor
	${INSTALL_DATA} ${WRKSRC}/README ${DOCSDIR}
.endif
	@${INSTALL_MAN} ${WRKSRC}/man/gozerbot.1.FreeBSD ${PREFIX}/man/man1/gozerbot.1

.include <bsd.port.pre.mk>

.if defined(WITH_MYSQL)
RUN_DEPENDS+=${PYTHON_SITELIBDIR}/MySQLdb/__init__.py:${PORTSDIR}/databases/py-MySQLdb
.endif

.if defined(WITH_XMPP)
RUN_DEPENDS+=${PYTHON_SITELIBDIR}/xmpp/__init__.py:${PORTSDIR}/net-im/py-xmpppy
.endif

.include <bsd.port.post.mk>


syntax highlighted by Code2HTML, v. 0.9.1