diff options
author | Mateusz Piotrowski <0mp@FreeBSD.org> | 2019-02-28 09:32:51 +0000 |
---|---|---|
committer | Mateusz Piotrowski <0mp@FreeBSD.org> | 2019-02-28 09:32:51 +0000 |
commit | 8096d74d2b1b23323404080d6f90cb50b4e87dc7 (patch) | |
tree | 501ac0dadf32f52904bda105aba5075306334a84 /textproc/pup | |
parent | a341f3071f93375fd7f264450546417a46b3a7bc (diff) | |
download | ports-8096d74d2b1b23323404080d6f90cb50b4e87dc7.tar.gz ports-8096d74d2b1b23323404080d6f90cb50b4e87dc7.zip |
Notes
Diffstat (limited to 'textproc/pup')
-rw-r--r-- | textproc/pup/Makefile | 43 | ||||
-rw-r--r-- | textproc/pup/distinfo | 3 | ||||
-rw-r--r-- | textproc/pup/pkg-descr | 7 |
3 files changed, 53 insertions, 0 deletions
diff --git a/textproc/pup/Makefile b/textproc/pup/Makefile new file mode 100644 index 000000000000..00cd11045453 --- /dev/null +++ b/textproc/pup/Makefile @@ -0,0 +1,43 @@ +# $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> diff --git a/textproc/pup/distinfo b/textproc/pup/distinfo new file mode 100644 index 000000000000..21e2f2970019 --- /dev/null +++ b/textproc/pup/distinfo @@ -0,0 +1,3 @@ +TIMESTAMP = 1551261841 +SHA256 (ericchiang-pup-v0.4.0-9-g1c3cffd_GH0.tar.gz) = 7268df5ed3d87f7c64740918d0f55b8c1b46c50773498f6ddad8728e009e10e6 +SIZE (ericchiang-pup-v0.4.0-9-g1c3cffd_GH0.tar.gz) = 2762078 diff --git a/textproc/pup/pkg-descr b/textproc/pup/pkg-descr new file mode 100644 index 000000000000..df28a5f145bf --- /dev/null +++ b/textproc/pup/pkg-descr @@ -0,0 +1,7 @@ +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 |