Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 6 Jul 2015 16:51:07 +0000 (UTC)
From:      Steve Wills <swills@FreeBSD.org>
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
Message-ID:  <201507061651.t66Gp7xP062604@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
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 <dbaio@bsd.com.br>

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 <bsd.port.mk>

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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201507061651.t66Gp7xP062604>