summaryrefslogtreecommitdiffstats
path: root/system/wmgtemp
diff options
context:
space:
mode:
author B. Watson <yalhcru@gmail.com>2021-08-09 17:30:47 -0400
committer Willy Sudiarto Raharjo <willysr@slackbuilds.org>2021-10-13 00:51:32 +0700
commit0bcd97b39d65b992d2314a21cc029cb9af9c52ff (patch)
treedcd58ea64bb665da9c1bbedc1eb9f4a324924b39 /system/wmgtemp
parentcf15955a375e3f696d3b1cc27574b2c11fb603f1 (diff)
downloadslackbuilds-0bcd97b39d65b992d2314a21cc029cb9af9c52ff.tar.gz
slackbuilds-0bcd97b39d65b992d2314a21cc029cb9af9c52ff.tar.xz
system/wmgtemp: Minor fixes.
Signed-off-by: B. Watson <yalhcru@gmail.com> Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
Diffstat (limited to 'system/wmgtemp')
-rw-r--r--system/wmgtemp/fixes.diff192
-rw-r--r--system/wmgtemp/wmgtemp.SlackBuild14
2 files changed, 202 insertions, 4 deletions
diff --git a/system/wmgtemp/fixes.diff b/system/wmgtemp/fixes.diff
new file mode 100644
index 0000000000..591e5494de
--- /dev/null
+++ b/system/wmgtemp/fixes.diff
@@ -0,0 +1,192 @@
+diff -Naur wmgtemp-1.2/src/wmgtemp.c wmgtemp-1.2.work/src/wmgtemp.c
+--- wmgtemp-1.2/src/wmgtemp.c 2017-02-01 21:56:50.000000000 -0500
++++ wmgtemp-1.2.work/src/wmgtemp.c 2021-08-09 17:22:46.640646642 -0400
+@@ -691,19 +691,19 @@
+ " [Default: autodetect]\n" \
+ " -s, --scale=SCALE Display temperatures in SCALE\n" \
+ " SCALE=kelvin, fahrenheit\n" \
+- " [Default: celcius]\n" \
++ " [Default: celsius]\n" \
+ " -g, --graph=STYLE Display graph as STYLE\n" \
+ " STYLE=line, block\n" \
+ " [Default: line]\n" \
+- " -H, --high=TEMP Display red warning light at TEMP degrees celcius\n" \
++ " -H, --high=TEMP Display red warning light at TEMP degrees celsius\n" \
+ " [Default: 50]\n" \
+- " -w, --warn=TEMP Display amber warning light at TEMP degrees celcius\n" \
++ " -w, --warn=TEMP Display amber warning light at TEMP degrees celsius\n" \
+ " [Default: 45]\n" \
+ " -u, --update=SEC Update the display every SEC seconds\n" \
+ " [Default: 1]\n" \
+- " -m, --min=TEMP Set lower bound of the graph to TEMP degrees celcius\n" \
++ " -m, --min=TEMP Set lower bound of the graph to TEMP degrees celsius\n" \
+ " [Default: 20]\n" \
+- " -M, --max=TEMP Set upper bound of the graph to TEMP degrees celcius\n" \
++ " -M, --max=TEMP Set upper bound of the graph to TEMP degrees celsius\n" \
+ " [Default: 35]\n" \
+ " -1, --feature1=F1 Set the feature for CPU\n" \
+ " [Default: temp1]\n" \
+@@ -711,7 +711,7 @@
+ " [Default: temp2]\n" \
+ " -c, --chip=NAME Use sensor chip matching NAME\n" \
+ " [Default: use any]\n" \
+- " -a, --execat=TEMP Execute a command at TEMP degrees celcius\n" \
++ " -a, --execat=TEMP Execute a command at TEMP degrees celsius\n" \
+ " -e, --exec=COMMAND Execute COMMAND when 'execat' temperature is reached\n" \
+ " -t, --swap Swap CPU and SYS temps\n" \
+ " -q, --quiet Don't display any messages\n" \
+@@ -874,6 +874,7 @@
+ };
+
+ p = getenv("HOME");
++ if(!p) p = ".";
+ strcpy(temp, p);
+ strcat(temp, "/.wmgtemprc");
+ parse_rcfile(temp, wmgtemp_keys);
+@@ -992,7 +993,7 @@
+ }
+ else {
+ if(quiet == 0)
+- printf("wmgtemp: high temp set to %d degrees celcius.\n", (int)high_temp);
++ printf("wmgtemp: high temp set to %d degrees celsius.\n", (int)high_temp);
+ }
+ }
+ if(rc_warn != NULL) {
+@@ -1003,7 +1004,7 @@
+ }
+ else {
+ if(quiet == 0)
+- printf("wmgtemp: warning temp set to %d degrees celcius.\n", (int)warn_temp);
++ printf("wmgtemp: warning temp set to %d degrees celsius.\n", (int)warn_temp);
+ }
+ }
+ if(rc_max != NULL) {
+@@ -1014,7 +1015,7 @@
+ }
+ else {
+ if(quiet == 0)
+- printf("wmgtemp: Upper range set to %d degrees celcius.\n", (int)range_upper);
++ printf("wmgtemp: Upper range set to %d degrees celsius.\n", (int)range_upper);
+ }
+ }
+ if(rc_min != NULL) {
+@@ -1025,7 +1026,7 @@
+ }
+ else {
+ if(quiet == 0)
+- printf("wmgtemp: Lower range set to %d degrees celcius.\n", (int)range_lower);
++ printf("wmgtemp: Lower range set to %d degrees celsius.\n", (int)range_lower);
+ }
+ }
+ if(rc_delay != NULL) {
+@@ -1049,15 +1050,15 @@
+ if(rc_exec != NULL) {
+ if(strcmp(rc_exec, "")) {
+ exec_app = strdup(rc_exec);
+- printf("wmgtemp: Executing \"%s\" at %d degrees celcius.\n", exec_app, (int)execat);
++ printf("wmgtemp: Executing \"%s\" at %d degrees celsius.\n", exec_app, (int)execat);
+ }
+ else {
+- printf("You must supply an command to execute\n");
++ printf("You must supply a command to execute\n");
+ parse_ok = 0;
+ }
+ }
+ else {
+- printf("You must supply an command to execute\n");
++ printf("You must supply a command to execute\n");
+ parse_ok = 0;
+ }
+ }
+diff -Naur wmgtemp-1.2/wmgtemp.1 wmgtemp-1.2.work/wmgtemp.1
+--- wmgtemp-1.2/wmgtemp.1 2017-02-01 21:56:50.000000000 -0500
++++ wmgtemp-1.2.work/wmgtemp.1 2021-08-09 17:24:25.928637617 -0400
+@@ -21,9 +21,9 @@
+ display the usage information
+ .TP
+ .B \-s, \-\-scale=SCALE
+-show temperatures using SCALE temperature scale. SCALE=celcius, fahrenheit or kelvin.
++show temperatures using SCALE temperature scale. SCALE=celsius, fahrenheit or kelvin. Only the first character is significant (you can just say c for celsius, etc).
+ .br
+-\fBDefault\fP: celcius
++\fBDefault\fP: celsius
+ .TP
+ .B \-S, \-\-sensorconf=PATH
+ specify the PATH to the lm_sensors config
+@@ -37,13 +37,13 @@
+ .TP
+
+ .B \-H, \-\-high=TEMP
+-display red warning light at TEMP degrees celcius.
++display red warning light at TEMP degrees celsius.
+ .br
+ \fBDefault\fP: 50
+ .TP
+
+ .B \-w, \-\-warn=TEMP
+-display amber warning light at TEMP degrees celcius.
++display amber warning light at TEMP degrees celsius.
+ .br
+ \fBDefault\fP: 45
+
+@@ -55,13 +55,13 @@
+
+ .TP
+ .B \-m, \-\-min=TEMP
+-set the lower bound of the graph to TEMP degrees celcius.
++set the lower bound of the graph to TEMP degrees celsius.
+ .br
+ \fBDefault\fP: 20
+
+ .TP
+ .B \-M, \-\-max=TEMP
+-set the upper bound of the graph to TEMP degrees celcius.
++set the upper bound of the graph to TEMP degrees celsius.
+ .br
+ \fBDefault\fP: 35
+
+@@ -85,7 +85,7 @@
+
+ .TP
+ .B \-a, \-\-execat=TEMP
+-execute a command at TEMP degrees celcius.
++execute a command at TEMP degrees celsius.
+ .br
+ \fBDefault\fP: none
+
+@@ -111,7 +111,7 @@
+ .nf
+ .IP
+ # wmgtemp example config
+-scale:celcius
++scale:celsius
+ graph:line
+ high:50
+ warn:45
+@@ -130,24 +130,19 @@
+ You can cycle through the graph types by clicking on the graph display area.
+ .PP
+ .SS High Temperature Toggle
+-You can toggle the displaying of high temperatures by click on the temperature for the corrosponding temperature. The viewing of high temperatures is indicated by an amber arrow to the left of the temperature. The current temperatures will continue to be displayed on the graph.
++You can toggle the displaying of high temperatures by click on the temperature for the corresponding temperature. The viewing of high temperatures is indicated by an amber arrow to the left of the temperature. The current temperatures will continue to be displayed on the graph.
+ .PP
+ .SH
+ .SS Temperature display TOGGLE
+-You may toggle the displaying of a temperature on the graph by clicking on the corrosponding type. e.g To toggle the display of the CPU temperature click on CPU. The type indicator (CPU or SYS) will disappear and the temperature will not be displayed on the graph, although the temperature value will continue to be displayed.
++You may toggle the displaying of a temperature on the graph by clicking on the corresponding type. E.g. to toggle the display of the CPU temperature, click on CPU. The type indicator (CPU or SYS) will disappear and the temperature will not be displayed on the graph, although the temperature value will continue to be displayed.
+ .PP
+ .SH
+ .SS Temperature Scale Cycling
+ You may change the scale the temperatures are displayed in by clicking on either of the CPU or SYS scale indicators. The cycle order is \fBC\fP -> \fBK\fP -> \fBF\fP
+ .PP
+-.SH BUGS
+-Blank lines in the config file cause a Segmentation Fault.
+-.PP
+ .SH SEE ALSO
+ .BR sensors.conf (5),
+ .BR libsensors (3),
+ .BR wmaker (1x)
+ .SH AUTHOR
+ wmgtemp was written by Roger Dunce <kronos@fluxcode.net>
+-
+-
diff --git a/system/wmgtemp/wmgtemp.SlackBuild b/system/wmgtemp/wmgtemp.SlackBuild
index f5cd51c8bc..8e2b5aee43 100644
--- a/system/wmgtemp/wmgtemp.SlackBuild
+++ b/system/wmgtemp/wmgtemp.SlackBuild
@@ -28,7 +28,13 @@
# Now maintained by B. Watson <yalhcru@gmail.com>
+# 20210809 bkw: minor fixes, BUILD=2
+# - manpage: fix typo, corrosponding => corresponding
+# - manpage: remove BUGS section since it no longer applies
+# - don't segfault if HOME not set in environment
+
# 20200609 bkw: update for v1.2, add libdockapp dep
+
# 20160816 bkw:
# - take over maintenance
# - BUILD=2
@@ -42,7 +48,7 @@ cd $(dirname $0) ; CWD=$(pwd)
PRGNAM=wmgtemp
VERSION=${VERSION:-1.2}
-BUILD=${BUILD:-1}
+BUILD=${BUILD:-2}
TAG=${TAG:-_SBo}
PKGTYPE=${PKGTYPE:-tgz}
@@ -54,9 +60,6 @@ if [ -z "$ARCH" ]; then
esac
fi
-# If the variable PRINT_PACKAGE_NAME is set, then this script will report what
-# the name of the created package would be, and then exit. This information
-# could be useful to other scripts.
if [ ! -z "${PRINT_PACKAGE_NAME}" ]; then
echo "$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.$PKGTYPE"
exit 0
@@ -92,6 +95,9 @@ chown -R root:root .
find -L . -perm /111 -a \! -perm 755 -a -exec chmod 755 {} \+ -o \
\! -perm /111 -a \! -perm 644 -a -exec chmod 644 {} \+
+# Various minor fixes by SlackBuild author
+patch -p1 < $CWD/fixes.diff
+
CFLAGS="$SLKCFLAGS" \
CXXFLAGS="$SLKCFLAGS" \
./configure \