svn commit: r357097 - in head/textproc: . google-translate-cli

Nicola Vitale nivit at FreeBSD.org
Mon Jun 9 03:43:37 UTC 2014


Author: nivit
Date: Mon Jun  9 03:43:35 2014
New Revision: 357097
URL: http://svnweb.freebsd.org/changeset/ports/357097
QAT: https://qat.redports.org/buildarchive/r357097/

Log:
  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/

Added:
  head/textproc/google-translate-cli/
  head/textproc/google-translate-cli/Makefile   (contents, props changed)
  head/textproc/google-translate-cli/distinfo   (contents, props changed)
  head/textproc/google-translate-cli/pkg-descr   (contents, props changed)
  head/textproc/google-translate-cli/pkg-plist   (contents, props changed)
Modified:
  head/textproc/Makefile

Modified: head/textproc/Makefile
==============================================================================
--- head/textproc/Makefile	Mon Jun  9 03:43:22 2014	(r357096)
+++ head/textproc/Makefile	Mon Jun  9 03:43:35 2014	(r357097)
@@ -200,6 +200,7 @@
     SUBDIR += go.text
     SUBDIR += goldendict
     SUBDIR += google-ctemplate
+    SUBDIR += google-translate-cli
     SUBDIR += gpp
     SUBDIR += grap
     SUBDIR += grc-aspell

Added: head/textproc/google-translate-cli/Makefile
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/textproc/google-translate-cli/Makefile	Mon Jun  9 03:43:35 2014	(r357097)
@@ -0,0 +1,70 @@
+# Created by: Nicola Vitale <nivit at FreeBSD.org>
+# $FreeBSD$
+
+PORTNAME=	google-translate-cli
+PORTVERSION=	0.0.1
+#PORTREVISION=	0
+CATEGORIES=	textproc
+
+MAINTAINER=	nivit at 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>

Added: head/textproc/google-translate-cli/distinfo
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/textproc/google-translate-cli/distinfo	Mon Jun  9 03:43:35 2014	(r357097)
@@ -0,0 +1,2 @@
+SHA256 (google-translate-cli-0.0.1.tar.gz) = ba778fadbbd91f93b431bfc769b6ea537931cd5475f2c811b024b4fe7dc70a02
+SIZE (google-translate-cli-0.0.1.tar.gz) = 4741

Added: head/textproc/google-translate-cli/pkg-descr
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/textproc/google-translate-cli/pkg-descr	Mon Jun  9 03:43:35 2014	(r357097)
@@ -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/

Added: head/textproc/google-translate-cli/pkg-plist
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/textproc/google-translate-cli/pkg-plist	Mon Jun  9 03:43:35 2014	(r357097)
@@ -0,0 +1,7 @@
+bin/translate
+bin/trs
+%%PORTDOCS%%%%DOCSDIR%%/README.html
+%%DATADIR%%/translate
+%%DATADIR%%/translate.awk
+ at dirrmtry %%DATADIR%%
+%%PORTDOCS%%@dirrmtry %%DOCSDIR%%


More information about the svn-ports-head mailing list