aboutsummaryrefslogtreecommitdiff
path: root/network/weathercli
diff options
context:
space:
mode:
authorDimitris Zlatanidis <d.zlatanidis@gmail.com>2018-05-10 21:05:13 +0200
committerWilly Sudiarto Raharjo <willysr@slackbuilds.org>2018-05-12 06:58:32 +0700
commitf3c6691ded525ec729dae22ded2f1e99813084b9 (patch)
treefbfd7e8f3606c2788682fc4026086387370e062b /network/weathercli
parent5d1ebbcd411c74083e42423ee8681c6f72c6bbed (diff)
network/weathercli: Update script & DOWNLOAD.
Signed-off-by: Dimitris Zlatanidis <d.zlatanidis@gmail.com>
Diffstat (limited to 'network/weathercli')
-rw-r--r--network/weathercli/README6
-rw-r--r--network/weathercli/weathercli.SlackBuild18
-rw-r--r--network/weathercli/weathercli.info2
3 files changed, 23 insertions, 3 deletions
diff --git a/network/weathercli/README b/network/weathercli/README
index 94109331fd6b2..149945d25065a 100644
--- a/network/weathercli/README
+++ b/network/weathercli/README
@@ -1 +1,7 @@
weathercli is a command line weather tool.
+
+Pass the script your API Key:
+API_KEY=my_api_key_here ./weathercli.SlackBuild
+
+Get your API Key on this page:
+https://openweathermap.org/
diff --git a/network/weathercli/weathercli.SlackBuild b/network/weathercli/weathercli.SlackBuild
index c7bb18238fb1e..a8071cde86c1f 100644
--- a/network/weathercli/weathercli.SlackBuild
+++ b/network/weathercli/weathercli.SlackBuild
@@ -2,7 +2,7 @@
# Slackware build script for weathercli
-# Copyright 2014-2016 Dimitris Zlatanidis Orestiada, Greece
+# Copyright 2014-2018 Dimitris Zlatanidis Orestiada, Greece
# All rights reserved.
#
# Redistribution and use of this script, with or without modification, is
@@ -25,7 +25,7 @@
PRGNAM=weathercli
VERSION=${VERSION:-2.3.1}
-BUILD=${BUILD:-2}
+BUILD=${BUILD:-3}
TAG=${TAG:-_SBo}
if [ -z "$ARCH" ]; then
@@ -70,6 +70,20 @@ find -L . \
\( -perm 666 -o -perm 664 -o -perm 640 -o -perm 600 -o -perm 444 \
-o -perm 440 -o -perm 400 \) -exec chmod 644 {} \;
+if [ "$API_KEY" = "" ]; then
+ echo ""
+ echo "API_KEY not found !!! Please pass the script your API Key"
+ echo "API_KEY=my_api_key_here ./weathercli.SlackBuild"
+ echo "Get your API Key on this page : https://openweathermap.org/"
+ echo ""
+ exit 1
+fi
+
+# Patch API Key
+API_KEY=${API_KEY}
+echo $API_KEY
+echo $API_KEY | sed -i "s/&units={1}/\&units={1}\&appid=$API_KEY/" weathercli.py
+
# rename executable
sed -i "s/bin\/weather/bin\/weathercli/" setup.py
mv bin/weather bin/weathercli
diff --git a/network/weathercli/weathercli.info b/network/weathercli/weathercli.info
index 2d9219f9c5bd7..20aa1a84ead4a 100644
--- a/network/weathercli/weathercli.info
+++ b/network/weathercli/weathercli.info
@@ -1,7 +1,7 @@
PRGNAM="weathercli"
VERSION="2.3.1"
HOMEPAGE="https://github.com/brianriley/weather-cli"
-DOWNLOAD="https://pypi.python.org/packages/source/w/weathercli/weathercli-2.3.1.tar.gz"
+DOWNLOAD="https://files.pythonhosted.org/packages/a5/ff/53c22b373493083dcfcea6e2e669016339fc16dbfeb465053b3a854c0fe2/weathercli-2.3.1.tar.gz"
MD5SUM="09a930ca81da6d79e8ea241ce9bc6567"
DOWNLOAD_x86_64=""
MD5SUM_x86_64=""