summaryrefslogtreecommitdiff
path: root/textproc/py-xml/Makefile
blob: 2de8d99d56611ae8b1392f83ac6f69e613b52133 (plain) (blame)
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
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
# Ports collection Makefile for:	PyXML
# Date created:				04/17/1999
# Whom:					nectar@FreeBSD.org
#
# $FreeBSD$
#

PORTNAME=		xml
PORTVERSION=		0.6.3
CATEGORIES=		textproc python
MASTER_SITES=		${MASTER_SITE_SOURCEFORGE}                     \
			http://www.python.org/sigs/xml-sig/files/      \
			ftp://ftp.cdrom.com/pub/python/www.python.org/sigs/xml-sig/files/ \
			ftp://unix.hensa.ac.uk/mirrors/ftp.python.org/pub/www.python.org/sigs/xml-sig/files/
MASTER_SITE_SUBDIR=	pyxml
PKGNAMEPREFIX=		${PYTHON_PKGNAMEPREFIX}
DISTNAME=		PyXML-${PORTVERSION}

MAINTAINER=		johann@egenetics.com

BUILD_DEPENDS=		${PYDISTUTILS}

USE_PYTHON=		yes
PLIST=			${WRKDIR}/PLIST

.include <bsd.port.pre.mk>

.if ${PYTHON_VERSION} == "python1.5"
PLIST_SUB+=		PACKAGE_DIR=xml
.else
PLIST_SUB+=		PACKAGE_DIR=_xmlplus
.endif
PLISTS=			${PKGDIR}/pkg-plist

.if !defined(NOPORTDOCS)
DOCDIR=			share/doc/py-xml
# Document files to be installed in ${DOCDIR}
DOCS1=			xml-howto.txt xml-ref.txt
# Document files to be installed in ${DOCDIR}/xmlproc
DOCS2=			artikler.css basicapi.gif cmdline.gif          \
			standard.css wxval.gif                         \
			xmlproc-catalog-doco.html xmlproc-doco.html    \
			xmlproc-dtd-doco.html xmlproc-license.html     \
			xmlproc.html xmlproc_cmdline.html              \
			xmlproc_dtdparser.html xmlproc_ns.html         \
			xmlproc_tut.html
# Document files to be installed in ${DOCDIR}/4DOM
DOCS3=			4DOM.web Extensions.api Extensions.html        \
			index.html
# Complete list of document files
DOCS=			${DOCS1} ${DOCS2:S|^|xmlproc/|}                \
			${DOCS3:S|^|4DOM/|}

# Command to install document file and simultaneously add filename
# to the packing list
INSTALL_DOC=		${INSTALL_DATA} ${WRKSRC}/doc/@DOC             \
			${PREFIX}/${DOCDIR}/@DOC &&                    \
			${ECHO} ${DOCDIR}/@DOC >> ${PLIST}
.endif

do-build:
	cd ${WRKSRC} && ${PYTHON_CMD} setup.py build

pre-install:
	${CAT} ${PLISTS} > ${PLIST}
.if !defined(NOPORTDOCS)
	${MKDIR} ${PREFIX}/${DOCDIR}
	${MKDIR} ${PREFIX}/${DOCDIR}/xmlproc
	${MKDIR} ${PREFIX}/${DOCDIR}/4DOM
.for doc in ${DOCS}
	${INSTALL_DOC:S|@DOC|${doc}|g}
.endfor
	${ECHO} @dirrm ${DOCDIR}/xmlproc >> ${PLIST}
	${ECHO} @dirrm ${DOCDIR}/4DOM >> ${PLIST}
	${ECHO} @dirrm ${DOCDIR} >> ${PLIST}
.endif

do-install:
	cd ${WRKSRC} && ${PYTHON_CMD} setup.py install

.include <bsd.port.post.mk>