diff options
Diffstat (limited to 'network/qtmib')
-rw-r--r-- | network/qtmib/README | 14 | ||||
-rw-r--r-- | network/qtmib/doinst.sh | 6 | ||||
-rw-r--r-- | network/qtmib/git2tarxz.sh | 47 | ||||
-rw-r--r-- | network/qtmib/qtmib.SlackBuild | 32 | ||||
-rw-r--r-- | network/qtmib/qtmib.info | 8 |
5 files changed, 91 insertions, 16 deletions
diff --git a/network/qtmib/README b/network/qtmib/README index 37f97e181a..938df0ebb0 100644 --- a/network/qtmib/README +++ b/network/qtmib/README @@ -1,10 +1,10 @@ qtmib (graphical SNMP MIB Browser) -qtmib is an easy-to-use SNMP MIB Browser based on the Qt4 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 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. +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 3f36d7490b..3691475893 100644 --- a/network/qtmib/qtmib.SlackBuild +++ b/network/qtmib/qtmib.SlackBuild @@ -26,6 +26,10 @@ # OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF # ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +# 20211210 bkw: +# - update for 1.1.1+20190827_e62ab95 (latest git, supports qt5). +# - new-style icons. + # 20200129 bkw: # - take over maintenance # - actually use SLKCFLAGS @@ -34,7 +38,7 @@ cd $(dirname $0) ; CWD=$(pwd) PRGNAM=qtmib -VERSION=${VERSION:-1.1.1} +VERSION=${VERSION:-1.1.1+20190827_e62ab95} BUILD=${BUILD:-1} TAG=${TAG:-_SBo} PKGTYPE=${PKGTYPE:-tgz} @@ -47,9 +51,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 @@ -79,12 +80,15 @@ 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 /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 \ @@ -97,6 +101,24 @@ make make install DESTDIR=$PKG strip $PKG/usr/bin/* +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 + +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 cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild diff --git a/network/qtmib/qtmib.info b/network/qtmib/qtmib.info index d82bc975e6..66aaf6db64 100644 --- a/network/qtmib/qtmib.info +++ b/network/qtmib/qtmib.info @@ -1,8 +1,8 @@ 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="" |