blob: d882f83d426ad3db7a924cf4083912c07f8713a6 (
plain)
1 # Description: SNMP daemon and client tools
2 # URL: http://net-snmp.sourceforge.net/
3 # Maintainer: Fredrik Rinnestam, fredrik at rinnestam dot se
4 # Depends on: perl lm_sensors
5
6 name=net-snmp
7 version=5.7.3
8 release=2
9 source=(http://download.sourceforge.net/$name/$name-$version.tar.gz \
10 snmpd snmpd.conf)
11
12 build() {
13 cd $name-$version
14 export NETSNMP_DONT_CHECK_VERSION=1
15 ./configure --prefix=/usr \
16 --sysconfdir=/etc \
17 --mandir=/usr/man \
18 --enable-shared \
19 --enable-embedded-perl \
20 --with-perl-modules \
21 --without-rpm \
22 --with-openssl \
23 --with-zlib \
24 --with-mib-modules="ucd-snmp/lmsensorsMib smux agentx ucd-snmp/diskio" \
25 --with-sys-location="Unknown" \
26 --with-sys-contact="root@localhost" \
27 --with-default-snmp-version="3" \
28 --with-logfile=/var/log/snmp/snmpd.log \
29 --with-persistent-directory=/var/lib/snmp \
30 --with-ldflags="-lsensors"
31 make
32 make install INSTALL_PREFIX=$PKG DESTDIR=$PKG
33
34 # Clean up perl stuff: clean common junks first, ...
35 find $PKG/usr/lib/perl5 -name .packlist \
36 -o -name perllocal.pod \
37 -o \( \
38 -name *.bs -a -empty \
39 \) \
40 | xargs rm
41 # ... less common ones and empty directories
42 rm -rf \
43 $PKG/usr/lib/perl5/site_perl/5.1?/linux/Bundle \
44 $PKG/usr/lib/perl5/5.1? \
45 $PKG/usr/lib/perl5/site_perl/5.1?/linux/auto/Bundle
46 rm $PKG/usr/include/net-snmp/library/README
47
48 mkdir -p $PKG/var/{lib,run,log}/snmp
49 touch $PKG/var/log/snmp/snmpd.log
50
51 chown -R snmp:snmp $PKG/var/{lib,run,log}/snmp
52
53 install -D -m 644 $SRC/snmpd.conf $PKG/etc/snmp/snmpd.conf
54 install -D -m 755 $SRC/snmpd $PKG/etc/rc.d/snmpd
55 }
|