# Maintainer: Felix Yan # Contributor: Dale Blount pkgname=net-snmp pkgver=5.9.2 pkgrel=2 pkgdesc="A suite of applications used to implement SNMP v1, SNMP v2c and SNMP v3 using both IPv4 and IPv6" arch=('x86_64') url="http://www.net-snmp.org/" license=('BSD') depends=('libnsl' 'libpcap' 'lm_sensors' 'pciutils' 'pcre' 'perl') makedepends=('python-setuptools') optdepends=('perl-term-readkey: for snmpcheck application' 'perl-tk: for snmpcheck and tkmib applications' 'python: for the python modules') options=('!emptydirs' '!makeflags') source=(https://downloads.sourceforge.net/${pkgname}/${pkgname}-${pkgver}.tar.gz{,.asc} snmpd.service snmptrapd.service) sha512sums=('d67810b15c4956a28ccb4d9a3870604bc94e71247d9a8d3a9959041268122b3500cf68a7912cfb01a6cff27f3f4364cbd106629ab80c12974f694b6c548bde59' 'SKIP' '802057d08f4fe69fa9fafed349d37c0f8a6092002b933292563568db274890ae8932a000ecb60c5db0db792ecca30723fc803c0af6da147d148bf059b7f137eb' '82b05b805db5f6870242ea4dfaa58de2865c367208cacfa4fc543c9f2a310d7229dee94ea6054d35c4bab69393f33fd367551727279da4411052589ed37bb4a4') validpgpkeys=('8AAA779B597B405BBC329B6376CF47B8A77C5329' '27CAA4A32E371383A33ED0587D5F9576E0F81533' 'D0F8F495DA6160C44EFFBF10F07B9D2DACB19FD6') # Net-SNMP Administrators prepare() { cd ${pkgname}-${pkgver} autoreconf -i } build() { cd ${pkgname}-${pkgver} ./configure --prefix=/usr \ --sysconfdir=/etc --sbindir=/usr/bin \ --mandir=/usr/share/man \ --enable-ucd-snmp-compatibility \ --enable-ipv6 \ --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 ucd-snmp/lmsensorsMib" \ --with-persistent-directory="/var/net-snmp" make NETSNMP_DONT_CHECK_VERSION=1 } package() { 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 -m644 "${srcdir}/snmpd.service" "${pkgdir}/usr/lib/systemd/system/snmpd.service" install -D -m644 "${srcdir}/snmptrapd.service" "${pkgdir}/usr/lib/systemd/system/snmptrapd.service" install -D -m644 COPYING "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE" }