diff options
author | Ricardo J. Barberis <ricardo.barberis@gmail.com> | 2018-03-21 10:53:45 +0000 |
---|---|---|
committer | David Spencer <idlemoor@slackbuilds.org> | 2018-03-21 10:53:45 +0000 |
commit | 434bd73733c6f95bbaae648524042d1f62d81513 (patch) | |
tree | 8be35baee2aa807ee15815cec3b639e43289d994 /system/kcollectd | |
parent | ba41970c03f334dde2c6303f7c48955ccb2fa583 (diff) |
system/kcollectd: Added (Qt4-based frontend for collectd).
Signed-off-by: David Spencer <idlemoor@slackbuilds.org>
Diffstat (limited to 'system/kcollectd')
-rw-r--r-- | system/kcollectd/README | 10 | ||||
-rw-r--r-- | system/kcollectd/doinst.sh | 13 | ||||
-rw-r--r-- | system/kcollectd/kcollectd-0.9-boost.patch | 59 | ||||
-rw-r--r-- | system/kcollectd/kcollectd.SlackBuild | 106 | ||||
-rw-r--r-- | system/kcollectd/kcollectd.info | 10 | ||||
-rw-r--r-- | system/kcollectd/slack-desc | 19 |
6 files changed, 217 insertions, 0 deletions
diff --git a/system/kcollectd/README b/system/kcollectd/README new file mode 100644 index 0000000000000..a2021cf458969 --- /dev/null +++ b/system/kcollectd/README @@ -0,0 +1,10 @@ +Kcollectd (Qt4-based frontend for collectd) + +Kcollectd is a small applications that allows to view rrd datacollections +that have been created by collectd. + +It is quite limited as it only displays one datasource at a time, but +allows to zoom and scroll around. It also has a status-monitor mode, +where it automatic updates every 10 seconds. + +https://www.forwiss.uni-passau.de/~berberic/Linux/kcollectd.html diff --git a/system/kcollectd/doinst.sh b/system/kcollectd/doinst.sh new file mode 100644 index 0000000000000..e217a75f451c3 --- /dev/null +++ b/system/kcollectd/doinst.sh @@ -0,0 +1,13 @@ +if [ -x /usr/bin/update-desktop-database ]; then + /usr/bin/update-desktop-database -q usr/share/applications >/dev/null 2>&1 +fi + +if [ -x /usr/bin/update-mime-database ]; then + /usr/bin/update-mime-database usr/share/mime >/dev/null 2>&1 +fi + +if [ -e usr/share/icons/oxygen/icon-theme.cache ]; then + if [ -x /usr/bin/gtk-update-icon-cache ]; then + /usr/bin/gtk-update-icon-cache usr/share/icons/oxygen >/dev/null 2>&1 + fi +fi diff --git a/system/kcollectd/kcollectd-0.9-boost.patch b/system/kcollectd/kcollectd-0.9-boost.patch new file mode 100644 index 0000000000000..1576c2b402108 --- /dev/null +++ b/system/kcollectd/kcollectd-0.9-boost.patch @@ -0,0 +1,59 @@ +--- kcollectd-0.9.orig/kcollectd/kcollectd.cc ++++ kcollectd-0.9/kcollectd/kcollectd.cc +@@ -73,7 +73,7 @@ + gui->show(); + } + } +- catch(basic_filesystem_error<path> &e) { ++ catch(const std::exception &e) { + KMessageBox::error(0, i18n("Failed to read collectd-structure at \'%1\'\n" + "Terminating.", QString(RRD_BASEDIR))); + exit(1); +--- kcollectd-0.9.orig/kcollectd/gui.cc ++++ kcollectd-0.9/kcollectd/gui.cc +@@ -127,21 +127,21 @@ + const directory_iterator end_itr; + for (directory_iterator host(rrdpath); host != end_itr; ++host ) { + if (is_directory(*host)) { +- QTreeWidgetItem *hostitem = mkItem(listview, host->leaf()); ++ QTreeWidgetItem *hostitem = mkItem(listview, host->path().filename().string()); + hostitem->setFlags(hostitem->flags() & ~Qt::ItemIsSelectable); + for (directory_iterator sensor(*host); sensor != end_itr; ++sensor ) { + if (is_directory(*sensor)) { +- QTreeWidgetItem *sensoritem = mkItem(hostitem, sensor->leaf()); ++ QTreeWidgetItem *sensoritem = mkItem(hostitem, sensor->path().filename().string()); + sensoritem->setFlags(sensoritem->flags() & ~Qt::ItemIsSelectable); + for (directory_iterator rrd(*sensor); rrd != end_itr; ++rrd ) { + if (is_regular(*rrd) && extension(*rrd) == ".rrd") { + QTreeWidgetItem *rrditem = mkItem(sensoritem, basename(*rrd)); + rrditem->setFlags(rrditem->flags() & ~Qt::ItemIsSelectable); + std::ostringstream info; +- info << host->leaf() << delimiter +- << sensor->leaf() << delimiter ++ info << host->path().filename().string() << delimiter ++ << sensor->path().filename().string() << delimiter + << basename(*rrd); +- get_datasources(rrd->string(), info.str(), rrditem); ++ get_datasources(rrd->path().string(), info.str(), rrditem); + } + } + } +--- kcollectd-0.9.orig/doc/en/index.docbook ++++ kcollectd-0.9/doc/en/index.docbook +@@ -1,5 +1,5 @@ + <?xml version="1.0" ?> +-<!DOCTYPE book PUBLIC "-//KDE//DTD DocBook XML V4.1.2-Based Variant V1.1//EN" "dtd/kdex.dtd" [ ++<!DOCTYPE book PUBLIC "-//KDE//DTD DocBook XML V4.2-Based Variant V1.1//EN" "dtd/kdex.dtd" [ + <!ENTITY kcollectd "<application>kcollectd 0.8</application>"> + <!ENTITY kappname "&kcollectd;"> + <!ENTITY package "kcollectd"> +--- kcollectd-0.9.orig/po/de.po ++++ kcollectd-0.9/po/de.po +@@ -10,6 +10,7 @@ + "PO-Revision-Date: 2009-06-16 20:41+0200\n" + "Last-Translator: M G Berberich <berberic@fmi.uni-passau.de>\n" + "Language-Team: German <kde-i18n-de@kde.org>\n" ++"Language: de\n" + "MIME-Version: 1.0\n" + "Content-Type: text/plain; charset=UTF-8\n" + "Content-Transfer-Encoding: 8bit\n" diff --git a/system/kcollectd/kcollectd.SlackBuild b/system/kcollectd/kcollectd.SlackBuild new file mode 100644 index 0000000000000..92fd9c527281e --- /dev/null +++ b/system/kcollectd/kcollectd.SlackBuild @@ -0,0 +1,106 @@ +#!/bin/sh + +# Slackware build script for kcollectd + +# Copyright 2015-2018 Ricardo J. Barberis (ricardo.barberis@gmail.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=kcollectd +VERSION=${VERSION:-0.9} +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.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 {} \; + +patch -p1 < $CWD/kcollectd-0.9-boost.patch + +mkdir -p build +cd build + cmake \ + -DCMAKE_C_FLAGS:STRING="$SLKCFLAGS" \ + -DCMAKE_CXX_FLAGS:STRING="$SLKCFLAGS" \ + -DCMAKE_INSTALL_PREFIX=/usr \ + -DLIB_SUFFIX=${LIBDIRSUFFIX} \ + -DMAN_INSTALL_DIR=/usr/man \ + -DCMAKE_BUILD_TYPE=Release .. + make + make install DESTDIR=$PKG +cd .. + +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/man +cp doc/kcollectd.1 $PKG/usr/man +find $PKG/usr/man -type f -exec gzip -9 {} \; +for i in $( find $PKG/usr/man -type l ) ; do ln -s $( readlink $i ).gz $i.gz ; rm $i ; done + +mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION +cp -a \ + AUTHORS COPYING ChangeLog INSTALL \ + $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 +cat $CWD/doinst.sh > $PKG/install/doinst.sh + +cd $PKG +/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.${PKGTYPE:-tgz} diff --git a/system/kcollectd/kcollectd.info b/system/kcollectd/kcollectd.info new file mode 100644 index 0000000000000..22a976fab6976 --- /dev/null +++ b/system/kcollectd/kcollectd.info @@ -0,0 +1,10 @@ +PRGNAM="kcollectd" +VERSION="0.9" +HOMEPAGE="https://www.forwiss.uni-passau.de/~berberic/Linux/kcollectd.html" +DOWNLOAD="https://www.forwiss.uni-passau.de/~berberic/Linux/kcollectd/kcollectd-0.9.tar.gz" +MD5SUM="7fef4a660207b4c65520ee77334088fb" +DOWNLOAD_x86_64="" +MD5SUM_x86_64="" +REQUIRES="rrdtool" +MAINTAINER="Ricardo J. Barberis" +EMAIL="ricardo.barberis@gmail.com" diff --git a/system/kcollectd/slack-desc b/system/kcollectd/slack-desc new file mode 100644 index 0000000000000..cd807b278dabe --- /dev/null +++ b/system/kcollectd/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------------------------------------------------------| +kcollectd: kcollectd (Qt4-based frontend for collectd) +kcollectd: +kcollectd: Kcollectd is a small application that allows to view rrd +kcollectd: data collections that have been created by collectd. +kcollectd: +kcollectd: It is quite limited as it only displays one datasource at a time, but +kcollectd: allows to zoom and scroll around. It also has a status-monitor mode, +kcollectd: where it automatic updates every 10 seconds. +kcollectd: +kcollectd: Homepage: +kcollectd: https://www.forwiss.uni-passau.de/~berberic/Linux/kcollectd.html |