extra/net-snmp to 5.7.2-4

This commit is contained in:
Jason Plum 2013-04-14 10:37:09 -04:00
parent 46c95bb12a
commit adfb4aa2dc
4 changed files with 12 additions and 60 deletions

View file

@ -7,7 +7,7 @@
pkgname=net-snmp
pkgver=5.7.2
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/"
@ -17,25 +17,22 @@ 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')
backup=('etc/conf.d/snmpd')
options=('!libtool' '!emptydirs')
options=('!libtool' '!emptydirs' '!makeflags')
source=(http://downloads.sourceforge.net/${pkgname}/${pkgname}-${pkgver}.tar.gz{,.asc}
snmpd.confd snmpd.rc snmpd.service libnl32.patch)
snmpd.service libnl32.patch)
sha1sums=('c493027907f32400648244d81117a126aecd27ee'
'25ee4b2e7b5a1b91122d06e82d41ef5bb5359d6d'
'cf811da9e57bbca34d8e2a3c358bb3bfc0c2b33b'
'90600c0141eed10d6e3ca3ccc97ad8dda15c2112'
'f59ddc049c1c689f04e68c3c7cd8b8e301df3158'
'SKIP'
'2ad00f89ecb8ec97adfbae7adfbfa3499319e5d7'
'74a9848b95f63378eb1753fc309d2b74de5afb0f')
build() {
prepare() {
cd "${srcdir}/${pkgname}-${pkgver}"
# http://sourceforge.net/tracker/index.php?func=detail&aid=3250304&group_id=12694&atid=112694
patch -Np1 -i "$srcdir/libnl32.patch"
autoreconf -f -i
}
build() {
cd "${pkgname}-${pkgver}"
PYTHONPROG=/usr/bin/python2 ./configure --prefix=/usr \
--sysconfdir=/etc \
--mandir=/usr/share/man \
@ -60,11 +57,9 @@ build() {
}
package() {
cd "${srcdir}/${pkgname}-${pkgver}"
cd "${pkgname}-${pkgver}"
sed -i -e "s:install --basedir=\$\$dir:install --basedir=\$\$dir --root=${pkgdir}:" Makefile
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 "${srcdir}/snmpd.service" "${pkgdir}/usr/lib/systemd/system/snmpd.service"
install -D -m644 COPYING "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"
}

View file

@ -1,5 +0,0 @@
#
# Parameters to be passed to snmpd
#
SNMPD_ARGS=""

View file

@ -1,39 +0,0 @@
#!/bin/bash
. /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 $SNMPD_ARGS
if [ $? -gt 0 ]; then
stat_fail
else
echo $PID > /var/run/snmpd.pid
add_daemon snmpd
stat_done
fi
;;
stop)
stat_busy "Stopping Net-SNMP"
[ ! -z "$PID" ] && kill $PID &> /dev/null
if [ $? -gt 0 ]; then
stat_fail
else
rm /var/run/snmpd.pid
rm_daemon snmpd
stat_done
fi
;;
restart)
$0 stop
sleep 2
$0 start
;;
*)
echo "usage: $0 {start|stop|restart}"
esac
exit 0

View file

@ -4,7 +4,8 @@ After=syslog.target network.target
[Service]
Type=forking
ExecStart=/usr/sbin/snmpd
PIDFile=/run/snmpd.pid
ExecStart=/usr/sbin/snmpd -p /run/snmpd.pid
ExecReload=/bin/kill -HUP $MAINPID
[Install]