source: npl/monitoring/net_snmp/net_snmp.SlackBuild

Last change on this file was c5c522c, checked in by Edwin Eefting <edwin@datux.nl>, 8 years ago

initial commit, transferred from cleaned syn3 svn tree

  • Property mode set to 100755
File size: 1.3 KB
Line 
1#!/bin/bash
2
3NAME=net_snmp
4VER=5.4.2.1
5CWD=`pwd`
6PKGTMP=/tmp/pkgtmp
7TARNAME=net-snmp
8
9mkdir -p $PKGTMP &>/dev/null
10
11tar -xzf $TARNAME-$VER.tar.gz || exit 1
12cd $TARNAME-$VER || exit 1
13
14
15#HACK: deze header geeft parse errors, maar lijkt niet nodig te zijn?
16sed 's@#include <netinet/if_ether.h>@@' -i ./agent/mibgroup/mibII/at.c || exit 1
17
18#niet?  mibII/interfaces tunnel
19#extra dep: ucd-snmp/lmSensors
20./configure --with-defaults \
21        --prefix=/usr \
22        --sysconfdir=/etc \
23        --with-mib-modules="host misc/ipfwacc misc/ipfwacc ip-mib/ipv4InterfaceTable ucd-snmp/diskio disman/event-mib ucd-snmp/extensible agent/extend" \
24        || exit 1
25make -j1 || exit 1
26#make test || exit 1
27make -j1 INSTALL_PREFIX=$PKGTMP install || exit 1
28
29cd $CWD
30mkdir -p $PKGTMP/etc
31cp snmpd.conf.new $PKGTMP/etc || exit 1
32
33mkdir -p $PKGTMP/service/snmpd
34cp run $PKGTMP/service/snmpd || exit 1
35chmod +x $PKGTMP/service/snmpd/run || exit 1
36#by default don't run dhcpd
37touch $PKGTMP/service/snmpd/down
38
39#postinstall
40mkdir -p $PKGTMP/etc/postinst.d
41cp $CWD/post.net_snmpd $PKGTMP/etc/postinst.d
42chmod +x $PKGTMP/etc/postinst.d/post.net_snmpd
43#logrotate files
44mkdir -p $PKGTMP/etc/logrotate.d
45cp $CWD/snmpd.logrotate $PKGTMP/etc/logrotate.d/snmpd
46
47cd "$PKGTMP" || exit 1
48makepkg -l y -c n $CWD/$NAME.pkg > /dev/null &&
49echo $VER > $CWD/$NAME.version &&
50arch > $CWD/$NAME.arch
51
Note: See TracBrowser for help on using the repository browser.