mirror of
https://git.FreeBSD.org/ports.git
synced 2024-11-21 00:25:50 +00:00
google-translate-cli is a 100-line AWK program to let you use Google Translate
without a web browser, i.e., from the terminal. WWW: http://www.soimort.org/google-translate-cli/
This commit is contained in:
parent
cdab480c75
commit
07b062b11e
Notes:
svn2git
2021-03-31 03:12:20 +00:00
svn path=/head/; revision=357097
@ -200,6 +200,7 @@
|
|||||||
SUBDIR += go.text
|
SUBDIR += go.text
|
||||||
SUBDIR += goldendict
|
SUBDIR += goldendict
|
||||||
SUBDIR += google-ctemplate
|
SUBDIR += google-ctemplate
|
||||||
|
SUBDIR += google-translate-cli
|
||||||
SUBDIR += gpp
|
SUBDIR += gpp
|
||||||
SUBDIR += grap
|
SUBDIR += grap
|
||||||
SUBDIR += grc-aspell
|
SUBDIR += grc-aspell
|
||||||
|
70
textproc/google-translate-cli/Makefile
Normal file
70
textproc/google-translate-cli/Makefile
Normal file
@ -0,0 +1,70 @@
|
|||||||
|
# Created by: Nicola Vitale <nivit@FreeBSD.org>
|
||||||
|
# $FreeBSD$
|
||||||
|
|
||||||
|
PORTNAME= google-translate-cli
|
||||||
|
PORTVERSION= 0.0.1
|
||||||
|
#PORTREVISION= 0
|
||||||
|
CATEGORIES= textproc
|
||||||
|
|
||||||
|
MAINTAINER= nivit@FreeBSD.org
|
||||||
|
COMMENT= Google Translate to serve as a command line tool
|
||||||
|
|
||||||
|
LICENSE= BW
|
||||||
|
LICENSE_NAME= Beerware
|
||||||
|
LICENSE_TEXT= http://www.sax.de/~joerg/beerware-license.txt
|
||||||
|
LICENSE_PERMS= no-dist-mirror no-dist-sell no-pkg-mirror no-pkg-sell auto-accept
|
||||||
|
|
||||||
|
RUN_DEPENDS= gawk:${PORTSDIR}/lang/gawk
|
||||||
|
|
||||||
|
# same binary file bin/translate
|
||||||
|
CONFLICTS_INSTALL= translate-*
|
||||||
|
|
||||||
|
GH_ACCOUNT= soimort
|
||||||
|
GH_COMMIT= 2f59fc6
|
||||||
|
GH_TAGNAME= ${GH_COMMIT}
|
||||||
|
gawk_CMD= ${SETENV} -S gawk
|
||||||
|
gawk_OLD_CMD= /usr/bin/gawk
|
||||||
|
|
||||||
|
MARKDOWN_CMD= ${LOCALBASE}/bin/markdown
|
||||||
|
|
||||||
|
OPTIONS_DEFINE= DOCS
|
||||||
|
|
||||||
|
SHEBANG_FILES= ${WRKSRC}/translate.awk
|
||||||
|
SHEBANG_LANG= gawk
|
||||||
|
|
||||||
|
USE_GITHUB= yes
|
||||||
|
USES= shebangfix
|
||||||
|
|
||||||
|
.include <bsd.port.options.mk>
|
||||||
|
|
||||||
|
post-patch:
|
||||||
|
@${REINPLACE_CMD} -e 's,^gawk,${LOCALBASE}/bin/&,1' \
|
||||||
|
-e 's,translate.awk,${DATADIR}/&,1' ${WRKSRC}/translate
|
||||||
|
|
||||||
|
.if !${PORT_OPTIONS:MDOCS}
|
||||||
|
NO_BUILD= yes
|
||||||
|
.else
|
||||||
|
BUILD_DEPENDS+= markdown:${PORTSDIR}/textproc/discount
|
||||||
|
|
||||||
|
do-build:
|
||||||
|
@(cd ${WRKSRC} && \
|
||||||
|
${MARKDOWN_CMD} README.md > README.tmp && \
|
||||||
|
echo "<!DOCTYPE html><html><head><meta charset="UTF-8"><title>${COMMENT}</title></head><body>" | \
|
||||||
|
${CAT} - ${WRKSRC}/README.tmp $(${ECHO_CMD} "</body></html>") > README.html)
|
||||||
|
|
||||||
|
post-install:
|
||||||
|
@${MKDIR} ${STAGEDIR}${DOCSDIR}
|
||||||
|
${INSTALL_DATA} ${WRKSRC}/README.html ${STAGEDIR}${DOCSDIR}
|
||||||
|
.endif
|
||||||
|
|
||||||
|
do-install:
|
||||||
|
@${MKDIR} ${STAGEDIR}${DATADIR}
|
||||||
|
${INSTALL_SCRIPT} ${WRKSRC}/translate ${STAGEDIR}${DATADIR}
|
||||||
|
${INSTALL_DATA} ${WRKSRC}/translate.awk ${STAGEDIR}${DATADIR}
|
||||||
|
${LN} -sf ${DATADIR}/translate ${STAGEDIR}${PREFIX}/bin/translate
|
||||||
|
${LN} -sf ${DATADIR}/translate ${STAGEDIR}${PREFIX}/bin/trs
|
||||||
|
|
||||||
|
regression-test test: build
|
||||||
|
@(cd ${WRKSRC} ; ${MAKE} test)
|
||||||
|
|
||||||
|
.include <bsd.port.mk>
|
2
textproc/google-translate-cli/distinfo
Normal file
2
textproc/google-translate-cli/distinfo
Normal file
@ -0,0 +1,2 @@
|
|||||||
|
SHA256 (google-translate-cli-0.0.1.tar.gz) = ba778fadbbd91f93b431bfc769b6ea537931cd5475f2c811b024b4fe7dc70a02
|
||||||
|
SIZE (google-translate-cli-0.0.1.tar.gz) = 4741
|
4
textproc/google-translate-cli/pkg-descr
Normal file
4
textproc/google-translate-cli/pkg-descr
Normal file
@ -0,0 +1,4 @@
|
|||||||
|
google-translate-cli is a 100-line AWK program to let you use Google Translate
|
||||||
|
without a web browser, i.e., from the terminal.
|
||||||
|
|
||||||
|
WWW: http://www.soimort.org/google-translate-cli/
|
7
textproc/google-translate-cli/pkg-plist
Normal file
7
textproc/google-translate-cli/pkg-plist
Normal file
@ -0,0 +1,7 @@
|
|||||||
|
bin/translate
|
||||||
|
bin/trs
|
||||||
|
%%PORTDOCS%%%%DOCSDIR%%/README.html
|
||||||
|
%%DATADIR%%/translate
|
||||||
|
%%DATADIR%%/translate.awk
|
||||||
|
@dirrmtry %%DATADIR%%
|
||||||
|
%%PORTDOCS%%@dirrmtry %%DOCSDIR%%
|
Loading…
Reference in New Issue
Block a user