summaryrefslogtreecommitdiff
path: root/net-snmp/Pkgfile
blob: e2dbca0bbd4ef54f33780802ef4bb0dc6ec53a27 (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.6.1
    9 release=1
   10 source=(http://download.sourceforge.net/$name/$name-$version.tar.gz \
   11 		snmpd snmpd.conf)
   12 
   13 build() {
   14 	cd $name-$version
   15 	export NETSNMP_DONT_CHECK_VERSION=1
   16 	./configure --prefix=/usr \
   17 				--sysconfdir=/etc \
   18 				--mandir=/usr/man \
   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.1?/linux/Bundle \
   46 		$PKG/usr/lib/perl5/5.1? \
   47 		$PKG/usr/lib/perl5/site_perl/5.1?/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 }

Generated by cgit