diff options
Diffstat (limited to 'network/cmdiag')
-rw-r--r-- | network/cmdiag/README | 4 | ||||
-rw-r--r-- | network/cmdiag/cmdiag.SlackBuild | 68 | ||||
-rw-r--r-- | network/cmdiag/cmdiag.cpp.patch | 10 | ||||
-rw-r--r-- | network/cmdiag/cmdiag.info | 10 | ||||
-rw-r--r-- | network/cmdiag/slack-desc | 19 |
5 files changed, 111 insertions, 0 deletions
diff --git a/network/cmdiag/README b/network/cmdiag/README new file mode 100644 index 0000000000..c195398c4c --- /dev/null +++ b/network/cmdiag/README @@ -0,0 +1,4 @@ +cmdiag is a Docsis cable modem diagnostic tool. It can get information from +Docsis 1.0, 1.1 and maybe 2.0 cable modems. It gathers information from the +cable modem via SNMP and displays various cable parameters in real time. +This small tool is writen in C++, it runs on Linux and FreeBSD. diff --git a/network/cmdiag/cmdiag.SlackBuild b/network/cmdiag/cmdiag.SlackBuild new file mode 100644 index 0000000000..f13ab2f5c5 --- /dev/null +++ b/network/cmdiag/cmdiag.SlackBuild @@ -0,0 +1,68 @@ +#!/bin/sh + +# Slackware build script for cmdiag +# Written by Michal Bialozor <bialyy@o2.pl> + +PRGNAM=cmdiag +VERSION=0.2 +BUILD=${BUILD:-1} +TAG=${TAG:-_SBo} + +if [ -z "$ARCH" ]; then + case "$( uname -m )" in + i?86) ARCH=i486 ;; + arm*) ARCH=arm ;; + *) ARCH=$( uname -m ) ;; + esac +fi + +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 -ue + +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 . +chmod -R u+w,go+r-w,a-s . + +cat $CWD/cmdiag.cpp.patch | patch --verbose -p0 || exit 1 + +# Use our CFLAGS +sed -i "s/^CFLAGS = /CFLAGS += /g" Makefile + +CFLAGS="$SLKCFLAGS" \ + make + +mkdir -p $PKG/usr/sbin +cp -a $PRGNAM $PKG/usr/sbin + +mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION +cp -a README.txt $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/network/cmdiag/cmdiag.cpp.patch b/network/cmdiag/cmdiag.cpp.patch new file mode 100644 index 0000000000..b0a0332da5 --- /dev/null +++ b/network/cmdiag/cmdiag.cpp.patch @@ -0,0 +1,10 @@ +--- cmdiag.cpp.orig 2008-05-01 22:42:18.000000000 +0200 ++++ cmdiag.cpp 2011-08-08 12:05:24.113372114 +0200 +@@ -13,6 +13,7 @@ + #include <stdio.h> + #include <stdlib.h> + #include <unistd.h> ++#include <string.h> + #include "bar.h" + #include "pbar.h" + #include "globals.h" diff --git a/network/cmdiag/cmdiag.info b/network/cmdiag/cmdiag.info new file mode 100644 index 0000000000..95489c930e --- /dev/null +++ b/network/cmdiag/cmdiag.info @@ -0,0 +1,10 @@ +PRGNAM="cmdiag" +VERSION="0.2" +HOMEPAGE="http://cmdiag.sourceforge.net" +DOWNLOAD="http://downloads.sourceforge.net/cmdiag/cmdiag-0.2.tar.gz" +MD5SUM="e1bde5ef9d1c0f976f4cfe0af990d4e8" +DOWNLOAD_x86_64="" +MD5SUM_x86_64="" +MAINTAINER="Michal Bialozor" +EMAIL="bialyy@o2.pl" +APPROVED="Niels Horn" diff --git a/network/cmdiag/slack-desc b/network/cmdiag/slack-desc new file mode 100644 index 0000000000..8eedfd3d0e --- /dev/null +++ b/network/cmdiag/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 ':'. + + |-----handy-ruler------------------------------------------------------| +cmdiag: cmdiag (cable modem diagnostics tool) +cmdiag: +cmdiag: cmdiag can get information from Docsis 1.0, 1.1 and maybe 2.0 cable +cmdiag: modems. It gathers information from the cable modem via SNMP and +cmdiag: displays various cable parameters in real time. +cmdiag: This small tool is writen in C++, it runs on Linux and FreeBSD. +cmdiag: +cmdiag: Homepage: http://cmdiag.sourceforge.net/ +cmdiag: +cmdiag: +cmdiag: |