1
0
mirror of https://git.FreeBSD.org/ports.git synced 2024-12-12 03:00:28 +00:00
freebsd-ports/textproc/pup/Makefile
Mateusz Piotrowski 8096d74d2b New port: textproc/pup: Command-line jq-like HTML parser using CSS selectors
pup is a command line tool for processing HTML. It reads from stdin, prints
to stdout, and allows the user to filter parts of the page using CSS
selectors.

Inspired by jq, pup aims to be a fast and flexible way of exploring HTML
from the terminal.

WWW: https://github.com/ericchiang/pup

Reviewed by:	krion
Approved by:	krion (mentor)
Differential Revision:	https://reviews.freebsd.org/D19378
2019-02-28 09:32:51 +00:00

44 lines
1.1 KiB
Makefile

# $FreeBSD$
PORTNAME= pup
DISTVERSIONPREFIX= v
DISTVERSION= 0.4.0-9
DISTVERSIONSUFFIX= -g1c3cffd
CATEGORIES= textproc
MAINTAINER= 0mp@FreeBSD.org
COMMENT= Command-line jq-like HTML parser using CSS selectors
LICENSE= MIT
LICENSE_FILE= ${WRKSRC}/LICENSE
USES= go python:2.7,test shebangfix
USE_GITHUB= yes
GH_ACCOUNT= ericchiang
SHEBANG_FILES= tests/run.py
PLIST_FILES= bin/pup
PORTDOCS= README.md
OPTIONS_DEFINE= DOCS
pre-test:
@${REINPLACE_CMD} 's|^python |${PYTHON_VERSION} |' ${WRKSRC}/tests/test
@${REINPLACE_CMD} "s|pup |${STAGEDIR}/bin/pup |" ${WRKSRC}/tests/run.py
# Disable broken tests.
@${REINPLACE_CMD} "/^json{}$$/d" ${WRKSRC}/tests/cmds.txt
@${REINPLACE_CMD} "/ json{}$$/d" ${WRKSRC}/tests/expected_output.txt
@${REINPLACE_CMD} "/^#toc li + a json{}$$/d" ${WRKSRC}/tests/cmds.txt
@${REINPLACE_CMD} "/ #toc li + a json{}$$/d" ${WRKSRC}/tests/expected_output.txt
do-test:
cd ${WRKSRC}/tests && ${SH} ./test
cd ${GO_WRKSRC} && ${SETENV} ${GO_ENV} ${GO_CMD} test
post-install-DOCS-on:
@${MKDIR} ${STAGEDIR}${DOCSDIR}
${INSTALL_DATA} ${WRKSRC}/README.md ${STAGEDIR}${DOCSDIR}
.include <bsd.port.mk>