diff options
author | pyllyukko <pyllyukko@maimed.org> | 2020-01-31 23:55:33 +0700 |
---|---|---|
committer | Willy Sudiarto Raharjo <willysr@slackbuilds.org> | 2020-01-31 23:55:33 +0700 |
commit | 901311a111b6413923de7812ee1c31aaf2453c64 (patch) | |
tree | 33c136c2fc65c6998890adf294218c476737ff50 /ham/spectools | |
parent | 332abe2b671d601046537131c191f74dec940e10 (diff) |
ham/spectools: Added (spectrum analyzer).
Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
Diffstat (limited to 'ham/spectools')
-rw-r--r-- | ham/spectools/README | 6 | ||||
-rw-r--r-- | ham/spectools/gcc5_fix.diff | 36 | ||||
-rw-r--r-- | ham/spectools/slack-desc | 19 | ||||
-rw-r--r-- | ham/spectools/spectools.SlackBuild | 103 | ||||
-rw-r--r-- | ham/spectools/spectools.info | 10 |
5 files changed, 174 insertions, 0 deletions
diff --git a/ham/spectools/README b/ham/spectools/README new file mode 100644 index 0000000000000..2a280f07a9309 --- /dev/null +++ b/ham/spectools/README @@ -0,0 +1,6 @@ +Spectools is a set of utilities for using various spectrum analyzer hardware. +It supports the suite of Wi-Spy devices (original, 24x, 24x2, DBX, DBX2, 900, +24i) by Metageek LLC and the Ubertooth. Spectools includes userspace drivers +for the hardware itself, a graphing UI built GTK and Cairo, network protocols +for remote device capture, and simple utilities for developing additional +tools. diff --git a/ham/spectools/gcc5_fix.diff b/ham/spectools/gcc5_fix.diff new file mode 100644 index 0000000000000..27d12c8597beb --- /dev/null +++ b/ham/spectools/gcc5_fix.diff @@ -0,0 +1,36 @@ +From 65d2491083abbcd4e2ef53d488b1be38a3f5b34d Mon Sep 17 00:00:00 2001 +From: Mike Kershaw / Dragorn <dragorn@kismetwireless.net> +Date: Tue, 15 Mar 2016 22:04:37 -0400 +Subject: Hacky fix for GCC5 + +--- + spectool_gtk_widget.h | 6 +++--- + 1 file changed, 3 insertions(+), 3 deletions(-) + +diff --git a/spectool_gtk_widget.h b/spectool_gtk_widget.h +index 1a77a2f..0caa7f7 100644 +--- a/spectool_gtk_widget.h ++++ b/spectool_gtk_widget.h +@@ -196,16 +196,16 @@ void spectool_widget_link_channel(GtkWidget *widget, SpectoolChannelOpts *opts); + gint spectool_widget_timeout(gpointer *data); + + /* Calculate the channel clicked in */ +-inline int spectool_widget_find_chan_pt(SpectoolWidget *wwidget, int x, int y); ++extern inline int spectool_widget_find_chan_pt(SpectoolWidget *wwidget, int x, int y); + + void spectool_widget_context_channels(gpointer *aux); + void spectool_widget_context_dbm(gpointer *aux); + void spectool_widget_context_dbmlines(gpointer *aux); + + /* Color space conversion tools */ +-inline void rgb_to_hsv(double r, double g, double b, ++extern inline void rgb_to_hsv(double r, double g, double b, + double *h, double *s, double *v); +-inline void hsv_to_rgb(double *r, double *g, double *b, ++extern inline void hsv_to_rgb(double *r, double *g, double *b, + double h, double s, double v); + + G_END_DECLS +-- +2.14.5 + diff --git a/ham/spectools/slack-desc b/ham/spectools/slack-desc new file mode 100644 index 0000000000000..ae0318d915d85 --- /dev/null +++ b/ham/spectools/slack-desc @@ -0,0 +1,19 @@ +# 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------------------------------------------------------| +spectools: spectools (spectrum analyzer) +spectools: +spectools: Spectools is a set of utilities for using various spectrum analyzer +spectools: hardware. It supports the suite of Wi-Spy devices by Metageek LLC +spectools: and the Ubertooth. Spectools includes userspace drivers for the +spectools: hardware itself, a graphing UI built GTK and Cairo, network protocols +spectools: for remote device capture, and simple utilities for developing +spectools: additional tools. +spectools: +spectools: Homepage: https://www.kismetwireless.net/static/spectools/ +spectools: diff --git a/ham/spectools/spectools.SlackBuild b/ham/spectools/spectools.SlackBuild new file mode 100644 index 0000000000000..e0f0a778fcdf6 --- /dev/null +++ b/ham/spectools/spectools.SlackBuild @@ -0,0 +1,103 @@ +#!/bin/sh + +# Slackware build script for spectools + +# Copyright 2020 pyllyukko +# 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=spectools +VERSION=${VERSION:-2016-01-R1} +BUILD=${BUILD:-1} +TAG=${TAG:-_SBo} + +if [ -z "$ARCH" ]; then + case "$( uname -m )" in + i?86) ARCH=i586 ;; + arm*) ARCH=arm ;; + *) ARCH=$( uname -m ) ;; + esac +fi + +CWD=$(pwd) +TMP=${TMP:-/tmp/SBo} +PKG=$TMP/package-$PRGNAM +OUTPUT=${OUTPUT:-/tmp} + +if [ "$ARCH" = "i586" ]; then + SLKCFLAGS="-O2 -march=i586 -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.tar.xz +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 {} \; + +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 + +patch -p1 0< "${CWD}/gcc5_fix.diff" +make +make install DESTDIR=$PKG + +mkdir -pv $PKG/etc/udev/rules.d/ +install -m 644 99-wispy.rules $PKG/etc/udev/rules.d/ + +find $PKG -print0 | xargs -0 file | grep -e "executable" -e "shared object" | grep ELF \ + | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null || true + +mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION +cp -a \ + GPL README \ + $PKG/usr/doc/$PRGNAM-$VERSION +cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild + +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} diff --git a/ham/spectools/spectools.info b/ham/spectools/spectools.info new file mode 100644 index 0000000000000..356dc1190c03f --- /dev/null +++ b/ham/spectools/spectools.info @@ -0,0 +1,10 @@ +PRGNAM="spectools" +VERSION="2016-01-R1" +HOMEPAGE="https://www.kismetwireless.net/static/spectools/" +DOWNLOAD="https://www.kismetwireless.net/code/spectools-2016-01-R1.tar.xz" +MD5SUM="d1e3d8ea692f3fd4e632c2fe6b0d5a9f" +DOWNLOAD_x86_64="" +MD5SUM_x86_64="" +REQUIRES="" +MAINTAINER="pyllyukko" +EMAIL="pyllyukko@maimed.org" |