Public domain
#!/bin/bash
set -e
TMP=/tmp
# Current Working Directory
CWD=$(dirname $(readlink -f $0))
# Automatically determine the architecture we're building on:
case "$( uname -m )" in
i?86) ARCH="" ;;
x86_64) ARCH=64 ;;
*) echo 'Unknown architecture' && exit 1 ;;
esac
# Download source files
mkdir -p $TMP/net-snmp-tmp
cd $TMP/net-snmp-tmp
wget -c http://slackware.at/data/slackware${ARCH}-13.1/source/n/net-snmp/doinst.sh.gz
wget -c http://slackware.at/data/slackware${ARCH}-13.1/source/n/net-snmp/net-snmp.SlackBuild
wget -c http://slackware.at/data/slackware${ARCH}-13.1/source/n/net-snmp/rc.snmpd
wget -c http://slackware.at/data/slackware${ARCH}-13.1/source/n/net-snmp/slack-desc
wget -c http://slackware.at/data/slackware${ARCH}-13.1/source/n/net-snmp/snmpd.conf.gz
wget -c http://pmoghadam.com/homepage/Pages/Deposit/Source-packages/net-snmp-5.6.1.1.tar.gz
# Change version
sed -i -e 's,-5.5,-5.6.1.1,' net-snmp.SlackBuild
chmod +x net-snmp.SlackBuild
./net-snmp.SlackBuild
mv /tmp/net-snmp-5.6.1.1-*.txz ${CWD}
echo
echo
echo "For net-snmpd upgrade run:"
echo "upgradepkg ${CWD}/net-snmp-5.6.1.1-*.txz"
echo
echo
BY: Pejman Moghadam
TAG: snmp, slackware
DATE: 2011-09-28 16:41:38