summaryrefslogtreecommitdiffstats
path: root/system/wmgtemp
diff options
context:
space:
mode:
Diffstat (limited to 'system/wmgtemp')
-rw-r--r--system/wmgtemp/bugfix.diff14
-rw-r--r--system/wmgtemp/fixes.diff192
-rw-r--r--system/wmgtemp/wmgtemp.SlackBuild54
-rw-r--r--system/wmgtemp/wmgtemp.info12
4 files changed, 235 insertions, 37 deletions
diff --git a/system/wmgtemp/bugfix.diff b/system/wmgtemp/bugfix.diff
deleted file mode 100644
index 19916400c8..0000000000
--- a/system/wmgtemp/bugfix.diff
+++ /dev/null
@@ -1,14 +0,0 @@
-diff -Naur wmgtemp-1.1/src/wmgtemp.c wmgtemp-1.1.patched/src/wmgtemp.c
---- wmgtemp-1.1/src/wmgtemp.c 2010-06-21 06:54:37.000000000 -0400
-+++ wmgtemp-1.1.patched/src/wmgtemp.c 2016-08-16 08:38:01.208866564 -0400
-@@ -90,8 +90,8 @@
- int SUBFEAT_NUM_CPU = 0;
- int SUBFEAT_NUM_SYS = 0;
-
--double cpu_history[59];
--double sys_history[59];
-+double cpu_history[60];
-+double sys_history[60];
-
- double display_min = 20;
- double display_max = 35;
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 d48afc24a9..063cb57317 100644
--- a/system/wmgtemp/wmgtemp.SlackBuild
+++ b/system/wmgtemp/wmgtemp.SlackBuild
@@ -1,8 +1,9 @@
-#!/bin/sh
+#!/bin/bash
# Slackware build script for wmgtemp
#
# Copyright 2015 Gethyn ThomasQuail <email removed>
+# Copyright 2020 B. Watson <urchlay@slackware.uk>
# All rights reserved.
#
# Based on:
@@ -25,7 +26,14 @@
# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-# Now maintained by B. Watson <yalhcru@gmail.com>
+# Now maintained by B. Watson <urchlay@slackware.uk>
+
+# 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
@@ -36,10 +44,13 @@
# - default to the correct .conf for Slack's lm_sensors 3.x
# - don't install INSTALL to doc dir
+cd $(dirname $0) ; CWD=$(pwd)
+
PRGNAM=wmgtemp
-VERSION=${VERSION:-1.1}
+VERSION=${VERSION:-1.2}
BUILD=${BUILD:-2}
TAG=${TAG:-_SBo}
+PKGTYPE=${PKGTYPE:-tgz}
if [ -z "$ARCH" ]; then
case "$( uname -m )" in
@@ -49,7 +60,11 @@ if [ -z "$ARCH" ]; then
esac
fi
-CWD=$(pwd)
+if [ ! -z "${PRINT_PACKAGE_NAME}" ]; then
+ echo "$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.$PKGTYPE"
+ exit 0
+fi
+
TMP=${TMP:-/tmp/SBo}
PKG=$TMP/package-$PRGNAM
OUTPUT=${OUTPUT:-/tmp}
@@ -77,21 +92,26 @@ rm -rf $PRGNAM-$VERSION
tar xvf $CWD/$PRGNAM-$VERSION.tar.gz
cd $PRGNAM-$VERSION
chown -R root:root .
-find -L . \
- \( -perm 777 -o -perm 775 -o -perm 750 -o -perm 711 -o -perm 555 \
- -o -perm 511 \) -exec chmod 755 {} \; -o \
- \( -perm 666 -o -perm 664 -o -perm 640 -o -perm 600 -o -perm 444 \
- -o -perm 440 -o -perm 400 \) -exec chmod 644 {} \;
+find -L . -perm /111 -a \! -perm 755 -a -exec chmod 755 {} \+ -o \
+ \! -perm /111 -a \! -perm 644 -a -exec chmod 644 {} \+
-patch -p1 < $CWD/bugfix.diff
+# Various minor fixes by SlackBuild author
+patch -p1 < $CWD/fixes.diff
-sed -i 's,/etc/sensors\.conf,/etc/sensors3.conf,' src/$PRGNAM.c $PRGNAM.1
+CFLAGS="$SLKCFLAGS" \
+CXXFLAGS="$SLKCFLAGS" \
+./configure \
+ --prefix=/usr \
+ --libdir=/usr/lib${LIBDIRSUFFIX} \
+ --sysconfdir=/etc \
+ --localstatedir=/var \
+ --mandir=/usr/man \
+ --docdir=/usr/doc/$PRGNAM-$VERSION \
+ --build=$ARCH-slackware-linux
-make CCFLAGS="$SLKCFLAGS -fgnu89-inline"
-mkdir -p $PKG/usr/bin
-install -s -m0755 src/$PRGNAM $PKG/usr/bin
-mkdir -p $PKG/usr/man/man1
-gzip -9c < $PRGNAM.1 > $PKG/usr/man/man1/$PRGNAM.1.gz
+make
+make install-strip DESTDIR=$PKG
+gzip -9 $PKG/usr/man/man1/$PRGNAM.1
mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
cp -a Artistic ChangeLog CREDITS README TODO $PKG/usr/doc/$PRGNAM-$VERSION
@@ -101,4 +121,4 @@ mkdir -p $PKG/install
cat $CWD/slack-desc > $PKG/install/slack-desc
cd $PKG
-/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.${PKGTYPE:-tgz}
+/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.$PKGTYPE
diff --git a/system/wmgtemp/wmgtemp.info b/system/wmgtemp/wmgtemp.info
index 8723be139c..1c85a54209 100644
--- a/system/wmgtemp/wmgtemp.info
+++ b/system/wmgtemp/wmgtemp.info
@@ -1,10 +1,10 @@
PRGNAM="wmgtemp"
-VERSION="1.1"
-HOMEPAGE="http://fluxcode.net/projects/wmgtemp"
-DOWNLOAD="http://fluxcode.net/files/wmgtemp-1.1.tar.gz"
-MD5SUM="cce700b3a4ef74b2ec019d8e89bdf2f6"
+VERSION="1.2"
+HOMEPAGE="https://www.dockapps.net/wmgtemp"
+DOWNLOAD="https://www.dockapps.net/download/wmgtemp-1.2.tar.gz"
+MD5SUM="a595053ba7fab25e318d983df3af8ce8"
DOWNLOAD_x86_64=""
MD5SUM_x86_64=""
-REQUIRES=""
+REQUIRES="libdockapp"
MAINTAINER="B. Watson"
-EMAIL="yalhcru@gmail.com"
+EMAIL="urchlay@slackware.uk"