From owner-svn-ports-head@freebsd.org Mon Jul 6 16:51:09 2015 Return-Path: Delivered-To: svn-ports-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id BF46BAE7C; Mon, 6 Jul 2015 16:51:09 +0000 (UTC) (envelope-from swills@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id AE0C5107D; Mon, 6 Jul 2015 16:51:09 +0000 (UTC) (envelope-from swills@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.70]) by repo.freebsd.org (8.14.9/8.14.9) with ESMTP id t66Gp9ct062615; Mon, 6 Jul 2015 16:51:09 GMT (envelope-from swills@FreeBSD.org) Received: (from swills@localhost) by repo.freebsd.org (8.14.9/8.14.9/Submit) id t66Gp7xP062604; Mon, 6 Jul 2015 16:51:07 GMT (envelope-from swills@FreeBSD.org) Message-Id: <201507061651.t66Gp7xP062604@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: swills set sender to swills@FreeBSD.org using -f From: Steve Wills Date: Mon, 6 Jul 2015 16:51:07 +0000 (UTC) To: ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org Subject: svn commit: r391426 - in head/misc: . ansiweather ansiweather/files X-SVN-Group: ports-head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-ports-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the ports tree for head List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 06 Jul 2015 16:51:10 -0000 Author: swills Date: Mon Jul 6 16:51:06 2015 New Revision: 391426 URL: https://svnweb.freebsd.org/changeset/ports/391426 Log: misc/ansiweather: create port AnsiWeather is a Shell script for displaying the current weather conditions in your terminal, with support for ANSI colors and Unicode symbols. Weather data comes from the OpenWeatherMap free weather API. WWW: https://github.com/fcambus/ansiweather/ PR: 201097 Submitted by: Danilo G. Baio Added: head/misc/ansiweather/ head/misc/ansiweather/Makefile (contents, props changed) head/misc/ansiweather/distinfo (contents, props changed) head/misc/ansiweather/files/ head/misc/ansiweather/files/patch-ansiweather (contents, props changed) head/misc/ansiweather/files/pkg-message.in (contents, props changed) head/misc/ansiweather/pkg-descr (contents, props changed) head/misc/ansiweather/pkg-plist (contents, props changed) Modified: head/misc/Makefile Modified: head/misc/Makefile ============================================================================== --- head/misc/Makefile Mon Jul 6 16:47:09 2015 (r391425) +++ head/misc/Makefile Mon Jul 6 16:51:06 2015 (r391426) @@ -9,6 +9,7 @@ SUBDIR += amanda-perl-wrapper SUBDIR += amanda-server SUBDIR += amfm + SUBDIR += ansiweather SUBDIR += apparix SUBDIR += artikulate SUBDIR += asbutton Added: head/misc/ansiweather/Makefile ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/misc/ansiweather/Makefile Mon Jul 6 16:51:06 2015 (r391426) @@ -0,0 +1,37 @@ +# $FreeBSD$ + +PORTNAME= ansiweather +PORTVERSION= 1.02 +CATEGORIES= misc + +MAINTAINER= dbaio@bsd.com.br +COMMENT= Shell script for displaying the current weather in your terminal + +LICENSE= BSD3CLAUSE + +RUN_DEPENDS= ${LOCALBASE}/bin/jq:${PORTSDIR}/textproc/jq \ + ${LOCALBASE}/bin/curl:${PORTSDIR}/ftp/curl \ + ${LOCALBASE}/bin/bash:${PORTSDIR}/shells/bash \ + gprintf:${PORTSDIR}/sysutils/coreutils + +USE_GITHUB= yes +GH_ACCOUNT= fcambus + +NO_BUILD= yes + +SUB_FILES= pkg-message + +OPTIONS_DEFINE= DOCS EXAMPLES + +do-install: + ${MKDIR} ${STAGEDIR}${DATADIR} + ${MKDIR} ${STAGEDIR}${DOCSDIR} + ${MKDIR} ${STAGEDIR}${EXAMPLESDIR} + + ${INSTALL_SCRIPT} ${WRKSRC}/ansiweather ${STAGEDIR}${PREFIX}/bin/ansiweather + ${INSTALL_DATA} ${WRKSRC}/ansiweather.plugin.zsh ${STAGEDIR}${DATADIR} + ${INSTALL_DATA} ${WRKSRC}/ansiweatherrc.example ${STAGEDIR}${EXAMPLESDIR} + ${INSTALL_MAN} ${WRKSRC}/README.md ${STAGEDIR}${DOCSDIR} + ${INSTALL_MAN} ${WRKSRC}/AUTHORS ${STAGEDIR}${DOCSDIR} + +.include Added: head/misc/ansiweather/distinfo ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/misc/ansiweather/distinfo Mon Jul 6 16:51:06 2015 (r391426) @@ -0,0 +1,2 @@ +SHA256 (fcambus-ansiweather-1.02_GH0.tar.gz) = 6b65ba86a0a3af7ac0fbfea3c0e871371c519d0fafd79e4a517909128bf7ca5f +SIZE (fcambus-ansiweather-1.02_GH0.tar.gz) = 5763 Added: head/misc/ansiweather/files/patch-ansiweather ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/misc/ansiweather/files/patch-ansiweather Mon Jul 6 16:51:06 2015 (r391426) @@ -0,0 +1,38 @@ +--- ansiweather.orig 2015-07-03 01:51:59 UTC ++++ ansiweather +@@ -203,8 +203,8 @@ then + do + days+=("$(echo $weather | jq ".list[$i]")") + dates+=("$(epoch_to_date $(echo ${days[$i]} | jq -r '.dt'))") +- lows+=("$(printf "%0.0f" $(echo ${days[$i]} | jq -r '.temp.min'))") +- highs+=("$(printf "%0.0f" $(echo ${days[$i]} | jq -r '.temp.max'))") ++ lows+=("$(gprintf "%0.0f" $(echo ${days[$i]} | jq -r '.temp.min'))") ++ highs+=("$(gprintf "%0.0f" $(echo ${days[$i]} | jq -r '.temp.max'))") + humidity+=("$(echo ${days[$i]} | jq -r '.humidity')") + pressure+=("$(echo ${days[$i]} | jq -r '.pressure')") + sky+=("$(echo ${days[$i]} | jq -r '.weather[0].main')") +@@ -213,7 +213,7 @@ then + done + else + city=$(echo $weather | jq -r '.name') +- temperature=$(printf '%.0f' $(echo $weather | jq '.main.temp')) ++ temperature=$(gprintf '%.0f' $(echo $weather | jq '.main.temp')) + humidity=$(echo $weather | jq '.main.humidity') + pressure=$(echo $weather | jq '.main.pressure') + sky=$(echo $weather | jq -r '.weather[0].main') +@@ -293,13 +293,13 @@ case $units in + scale="°C" + speed_unit="m/s" + pressure_unit="hPa" +- pressure=$(printf '%.0f' $pressure) ++ pressure=$(gprintf '%.0f' $pressure) + ;; + imperial) + scale="°F" + speed_unit="mph" + pressure_unit="inHg" +- pressure=$(printf '%.2f' $(echo "$pressure*0.0295" | bc)) ++ pressure=$(gprintf '%.2f' $(echo "$pressure*0.0295" | bc)) + ;; + esac + Added: head/misc/ansiweather/files/pkg-message.in ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/misc/ansiweather/files/pkg-message.in Mon Jul 6 16:51:06 2015 (r391426) @@ -0,0 +1,9 @@ +************************************************************************ + + The default config file is ~/.ansiweatherrc. The environment variable + ANSIWEATHERRC can be set to override this. + + The file %%EXAMPLESDIR%%/ansiweatherrc.example + contains all available configuration variables. + +************************************************************************ Added: head/misc/ansiweather/pkg-descr ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/misc/ansiweather/pkg-descr Mon Jul 6 16:51:06 2015 (r391426) @@ -0,0 +1,6 @@ +AnsiWeather is a Shell script for displaying the current weather conditions +in your terminal, with support for ANSI colors and Unicode symbols. + +Weather data comes from the OpenWeatherMap free weather API. + +WWW: https://github.com/fcambus/ansiweather/ Added: head/misc/ansiweather/pkg-plist ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/misc/ansiweather/pkg-plist Mon Jul 6 16:51:06 2015 (r391426) @@ -0,0 +1,5 @@ +bin/ansiweather +%%DATADIR%%/ansiweather.plugin.zsh +%%PORTDOCS%%%%DOCSDIR%%/AUTHORS +%%PORTDOCS%%%%DOCSDIR%%/README.md +%%PORTEXAMPLES%%%%EXAMPLESDIR%%/ansiweatherrc.example