diff options
Diffstat (limited to 'slackware64-current/source/n/net-snmp')
6 files changed, 258 insertions, 0 deletions
diff --git a/slackware64-current/source/n/net-snmp/doinst.sh.gz b/slackware64-current/source/n/net-snmp/doinst.sh.gz new file mode 100644 index 000000000..19738535f --- /dev/null +++ b/slackware64-current/source/n/net-snmp/doinst.sh.gz @@ -0,0 +1 @@ +75df8dd07000ed912c77edbab5308b7d6596715c diff --git a/slackware64-current/source/n/net-snmp/net-snmp-5.5.tar.xz b/slackware64-current/source/n/net-snmp/net-snmp-5.5.tar.xz new file mode 100644 index 000000000..47c1a9a6d --- /dev/null +++ b/slackware64-current/source/n/net-snmp/net-snmp-5.5.tar.xz @@ -0,0 +1 @@ +f8d7a129e2f1584aa15776920eada1dca37bc258 diff --git a/slackware64-current/source/n/net-snmp/net-snmp.SlackBuild b/slackware64-current/source/n/net-snmp/net-snmp.SlackBuild new file mode 100755 index 000000000..c9ca3e71e --- /dev/null +++ b/slackware64-current/source/n/net-snmp/net-snmp.SlackBuild @@ -0,0 +1,182 @@ +#!/bin/sh + +# Copyright 2006, 2007, 2008, 2009 Patrick J. Volkerding, Sebeka, MN, USA +# 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. + + +PKGNAM=net-snmp +VERSION=${VERSION:-5.5} +BUILD=${BUILD:-2} + +# Automatically determine the architecture we're building on: +if [ -z "$ARCH" ]; then + case "$( uname -m )" in + i?86) export ARCH=i486 ;; + arm*) export ARCH=arm ;; + # Unless $ARCH is already set, use uname -m for all other archs: + *) export ARCH=$( uname -m ) ;; + esac +fi + +CWD=$(pwd) +TMP=${TMP:-/tmp} +PKG=$TMP/package-${PKGNAM} +rm -rf $PKG +mkdir -p $TMP $PKG + +if [ "$ARCH" = "i486" ]; then + SLKCFLAGS="-O2 -march=i486 -mtune=i686" + LIBDIRSUFFIX="" +elif [ "$ARCH" = "s390" ]; then + SLKCFLAGS="-O2" + LIBDIRSUFFIX="" +elif [ "$ARCH" = "x86_64" ]; then + SLKCFLAGS="-O2 -fPIC" + LIBDIRSUFFIX="64" +else + SLKCFLAGS="-O2" + LIBDIRSUFFIX="" +fi + +cd $TMP +rm -rf ${PKGNAM}-${VERSION} +tar xvf $CWD/${PKGNAM}-$VERSION.tar.?z* || exit 1 +cd ${PKGNAM}-$VERSION + +# Make sure ownerships and permissions are sane: +chown -R root:root . +find . \ + \( -perm 777 -o -perm 775 -o -perm 711 -o -perm 555 -o -perm 511 \) \ + -exec chmod 755 {} \; -o \ + \( -perm 666 -o -perm 664 -o -perm 600 -o -perm 444 -o -perm 440 -o -perm 400 \) \ + -exec chmod 644 {} \; + +# Configure: +CFLAGS="$SLKCFLAGS" \ +./configure \ + --prefix=/usr \ + --libdir=/usr/lib${LIBDIRSUFFIX} \ + --sysconfdir=/etc/snmp \ + --mandir=/usr/man \ + --enable-ipv6 \ + --disable-debugging \ + --enable-static=no \ + --with-libwrap \ + --with-perl-modules \ + --with-default-snmp-version=3 \ + --with-sys-contact="root@example.org" \ + --with-sys-location="unknown" \ + --with-logfile="/var/log/snmpd.log" \ + --with-persistent-directory="/var/lib/net-snmp" \ + --without-rpm \ + --program-suffix= \ + --program-prefix= \ + --build=$ARCH-slackware-linux + +# Build and install: +# This seems to not play well with "-j N"... +make INSTALLDIRS=vendor || exit 1 +make install INSTALLDIRS=vendor DESTDIR=$PKG || exit 1 + +# Evidently --mandir=/usr/man doesn't catch everything... +if [ -d $PKG/usr/share/man/man3 ]; then + mkdir -p $PKG/usr/man/man3 + mv $PKG/usr/share/man/man3/* $PKG/usr/man/man3 + rmdir $PKG/usr/share/man/man3 $PKG/usr/share/man +fi +mkdir -p $PKG/usr +mv $PKG/usr/share/man $PKG/usr + +mkdir -p $PKG/var/lib/net-snmp +mkdir -p $PKG/etc/snmp +zcat $CWD/snmpd.conf.gz > $PKG/etc/snmp/snmpd.conf.new +mkdir -p $PKG/etc/rc.d +cat $CWD/rc.snmpd > $PKG/etc/rc.d/rc.snmpd.new + +# Strip binaries: +find $PKG | xargs file | grep -e "executable" -e "shared object" | grep ELF \ + | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null + +# Compress and link manpages, if any: +if [ -d $PKG/usr/man ]; then + ( cd $PKG/usr/man + for manpagedir in $(find . -type d -name "man*") ; do + ( cd $manpagedir + for eachpage in $( find . -type l -maxdepth 1) ; do + ln -s $( readlink $eachpage ).gz $eachpage.gz + rm $eachpage + done + gzip -9 *.* + ) + done + ) +fi + +# Compress info files, if any: +if [ -d $PKG/usr/info ]; then + ( cd $PKG/usr/info + rm -f dir + gzip -9 * + ) +fi + +# Remove perllocal files: +( cd $PKG ; find . -name perllocal.pod -exec rm "{}" \; ) + +# This removes our DESTDIR from the packlist filenames, to keep perl's +# internal inventories consistent and correct. +find $PKG -name .packlist | while read plist ; do + sed -e "s%/share/man%/man%g" \ + -e "s%$PKG%%g" \ + -e "s%\.1$%\.1\.gz%g" \ + -e "s%\.2$%\.2\.gz%g" \ + -e "s%\.3$%\.3\.gz%g" \ + -e "s%\.3pm$%\.3pm\.gz%g" \ + -e "s%\.4$%\.4\.gz%g" \ + -e "s%\.5$%\.5\.gz%g" \ + -e "s%\.6$%\.6\.gz%g" \ + -e "s%\.7$%\.7\.gz%g" \ + -e "s%\.8$%\.8\.gz%g" \ + ${plist} > ${plist}.new + mv -f ${plist}.new ${plist} +done + +# Add a documentation directory: +mkdir -p $PKG/usr/doc/${PKGNAM}-$VERSION +cp -a \ + AGENT.txt CHANGES COPYING* CodingStyle EXAMPLE* FAQ \ + INSTALL NEWS PORTING README* TODO \ + $PKG/usr/doc/${PKGNAM}-$VERSION + +# If there's a ChangeLog, installing at least part of the recent history +# is useful, but don't let it get totally out of control: +if [ -r ChangeLog ]; then + DOCSDIR=$(echo $PKG/usr/doc/*-$VERSION) + cat ChangeLog | head -n 1000 > $DOCSDIR/ChangeLog + touch -r ChangeLog $DOCSDIR/ChangeLog +fi + +mkdir -p $PKG/install +zcat $CWD/doinst.sh.gz > $PKG/install/doinst.sh +cat $CWD/slack-desc > $PKG/install/slack-desc + +cd $PKG +/sbin/makepkg -l y -c n $TMP/${PKGNAM}-$VERSION-$ARCH-$BUILD.txz + diff --git a/slackware64-current/source/n/net-snmp/rc.snmpd b/slackware64-current/source/n/net-snmp/rc.snmpd new file mode 100644 index 000000000..cd52366c6 --- /dev/null +++ b/slackware64-current/source/n/net-snmp/rc.snmpd @@ -0,0 +1,54 @@ +#!/bin/sh +# +# rc.snmpd This shell script takes care of starting and stopping +# the net-snmp SNMP daemon + +OPTIONS="-A -p /var/run/snmpd -a" + +start() { + if [ -x /usr/sbin/snmpd -a -f /etc/snmp/snmpd.conf ]; then + echo -n "Starting snmpd: " + /usr/sbin/snmpd $OPTIONS -c /etc/snmp/snmpd.conf + echo " /usr/sbin/snmpd $OPTIONS -c /etc/snmp/snmpd.conf" + fi +} + +stop() { + # Stop daemons. + COUNT=0 + echo -n "Shutting down snmpd: " + while `killall snmpd 2>/dev/null`; do + echo -n "." + sleep 1 + COUNT=$((COUNT+1)) + if [ $COUNT -ge 30 ]; then + killall -9 snmpd + sleep 1 + break + fi + done + echo " DONE" +} + +# See how we were called. +case "$1" in + start) + start + ;; + stop) + stop + ;; + restart|reload) + stop + start + ;; + condrestart) + if [ -f /var/run/snmpd ]; then + stop + start + fi + ;; + *) + echo $"Usage: $0 {start|stop|restart|condrestart}" + ;; +esac diff --git a/slackware64-current/source/n/net-snmp/slack-desc b/slackware64-current/source/n/net-snmp/slack-desc new file mode 100644 index 000000000..7659f7fc8 --- /dev/null +++ b/slackware64-current/source/n/net-snmp/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------------------------------------------------------| +net-snmp: net-snmp (Simple Network Management Protocol tools) +net-snmp: +net-snmp: Various tools relating to the Simple Network Management Protocol: +net-snmp: +net-snmp: An extensible agent +net-snmp: An SNMP library +net-snmp: Tools to request or set information from SNMP agents +net-snmp: Tools to generate and handle SNMP traps +net-snmp: A version of the unix 'netstat' command using SNMP +net-snmp: A graphical Perl/Tk/SNMP based mib browser +net-snmp: diff --git a/slackware64-current/source/n/net-snmp/snmpd.conf.gz b/slackware64-current/source/n/net-snmp/snmpd.conf.gz new file mode 100644 index 000000000..35d1d1c9f --- /dev/null +++ b/slackware64-current/source/n/net-snmp/snmpd.conf.gz @@ -0,0 +1 @@ +eb658ea61782bad6dd8421e76e78d35472f23b65 |