summaryrefslogtreecommitdiff
path: root/textproc/py-genshi-devel/Makefile
blob: 635d342939c1009b20fe45466fc96fe0ef0ad38e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
# New ports collection makefile for:	py-genshi-devel
# Date created:				Wed 06 May 2009
# Whom:					Alexey V. Degtyarev <alexey@renatasystems.org>
#
# $FreeBSD$
#

PORTNAME=	Genshi
PORTVERSION=	0.6.1052
PORTREVISION=	1
CATEGORIES=	textproc www python
MASTER_SITES=	ftp://ftp.renatasystems.org/pub/FreeBSD/ports/distfiles/
PKGNAMEPREFIX=	${PYTHON_PKGNAMEPREFIX}
PKGNAMESUFFIX=	-devel

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

USE_PYTHON=	2.5+
USE_PYDISTUTILS=	easy_install

WRKSRC=		${WRKDIR}/genshi
CONFLICTS=	py-genshi-[0-9]*

PYEASYINSTALL_ARCHDEP=	yes
PYDISTUTILS_PKGVERSION=	${PORTVERSION:R}dev
PYDISTUTILS_INSTALLARGS=	-Z -O 1 -N \
				-S ${PYTHONPREFIX_SITELIBDIR}/site-packages \
				-d ${PYTHONPREFIX_SITELIBDIR} \
				${WRKSRC}/dist/${PYEASYINSTALL_EGG}

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

# This target is only meant to be used by the port maintainer.
x-generate-plist:
	(${PORTSDIR}/Tools/scripts/plist -d -m ${MTREE_FILE} ${PREFIX} \
	| ${SED} -E \
		's,.*share/nls/.+$$,,g \
		;s,@dirrm share/man(/.*)?$$,,g \
		;s,${PYTHON_SITELIBDIR:S,^${PYTHONBASE}/,,},%%PYTHON_SITELIBDIR%%,g \
		;s,^${DOCSDIR_REL},%%PORTDOCS%%%%DOCSDIR%%,g \
		;s,@dirrm ${DOCSDIR_REL},%%PORTDOCS%%@dirrm %%DOCSDIR%%,g \
		;s,^${EXAMPLESDIR_REL},%%PORTEXAMPLES%%%%EXAMPLESDIR%%,g \
		;s,@dirrm ${EXAMPLESDIR_REL},%%PORTEXAMPLES%%@dirrm %%EXAMPLESDIR%%,g \
		;s,${PYEASYINSTALL_EGG},%%PYEASYINSTALL_EGG%%,g \
		;s,@dirrm (%%PYTHON_SITELIBDIR%%|${PYTHON_LIBDIR:S,${PYTHONBASE}/,,})$$,,g \
		' | ${TR} -s '\n') > temp-pkg-plist

post-install:
.if !defined(NOPORTDOCS)
	${MKDIR} ${DOCSDIR}
	cd ${WRKSRC}/doc/ && ${COPYTREE_SHARE} . ${DOCSDIR}
.endif

.if !defined(NOPORTEXAMPLES)
	${MKDIR} ${EXAMPLESDIR}
	cd ${WRKSRC}/examples/ && ${COPYTREE_SHARE} . ${EXAMPLESDIR}
.endif

.include <bsd.port.mk>