misc/temper: Removed (no SBo maintainer)

Nothing else in the repo needs this, so there's not any
good reason for us to continue carrying it.

Signed-off-by: Robby Workman <rworkman@slackbuilds.org>
This commit is contained in:
Robby Workman 2013-11-14 23:17:50 -06:00
parent d305c383c5
commit 8c94092d6a
5 changed files with 0 additions and 204 deletions

View File

@ -1,10 +0,0 @@
TEMPer Temperature Sensor Linux Driver
TEMPer USB Thermometer interface driver and utility.
The temper binary outputs temperatures as measured by the USB thermometer.
The code has been patched to work with the newest versions of the USB stick
with code corrections from the comments section of the homepage. Also
implemented changes for greater ease of parsing with standard tools (awk
etc.).

View File

@ -1,19 +0,0 @@
# HOW TO EDIT THIS FILE:
# The "handy ruler" below makes it easier to edit a package description.
# Line up the first '|' above the ':' following the base package name, and
# the '|' on the right side marks the last column you can put a character in.
# You must make exactly 11 lines for the formatting to be correct. It's also
# customary to leave one space after the ':' except on otherwise blank lines.
|-----handy-ruler------------------------------------------------------|
temper: TEMPer Temperature Sensor Linux Driver
temper:
temper: Driver and utility to output temperature readings from the TEMPer
temper: USB thermometer. This is for the HID version of TEMPer (not the
temper: serial version).
temper:
temper:
temper:
temper:
temper:
temper:

View File

@ -1,70 +0,0 @@
--- temper-1.0/temper.c 2009-10-17 08:26:46.000000000 +0100
+++ temper-1.0.new/temper.c 2011-02-06 16:49:24.511084503 +0000
@@ -49,7 +49,7 @@
t = calloc(1, sizeof(*t));
t->device = dev;
- t->debug = debug;
+ t->debug = 0;
t->timeout = timeout;
t->handle = usb_open(t->device);
if(!t->handle) {
@@ -190,7 +190,7 @@
int
TemperGetTemperatureInC(Temper *t, float *tempC)
{
- char buf[256];
+ unsigned char buf[256];
int ret, temperature, i;
TemperSendCommand(t, 10, 11, 12, 13, 0, 0, 2, 0);
@@ -204,9 +204,7 @@
return -1;
}
- temperature = (buf[1] & 0xFF) + (buf[0] << 8);
- temperature += 1152; // calibration value
- *tempC = temperature * (125.0 / 32000.0);
+ *tempC=buf[0]+((float)buf[1])/256;
return 0;
}
@@ -253,29 +251,15 @@
TemperSendCommand(t, 0, 0, 0, 0, 0, 0, 0, 0);
*/
- bzero(buf, 256);
- ret = TemperGetOtherStuff(t, buf, 256);
- printf("Other Stuff (%d bytes):\n", ret);
- for(i = 0; i < ret; i++) {
- printf(" %02x", buf[i] & 0xFF);
- if(i % 16 == 15) {
- printf("\n");
- }
- }
- printf("\n");
-
- for(;;) {
- float tempc;
-
- if(TemperGetTemperatureInC(t, &tempc) < 0) {
- perror("TemperGetTemperatureInC");
- exit(1);
- }
- printf("temperature %.2fF %.2fC\n", (9.0 / 5.0 * tempc + 32.0),
- tempc);
- sleep(10);
- }
- return 0;
+ float tempc;
+
+ if(TemperGetTemperatureInC(t, &tempc) < 0) {
+ perror("TemperGetTemperatureInC");
+ exit(1);
+ }
+ printf("temperature %.2fF %.2fC\n", (9.0 / 5.0 * tempc + 32.0),
+ tempc);
+ fflush(stdout); /* flush the stdout buffer */
}
#endif

View File

@ -1,95 +0,0 @@
#!/bin/sh
# Slackware build script for temper.
#
# Copyright 2011 Pierre Cazenave <pwcazenave {at} gmail [dot] com>
# All rights reserved.
#
# Redistribution and use of this script, with or without modification, is
# permitted provided that the following conditions are met:
#
# 1. Redistributions of this script must retain the above copyright
# notice, this list of conditions and the following disclaimer.
#
# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ''AS IS'' AND ANY EXPRESS OR IMPLIED
# WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
# MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
# EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
# OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
PRGNAM=temper
VERSION=${VERSION:-1.0}
if [ -z "$ARCH" ]; then
case "$( uname -m )" in
i?86) ARCH=i486 ;;
arm*) ARCH=arm ;;
*) ARCH=$( uname -m ) ;;
esac
fi
BUILD=${BUILD:-1}
TAG=${TAG:-_SBo}
CWD=$(pwd)
TMP=${TMP:-/tmp/SBo}
PKG=$TMP/package-$PRGNAM
OUTPUT=${OUTPUT:-/tmp}
if [ "$ARCH" = "i486" ]; then
SLKCFLAGS="-O2 -march=i486 -mtune=i686"
LIBDIRSUFFIX=""
elif [ "$ARCH" = "i686" ]; then
SLKCFLAGS="-O2 -march=i686 -mtune=i686"
LIBDIRSUFFIX=""
elif [ "$ARCH" = "x86_64" ]; then
SLKCFLAGS="-O2 -fPIC"
LIBDIRSUFFIX="64"
else
SLKCFLAGS="-O2"
LIBDIRSUFFIX=""
fi
set -e
rm -rf $PKG
mkdir -p $TMP $PKG $OUTPUT
cd $TMP
rm -rf $PRGNAM-$VERSION
tar xvf $CWD/$PRGNAM-$VERSION.tgz
cd $PRGNAM-$VERSION
chown -R root:root .
chmod -R u+w,go+r-w,a-s .
# Patch code for newer versions of the USB thermometer with suggestions from
# homepage's comments. Patch also turns off debugging mode.
patch -p1 < $CWD/$PRGNAM-$VERSION.diff
export CFLAGS="$SLKCFLAGS"
make clean
make
mkdir -p $PKG/usr/bin
install -m 0755 temper $PKG/usr/bin
find $PKG | xargs file | grep -e "executable" -e "shared object" | grep ELF \
| cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null || true
# Install the udev rule file.
mkdir -p $PKG/lib/udev/rules.d
install -m 644 99-tempsensor.rules $PKG/lib/udev/rules.d
mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild
cat $CWD/README > $PKG/usr/doc/$PRGNAM-$VERSION/README$TAG
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}

View File

@ -1,10 +0,0 @@
PRGNAM="temper"
VERSION="1.0"
HOMEPAGE="http://relavak.wordpress.com/2009/10/17/temper-temperature-sensor-linux-driver/"
DOWNLOAD="http://www.relavak.com/downloads/temper-1.0.tgz"
MD5SUM="aab4888f351e110e252335ab5dc143f4"
DOWNLOAD_x86_64=""
MD5SUM_x86_64=""
REQUIRES=""
MAINTAINER="Pierre Cazenave"
EMAIL="pwcazenave <at> gmail {dot} com"