pkgname=net-snmp pkgver=5.9.4 pkgrel=3 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=('openssl' 'libnl' 'pciutils' 'libxcrypt') makedepends=('python3-setuptools') options=('!libtool' '!makeflags' '!emptydirs') #source=("https://github.com/net-snmp/net-snmp/archive/v${pkgver}.tar.gz") source=("https://downloads.sourceforge.net/sourceforge/net-snmp/${pkgname}-${pkgver}.tar.gz" 'snmpd.service' 'perl.patch') md5sums=('395f7988f1ee4fd9b61eebbbb0961245' '7afa48020f37e4de2b3b8cdf4d7b0e42' '5e800d442de59f77f1080ff5f52e2041') build() { cd ${pkgname}-${pkgver} patch -p1 -i ${srcdir}/perl.patch autoreconf -f -i ./configure --prefix=/usr \ --sysconfdir=/etc \ --mandir=/usr/share/man \ --enable-ucd-snmp-compatibility \ --enable-ipv6 \ --with-python-modules=yes \ --with-perl-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 ${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 -Dm0644 ${srcdir}/snmpd.service ${pkgdir}/usr/lib/systemd/system/snmpd.service install -Dm0644 COPYING ${pkgdir}/usr/share/licenses/${pkgname}/LICENSE }