openbsd-ports/textproc/py-xml/Makefile

63 lines
1.5 KiB
Makefile
Raw Normal View History

# $OpenBSD: Makefile,v 1.3 2001/08/08 10:02:50 shell Exp $
COMMENT= "python module for writing basic XML applications"
VERSION= 0.6.6
DISTNAME= PyXML-${VERSION}
PKGNAME= py-xml-${VERSION}
CATEGORIES= textproc devel
NEED_VERSION= 1.434
MASTER_SITES= ${MASTER_SITE_SOURCEFORGE}
MASTER_SITE_SUBDIR= pyxml
HOMEPAGE= http://pyxml.sourceforge.net/topic/
MAINTAINER= Shell Hung <shell@openbsd.org>
PERMIT_PACKAGE_FTP= Yes
PERMIT_PACKAGE_CDROM= Yes
PERMIT_DISTFILES_FTP= Yes
PERMIT_DISTFILES_CDROM= Yes
FLAVORS= python1
FLAVOR?=
.if ${FLAVOR:L:Mpython1}
PYTHON_VER= 1.5
PYTHON_EXT= 15
PYTHON_PATH= ${LOCALBASE}/lib/python${PYTHON_VER}
RUN_DEPENDS= ${PYTHON_PATH}/site-packages/distutils::devel/py-Distutils
.else
PYTHON_VER= 2.1
.endif
RUN_DEPENDS+= python${PYTHON_VER}::lang/python${PYTHON_EXT}
BUILD_DEPENDS= ${RUN_DEPENDS}
SUBST_VARS= PYTHON_VER
DOC_DIR= ${PREFIX}/share/doc/PyXML
SRC_DOCDIR= ${WRKSRC}/doc
SRC_DOCMOD= 4DOM xmlproc
SRC_DOCFILES= package-summary.txt xml-howto.tex \
xml-howto.txt xml-ref.tex xml-ref.txt
do-build:
cd ${WRKSRC}; python${PYTHON_VER} ./setup.py build \
--build-base=${WRKSRC}
do-install:
cd ${WRKSRC}; python${PYTHON_VER} ./setup.py install \
--prefix=${PREFIX}
${INSTALL_DATA_DIR} ${DOC_DIR}
.for i in ${SRC_DOCMOD}
${INSTALL_DATA_DIR} ${DOC_DIR}/$i
${INSTALL_DATA} ${SRC_DOCDIR}/$i/* ${DOC_DIR}/$i/
.endfor
.for i in ${SRC_DOCFILES}
${INSTALL_DATA} ${SRC_DOCDIR}/$i ${DOC_DIR}/$i
.endfor
.include <bsd.port.mk>