blob: 3d76c0f04d235b8388724d4a776422ad29c73b64 (
plain)
1 # Description: SNMP daemon and client tools
2 # URL: http://net-snmp.sourceforge.net/
3 # Maintainer: Mikhail Kolesnik, mike at openbunker dot org
4 # Packager: Oleksiy V. Khilkevich, centericq at ukr dot net
5 # Depends on: perl lm_sensors
6
7 name=net-snmp
8 version=5.4.2.1
9 release=2
10 source=(http://dl.sourceforge.net/sourceforge/$name/$name-$version.tar.gz \
11 snmpd snmpd.conf net-snmp-5.4.1-sensors3.patch)
12
13 build() {
14 cd $name-$version
15 patch -p0 -i $SRC/net-snmp-5.4.1-sensors3.patch
16 export NETSNMP_DONT_CHECK_VERSION=1
17 ./configure --prefix=/usr \
18 --sysconfdir=/etc \
19 --enable-shared \
20 --enable-embedded-perl \
21 --with-perl-modules \
22 --without-rpm \
23 --with-openssl \
24 --with-libwrap \
25 --with-zlib \
26 --with-mib-modules="ucd-snmp/lmsensorsMib smux agentx ucd-snmp/diskio" \
27 --with-sys-location="Unknown" \
28 --with-sys-contact="root@localhost" \
29 --with-default-snmp-version="3" \
30 --with-logfile=/var/log/snmp/snmpd.log \
31 --with-persistent-directory=/var/lib/snmp \
32 --with-ldflags="-lsensors"
33 make
34 make install INSTALL_PREFIX=$PKG DESTDIR=$PKG
35
36 # Clean up perl stuff: clean common junks first, ...
37 find $PKG/usr/lib/perl5 -name .packlist \
38 -o -name perllocal.pod \
39 -o \( \
40 -name *.bs -a -empty \
41 \) \
42 | xargs rm
43 # ... less common ones and empty directories
44 rm -rf \
45 $PKG/usr/lib/perl5/site_perl/5.10.?/linux/Bundle \
46 $PKG/usr/lib/perl5/5.10.? \
47 $PKG/usr/lib/perl5/site_perl/5.10.?/linux/auto/Bundle
48 rm $PKG/usr/include/net-snmp/library/README
49
50 mkdir -p $PKG/var/{lib,run,log}/snmp
51 touch $PKG/var/log/snmp/snmpd.log
52
53 # Can not decide whether to install this dummy files to allow correct
54 # cleanup on package removal or not. (snmpd creates them)
55 #touch $PKG/var/lib/snmpd.conf
56 #touch $PKG/usr/share/snmp/mibs/.index
57
58 chown -R daemon:daemon $PKG/var/{lib,run,log}/snmp
59
60 # Seems to be an overkill, install a very basic config instead
61 #install -D -m 644 EXAMPLE.conf $PKG/etc/snmp/snmpd.conf.sample
62 install -D -m 644 $SRC/snmpd.conf $PKG/etc/snmp/snmpd.conf
63 install -D -m 755 $SRC/snmpd $PKG/etc/rc.d/snmpd
64 }
|