1
0
mirror of https://git.FreeBSD.org/ports.git synced 2024-12-04 01:48:54 +00:00
freebsd-ports/www/py-cssselect/Makefile
Nicola Vitale 8ffe5e9e77 - Add code and patch files/patch-docs__conf.py to avoid
download of intersphinx inventory during the install
  stage (on pointyhat)
- Remove OPTIONS_DEFAULT=DOCS
- Add switch -N to the sphinx-build command (don't do
  colored output)
2012-07-17 05:49:47 +00:00

55 lines
1.3 KiB
Makefile

# New ports collection makefile for: cssselect
# Date created: 2012-05-02
# Whom: Nicola Vitale <nivit@FreeBSD.org>
#
# $FreeBSD$
#
PORTNAME= cssselect
PORTVERSION= 0.7.1
#PORTREVISION= 0
CATEGORIES= www
MASTER_SITES= CHEESESHOP http://docs.python.org/:sphinx
PKGNAMEPREFIX= ${PYTHON_PKGNAMEPREFIX}
DISTFILES= ${PORTNAME}-${PORTVERSION}.tar.gz
DIST_SUBDIR= ${PORTNAME}
EXTRACT_ONLY= ${PORTNAME}-${PORTVERSION}.tar.gz
MAINTAINER= nivit@FreeBSD.org
COMMENT= Cssselect parses CSS3 Selectors and translates them to XPath 1.0
LICENSE= BSD
OPTIONSFILE= ${PORT_DBDIR}/py-${PORTNAME}/options
OPTIONS_DEFINE= DOCS
.include <bsd.port.options.mk>
# Python3 ready
USE_PYTHON= -2.7
USE_PYDISTUTILS= easy_install
DOCSDIR= ${PREFIX}/share/doc/${PKGNAMEPREFIX}${PORTNAME}
SPHINX_BUILD= sphinx-build
.include <bsd.port.pre.mk>
.if ${PORT_OPTIONS:MDOCS}
DISTFILES+= objects.inv:sphinx
BUILD_DEPENDS+= sphinx-build:${PORTSDIR}/textproc/py-sphinx
REINPLACE_ARGS= -i.bak -e 's,%%DISTDIR%%,${DISTDIR},g' \
-e 's,%%PORTNAME%%,${PORTNAME},g'
post-patch:
${REINPLACE_CMD} ${WRKSRC}/docs/conf.py
post-install:
${SETENV} PYTHONPATH="${PYTHONPREFIX_SITELIBDIR}" \
${SPHINX_BUILD} -N -a -b html ${WRKSRC}/docs ${WRKSRC}/docs.html && \
cd ${WRKSRC}/docs.html && ${MKDIR} ${DOCSDIR} && \
${COPYTREE_SHARE} . ${DOCSDIR}
.endif
.include <bsd.port.post.mk>