# Maintainer: Michael Haesel pkgname=net-snmp pkgver=5.7.1 pkgrel=1 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=('BSD') depends=('openssl' 'libnl' 'pciutils') makedepends=('python-distribute') optdepends=('perl-term-readkey: for snmpcheck application' 'perl-tk: for snmpcheck application' 'python2: for the python modules') provides=('ucd-snmp') backup=('etc/conf.d/snmpd') options=('!libtool' '!makeflags' '!emptydirs') source=("http://downloads.sourceforge.net/sourceforge/${pkgname}/${pkgname}-${pkgver}.tar.gz" 'snmpd.rc' 'snmpd.service' 'snmpd.confd' 'libnl32.patch') sha256sums=('7c71c9650c65b715356547e20ca2dbe6313944278af8cc19c32a5337f46b181f' '256d51d8f089d238cb61d3e22b18b5c00fa0a95e070801569f7decd7ab07a5ec' '80b0794c9abf1e38935ef0f98a6157ea348893ff088643ef81fdff04c2a5dd6b' 'ae07e5123b969ae98529b5fc5ffe01bf82def2fdb3cc7bdcb4cf684c6583c32c' '08b8909deb81daac5ae454dcf0f50ee1d6794aa7dfd9dc6513244f220d69faea') build() { 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 sed -i -e "s:\(install --basedir=\$\$dir\):\1 --root='${pkgdir}':" Makefile.in PYTHONPROG=/usr/bin/python2 ./configure --prefix=/usr \ --sysconfdir=/etc \ --mandir=/usr/share/man \ --enable-ucd-snmp-compatibility \ --enable-ipv6 \ --with-libwrap \ --with-python-modules \ --with-default-snmp-version="3" \ --with-sys-contact="root@localhost" \ --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" \ --disable-static make NETSNMP_DONT_CHECK_VERSION=1 } package() { cd "${srcdir}/${pkgname}-${pkgver}" make DESTDIR="${pkgdir}" INSTALL_PREFIX="${pkgdir}" INSTALLDIRS=vendor install # install service files install -Dm0755 "${srcdir}/snmpd.rc" "${pkgdir}/etc/rc.d/snmpd" install -Dm0644 "${srcdir}/snmpd.service" "${pkgdir}/usr/lib/systemd/system/snmpd.service" # install config file install -Dm0644 "${srcdir}/snmpd.confd" "${pkgdir}/etc/conf.d/snmpd" # install license install -Dm0644 COPYING "${pkgdir}/usr/share/licenses/${pkgname}/COPYING" }