summaryrefslogtreecommitdiffstats
path: root/network/qtmib
diff options
context:
space:
mode:
Diffstat (limited to 'network/qtmib')
-rw-r--r--network/qtmib/README16
-rw-r--r--network/qtmib/doinst.sh6
-rw-r--r--network/qtmib/git2tarxz.sh47
-rw-r--r--network/qtmib/qtmib.SlackBuild68
-rw-r--r--network/qtmib/qtmib.info12
-rw-r--r--network/qtmib/slack-desc8
6 files changed, 127 insertions, 30 deletions
diff --git a/network/qtmib/README b/network/qtmib/README
index 99453f2198..938df0ebb0 100644
--- a/network/qtmib/README
+++ b/network/qtmib/README
@@ -1,8 +1,10 @@
-qtmib is an easy-to-use SNMP MIB Browser based on QT4 library. It is build as
-a front-end for net-snmp, and it allows the user to query any SNMP-enabled
-device. It implements SNMPv1 and SNMPv2c, and it is released under GPL v2
-license.
+qtmib (graphical SNMP MIB Browser)
-qtmib supports out of the box a large number of MIBs. We are currently
-tracking netdisco MIB archive. You can also install private MIBs by dropping
-them in ~/.config/qtmib/mibs directory.
+qtmib is an easy-to-use SNMP MIB Browser based on the Qt library. It
+is a front-end for net-snmp, and it allows the user to query any
+SNMP-enabled device. It implements SNMPv1 and SNMPv2c, and it is
+released under the GPLv2 license.
+
+qtmib supports a large number of MIBs out of the box. It currently
+tracks the netdisco MIB archive. You can also install private MIBs by
+dropping them in the ~/.config/qtmib/mibs directory.
diff --git a/network/qtmib/doinst.sh b/network/qtmib/doinst.sh
index 5fb28930db..3e5691a052 100644
--- a/network/qtmib/doinst.sh
+++ b/network/qtmib/doinst.sh
@@ -1,3 +1,9 @@
if [ -x /usr/bin/update-desktop-database ]; then
/usr/bin/update-desktop-database -q usr/share/applications >/dev/null 2>&1
fi
+
+if [ -e usr/share/icons/hicolor/icon-theme.cache ]; then
+ if [ -x /usr/bin/gtk-update-icon-cache ]; then
+ /usr/bin/gtk-update-icon-cache usr/share/icons/hicolor >/dev/null 2>&1
+ fi
+fi
diff --git a/network/qtmib/git2tarxz.sh b/network/qtmib/git2tarxz.sh
new file mode 100644
index 0000000000..ad0d4eaa07
--- /dev/null
+++ b/network/qtmib/git2tarxz.sh
@@ -0,0 +1,47 @@
+#!/bin/sh
+
+# Create source tarball from git repo, with generated version
+# number.
+
+# Note that this script doesn't need to be run as root. It does
+# need to be able to write to the current directory it's run from.
+
+# Takes one optional argument, which is the commit or tag to create
+# a tarball of. With no arg, HEAD is used.
+
+PRGNAM=qtmib
+CLONE_URL=https://github.com/ac0ra/qtmib
+
+# Upstream is a fork from this version. They don't use tags...
+HARDCODED_VER=1.1.1
+
+set -e
+
+GITDIR=$( mktemp -dt $PRGNAM.git.XXXXXX )
+rm -rf $GITDIR
+git clone $CLONE_URL $GITDIR --depth 1
+
+CWD="$( pwd )"
+cd $GITDIR
+
+if [ "$1" != "" ]; then
+ git reset --hard "$1" || exit 1
+fi
+
+GIT_SHA=$( git rev-parse --short HEAD )
+
+DATE=$( git log --date=format:%Y%m%d --format=%cd | head -1 )
+
+VERSION=1.1.1+${DATE}_${GIT_SHA}
+
+rm -rf .git
+find . -name .gitignore -print0 | xargs -0 rm -f
+
+cd "$CWD"
+rm -rf $PRGNAM-$VERSION $PRGNAM-$VERSION.tar.xz
+mv $GITDIR $PRGNAM-$VERSION
+tar cvfJ $PRGNAM-$VERSION.tar.xz $PRGNAM-$VERSION
+
+echo
+echo "Created tarball: $PRGNAM-$VERSION.tar.xz"
+echo "VERSION=$VERSION"
diff --git a/network/qtmib/qtmib.SlackBuild b/network/qtmib/qtmib.SlackBuild
index 4a46a07f17..5fe40fe72b 100644
--- a/network/qtmib/qtmib.SlackBuild
+++ b/network/qtmib/qtmib.SlackBuild
@@ -1,8 +1,9 @@
-#!/bin/sh
+#!/bin/bash
# Slackware build script for qtmib
# Copyright (c) 2017 LEVAI Daniel
+# Copyright (c) 2020 B. Watson
# All rights reserved.
#
# * Redistribution and use in source and binary forms, with or without
@@ -25,10 +26,26 @@
# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+# 20230103 bkw: BUILD=2
+# - one of upstream's icons is the wrong size...
+# - slack-desc, s/Qt4/Qt/ to match the README.
+
+# 20211210 bkw:
+# - update for 1.1.1+20190827_e62ab95 (latest git, supports qt5).
+# - new-style icons.
+
+# 20200129 bkw:
+# - take over maintenance
+# - actually use SLKCFLAGS
+# - grammar nitpicks in README, slack-desc
+
+cd $(dirname $0) ; CWD=$(pwd)
+
PRGNAM=qtmib
-VERSION=${VERSION:-1.1.1}
-BUILD=${BUILD:-1}
+VERSION=${VERSION:-1.1.1+20190827_e62ab95}
+BUILD=${BUILD:-2}
TAG=${TAG:-_SBo}
+PKGTYPE=${PKGTYPE:-tgz}
if [ -z "$ARCH" ]; then
case "$( uname -m )" in
@@ -38,7 +55,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}
@@ -63,15 +84,16 @@ rm -rf $PKG
mkdir -p $TMP $PKG $OUTPUT
cd $TMP
rm -rf $PRGNAM-$VERSION
-tar xvf $CWD/$PRGNAM-$VERSION.tar.bz2
+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 {} \;
+find -L . -perm /111 -a \! -perm 755 -a -exec chmod 755 {} \+ -o \
+ \! -perm /111 -a \! -perm 644 -a -exec chmod 644 {} \+
+# Yes, we really do have to do this.
+autoreconf -if
+
+CFLAGS="$SLKCFLAGS" CXXFLAGS="$SLKCFLAGS" \
./configure \
--prefix=/usr \
--mandir=/usr/man \
@@ -81,9 +103,29 @@ find -L . \
sed -i "s|share/man|man|g" Makefile
make
make install DESTDIR=$PKG
+strip $PKG/usr/bin/*
+
+# 20230103 bkw: this icon is 256x257 (huh?)
+convert -resize 256x256! src/art/$PRGNAM-256.png x.png
+mv x.png src/art/$PRGNAM-256.png
+
+HICOLOR=$PKG/usr/share/icons/hicolor/
+PIXMAPS=$PKG/usr/share/pixmaps
+for png in src/art/$PRGNAM-*.png; do
+ px="$( basename $png .png | cut -d- -f2 )"
+ size=${px}x${px}
+ dir=$HICOLOR/$size/apps
+ mkdir -p $dir
+ cp -a $png $dir/$PRGNAM.png
+done
+
+# don't install qtmib.svg in scalable/, it looks weird.
+
+mkdir -p $HICOLOR/48x48/apps
+convert -resize 48x48 src/art/$PRGNAM-256.png $HICOLOR/48x48/apps/$PRGNAM.png
-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
+rm -f $PIXMAPS/*
+ln -s ../icons/hicolor/48x48/apps/$PRGNAM.png $PKG/usr/share/pixmaps/$PRGNAM.png
mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
cp -a COPYING README RELNOTES $PKG/usr/doc/$PRGNAM-$VERSION
@@ -94,4 +136,4 @@ cat $CWD/slack-desc > $PKG/install/slack-desc
cat $CWD/doinst.sh > $PKG/install/doinst.sh
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/network/qtmib/qtmib.info b/network/qtmib/qtmib.info
index a831307154..e935f804d2 100644
--- a/network/qtmib/qtmib.info
+++ b/network/qtmib/qtmib.info
@@ -1,10 +1,10 @@
PRGNAM="qtmib"
-VERSION="1.1.1"
-HOMEPAGE="http://qtmib.sourceforge.net/"
-DOWNLOAD="https://sourceforge.net/projects/qtmib/files/qtmib/qtmib-1.1.1.tar.bz2"
-MD5SUM="1715ae9c88e1f0d355f9a93b3248455e"
+VERSION="1.1.1+20190827_e62ab95"
+HOMEPAGE="https://github.com/ac0ra/qtmib"
+DOWNLOAD="https://slackware.uk/~urchlay/src/qtmib-1.1.1+20190827_e62ab95.tar.xz"
+MD5SUM="8b84f7a5c069ef012d54ef41d27477f1"
DOWNLOAD_x86_64=""
MD5SUM_x86_64=""
REQUIRES=""
-MAINTAINER="LEVAI Daniel"
-EMAIL="leva@ecentrum.hu"
+MAINTAINER="B. Watson"
+EMAIL="urchlay@slackware.uk"
diff --git a/network/qtmib/slack-desc b/network/qtmib/slack-desc
index 3272299757..bc4720a14a 100644
--- a/network/qtmib/slack-desc
+++ b/network/qtmib/slack-desc
@@ -6,12 +6,12 @@
# customary to leave one space after the ':' except on otherwise blank lines.
|-----handy-ruler------------------------------------------------------|
-qtmib: qtmib (an easy-to-use SNMP MIB Browser)
+qtmib: qtmib (graphical SNMP MIB Browser)
qtmib:
-qtmib: qtmib is an easy-to-use SNMP MIB Browser based on QT4 library. It is
-qtmib: build as a front-end for net-snmp, and it allows the user to query any
+qtmib: qtmib is an easy-to-use SNMP MIB Browser based on the Qt library. It
+qtmib: is a front-end for net-snmp, and it allows the user to query any
qtmib: SNMP-enabled device. It implements SNMPv1 and SNMPv2c, and it is
-qtmib: released under GPL v2 license.
+qtmib: released under the GPLv2 license.
qtmib:
qtmib: Homepage: http://qtmib.sourceforge.net/
qtmib: