# Created by: Nicola Vitale <nivit@email.it>
# $FreeBSD: branches/RELENG_9_2_0/textproc/py-genshi/Makefile 319489 2013-05-31 12:36:02Z nivit $

PORTNAME=	Genshi
PORTVERSION=	0.7
PORTREVISION=	0
#PORTEPOCH=	0
CATEGORIES=	textproc www python
MASTER_SITES=	http://ftp.edgewall.com/pub/${PORTNAME:L}/
PKGNAMEPREFIX=	${PYTHON_PKGNAMEPREFIX}

MAINTAINER=	nivit@FreeBSD.org
COMMENT=	Python toolkit for stream-based generation of output for the web

LICENSE=	BSD

OPTIONS_DEFINE=	BABEL
OPTIONSFILE?=	${PORT_DBDIR}/py-${PORTNAME}/options
BABEL_DESC=	I18n support through the Babel plugin

PYEASYINSTALL_ARCHDEP=	yes

USE_PYTHON=	yes
USE_PYDISTUTILS=	easy_install

DOCSDIR=	${PREFIX}/share/doc/${PKGNAMEPREFIX}${PORTNAME}
EXAMPLESDIR=	${PREFIX}/share/examples/${PKGNAMEPREFIX}${PORTNAME}

.include <bsd.port.options.mk>

.if ${PORT_OPTIONS:MBABEL}
RUN_DEPENDS+=	${PKGNAMEPREFIX}Babel>=0.9.6:${PORTSDIR}/devel/py-babel
.endif

post-install:
.if ${PORT_OPTIONS:MDOCS}
	${MKDIR} ${DOCSDIR}
	cd ${WRKSRC}/doc/ && ${COPYTREE_SHARE} . ${DOCSDIR}
.endif

.if ${PORT_OPTIONS:MEXAMPLES}
	${MKDIR} ${EXAMPLESDIR}
	cd ${WRKSRC}/examples/ && ${COPYTREE_SHARE} . ${EXAMPLESDIR}
.endif

.include <bsd.port.mk>
