forked from Lainports/freebsd-ports
56 lines
1.5 KiB
Makefile
56 lines
1.5 KiB
Makefile
# Created by: nectar@FreeBSD.org
|
|
# $FreeBSD$
|
|
|
|
PORTNAME= xml
|
|
PORTVERSION= 0.8.4
|
|
PORTREVISION= 4
|
|
CATEGORIES= textproc python
|
|
MASTER_SITES= SF/py${PORTNAME}/py${PORTNAME}/${PORTVERSION}
|
|
PKGNAMEPREFIX= ${PYTHON_PKGNAMEPREFIX}
|
|
DISTNAME= PyXML-${PORTVERSION}
|
|
|
|
MAINTAINER= ports@FreeBSD.org
|
|
COMMENT= Python XML library enhancements
|
|
|
|
USES= python shebangfix
|
|
SHEBANG_FILES= demo/dom/html2html
|
|
USE_PYTHON= distutils autoplist
|
|
|
|
DOCSDIR= ${PREFIX}/share/doc/${PKGNAMEPREFIX}${PORTNAME}
|
|
EXAMPLESDIR= ${PREFIX}/share/examples/${PKGNAMEPREFIX}${PORTNAME}
|
|
PLIST_SUB+= PACKAGE_DIR=_xmlplus
|
|
|
|
PORTEXAMPLES= *
|
|
PORTDOCS= *
|
|
|
|
OPTIONS_DEFINE= DOCS EXAMPLES XSLT XPATH
|
|
OPTIONS_DEFAULT=XPATH
|
|
|
|
.include <bsd.port.pre.mk>
|
|
|
|
.if ${PORT_OPTIONS:MXSLT}
|
|
PYDISTUTILS_BUILDARGS+= --with-xslt
|
|
PYDISTUTILS_INSTALLARGS+= --with-xslt
|
|
.else
|
|
PYDISTUTILS_BUILDARGS+= --without-xslt
|
|
PYDISTUTILS_INSTALLARGS+= --without-xslt
|
|
.endif
|
|
|
|
.if ${PORT_OPTIONS:MXPATH}
|
|
PYDISTUTILS_BUILDARGS+= --with-xpath
|
|
PYDISTUTILS_INSTALLARGS+= --with-xpath
|
|
.else
|
|
PYDISTUTILS_BUILDARGS+= --without-xpath
|
|
PYDISTUTILS_INSTALLARGS+= --without-xpath
|
|
.endif
|
|
|
|
post-install:
|
|
${FIND} ${STAGEDIR}${PYTHON_SITELIBDIR}/${PACKAGE_DIR} -name '*.so' | ${XARGS} ${STRIP_CMD}
|
|
@${MKDIR} ${STAGEDIR}${DOCSDIR}
|
|
.for docfile in ANNOUNCE CREDITS LICENCE README* TODO
|
|
${INSTALL_DATA} ${WRKSRC}/${docfile} ${STAGEDIR}${DOCSDIR}
|
|
.endfor
|
|
cd ${WRKSRC}/doc && ${COPYTREE_SHARE} . ${STAGEDIR}${DOCSDIR}
|
|
cd ${WRKSRC} && ${COPYTREE_SHARE} "demo test" ${STAGEDIR}${EXAMPLESDIR}
|
|
|
|
.include <bsd.port.post.mk>
|