summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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 94109331fd..149945d250 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 c7bb18238f..a8071cde86 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 2d9219f9c5..20aa1a84ea 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=""