openbsd-ports/textproc/py-xml/Makefile
shell b7c8dbe412 Add pyexpat flavor to avoid the conflict
if python-expat installed

patches from :
Andrew Dalgleish <openbsd@andrewdalgleish.dyndns.org>
2003-03-30 06:54:51 +00:00

61 lines
1.4 KiB
Makefile

# $OpenBSD: Makefile,v 1.15 2003/03/30 06:54:51 shell Exp $
COMMENT= "python module for writing basic XML applications"
VERSION= 0.7.1
DISTNAME= PyXML-${VERSION}
PKGNAME= py-xml-${VERSION}
CATEGORIES= textproc devel
MASTER_SITES= ${MASTER_SITE_SOURCEFORGE:=pyxml/}
HOMEPAGE= http://pyxml.sourceforge.net/
MAINTAINER= Shell Hung <shell@openbsd.org>
PERMIT_PACKAGE_FTP= Yes
PERMIT_PACKAGE_CDROM= Yes
PERMIT_DISTFILES_FTP= Yes
PERMIT_DISTFILES_CDROM= Yes
# pyexpat - use our own pyexpat.so
# otherwise use the python-expat version
FLAVORS=pyexpat
FLAVOR?=
PYTHON_VER= 2.2
LIB_DEPENDS= expat.2::textproc/expat
BUILD_DEPENDS= :python-${PYTHON_VER}*:lang/python/${PYTHON_VER}
RUN_DEPENDS= ${BUILD_DEPENDS}
.if !${FLAVOR:L:Mpyexpat}
BUILD_DEPENDS+= :python-expat-${PYTHON_VER}*:lang/python/${PYTHON_VER},-expat
.endif
SUBST_VARS= PYTHON_VER
NO_REGRESS= Yes
PY_CMD= cd ${WRKSRC}; python${PYTHON_VER} ./setup.py
DOC_DIR= ${PREFIX}/share/doc/PyXML/
SRC_DOCDIR= ${WRKSRC}/doc
DOCEXT= *.txt *.tex
do-build:
${PY_CMD} build \
--build-base=${WRKSRC} \
--with-libexpat=${LOCALBASE}
do-install:
${PY_CMD} install --prefix=${PREFIX}
${INSTALL_DATA_DIR} ${DOC_DIR}
${INSTALL_DATA_DIR} ${DOC_DIR}/4DOM
${INSTALL_DATA_DIR} ${DOC_DIR}/xmlproc
${INSTALL_DATA} ${SRC_DOCDIR}/4DOM/* ${DOC_DIR}/4DOM/
${INSTALL_DATA} ${SRC_DOCDIR}/xmlproc/* ${DOC_DIR}/xmlproc/
@cd ${SRC_DOCDIR}/ && ${INSTALL_DATA} ${DOCEXT} ${DOC_DIR}
.include <bsd.port.mk>