From 64e290184042563a240e2d6d15c02e06703d00ee Mon Sep 17 00:00:00 2001 From: root Date: Mon, 22 Aug 2011 23:14:28 +0000 Subject: Mon Aug 22 23:14:28 UTC 2011 --- extra/net-snmp/PKGBUILD | 23 ++++++++++++----------- extra/net-snmp/snmpd.confd | 5 +++++ extra/net-snmp/snmpd.rc | 3 ++- 3 files changed, 19 insertions(+), 12 deletions(-) create mode 100644 extra/net-snmp/snmpd.confd (limited to 'extra/net-snmp') diff --git a/extra/net-snmp/PKGBUILD b/extra/net-snmp/PKGBUILD index a1f72cb01..5bdceb7c2 100644 --- a/extra/net-snmp/PKGBUILD +++ b/extra/net-snmp/PKGBUILD @@ -1,30 +1,31 @@ -# $Id: PKGBUILD 131650 2011-07-13 08:13:14Z andrea $ -# Maintainer: Eric Belanger +# $Id: PKGBUILD 136011 2011-08-21 12:39:53Z eric $ +# Maintainer: # Contributor: Dale Blount pkgname=net-snmp pkgver=5.6.1 -pkgrel=3 +pkgrel=4 pkgdesc="A suite of applications used to implement SNMP v1, SNMP v2c and SNMP v3 using both IPv4 and IPv6" arch=('i686' 'x86_64') url="http://www.net-snmp.org/" license=('custom') depends=('openssl' 'libnl') -makedepends=('setuptools') +makedepends=('python2-distribute') optdepends=('perl-term-readkey: for snmpcheck application' 'perl-tk: for snmpcheck and tkmib applications' 'python2: for the python modules') provides=('ucd-snmp') options=('!libtool' '!makeflags' '!emptydirs') -source=("http://downloads.sourceforge.net/${pkgname}/${pkgname}-${pkgver}.tar.gz" - 'snmpd.rc') +source=(http://downloads.sourceforge.net/${pkgname}/${pkgname}-${pkgver}.tar.gz + snmpd.confd snmpd.rc) md5sums=('b4e30ead5783b0bb1d280172c6095ea4' - '9f0d13676ba1fae1eb7eb178edd85b43') + '37bc5db8707004fe284c202437c6aa7d' + 'edab44a12f76045e41340d433a79dcec') build() { cd "${srcdir}/${pkgname}-${pkgver}" sed -i -e "s:\(install --basedir=\$\$dir\):\1 --root='${pkgdir}':" Makefile.in - ./configure --prefix=/usr \ + PYTHONPROG=/usr/bin/python2 ./configure --prefix=/usr \ --sysconfdir=/etc \ --mandir=/usr/share/man \ --enable-ucd-snmp-compatibility \ @@ -35,14 +36,14 @@ build() { --with-sys-location="Unknown" \ --with-logfile="/var/log/snmpd.log" \ --with-mib-modules="host misc/ipfwacc ucd-snmp/diskio tunnel ucd-snmp/dlmod" \ - --with-persistent-directory="/var/net-snmp" \ - PYTHONPROG=/usr/bin/python2 - make NETSNMP_DONT_CHECK_VERSION=1 LDFLAGS+="-Wl,-rpath -Wl,/usr/lib/perl5/core_perl/CORE" + --with-persistent-directory="/var/net-snmp" + make NETSNMP_DONT_CHECK_VERSION=1 } package() { cd "${srcdir}/${pkgname}-${pkgver}" make DESTDIR="${pkgdir}" INSTALL_PREFIX="${pkgdir}" INSTALLDIRS=vendor install install -D -m755 "${srcdir}/snmpd.rc" "${pkgdir}/etc/rc.d/snmpd" + install -D -m644 "${srcdir}/snmpd.confd" "${pkgdir}/etc/conf.d/snmpd" install -D -m644 COPYING "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE" } diff --git a/extra/net-snmp/snmpd.confd b/extra/net-snmp/snmpd.confd new file mode 100644 index 000000000..926b09bbf --- /dev/null +++ b/extra/net-snmp/snmpd.confd @@ -0,0 +1,5 @@ +# +# Parameters to be passed to snmpd +# +SNMPD_ARGS="" + diff --git a/extra/net-snmp/snmpd.rc b/extra/net-snmp/snmpd.rc index 9f1b83f64..b00c09f4f 100644 --- a/extra/net-snmp/snmpd.rc +++ b/extra/net-snmp/snmpd.rc @@ -2,12 +2,13 @@ . /etc/rc.conf . /etc/rc.d/functions +. /etc/conf.d/snmpd PID=`pidof -o %PPID /usr/sbin/snmpd` case "$1" in start) stat_busy "Starting Net-SNMP" - [ -z "$PID" ] && /usr/sbin/snmpd + [ -z "$PID" ] && /usr/sbin/snmpd $SNMPD_ARGS if [ $? -gt 0 ]; then stat_fail else -- cgit v1.2.3-54-g00ecf