🔒 Repository is read-only – file editing is disabled.
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172
pkgname: net-snmp
pkgver: '5.10.pre1'
pkgrel: 4
pkgdesc: Widely used protocol for monitoring the health and welfare of network equipment.
url: 'https://www.net-snmp.org/'
arch: x86_64
depends:
- python
- perl
makedepends:
- python-setuptools
- automake
- autoconf
- m4
- libtool
- libnl
- openssl
- pciutils
- libxcrypt
source:
- 'https://downloads.sourceforge.net/${pkgname}/${pkgname}-${pkgver}.tar.gz'
sha256sums:
- SKIP
build: |
unset MAKEFLAGS
cd ${pkgname}-${pkgver}
autoreconf -i
# libnetsnmptrapd linkuje tylko MIBLIB; nowoczesny binutils
# (--no-copy-dt-needed-entries) nie ciagnie symboli z DT_NEEDED,
# wiec brak AGENTLIB -> undefined ref do agent_trap/vacm_conf.
sed -i 's#${LLIBTRAPD_OBJS} $(MIBLIB) $(MYSQL_LIBS)#${LLIBTRAPD_OBJS} $(MIBLIB) $(AGENTLIB) $(MYSQL_LIBS)#' apps/Makefile.in
./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" \
--with-persistent-directory="/var/net-snmp"
# glibc: fd_set ma __fds_bits (nie fds_bits) -> configure wpisuje
# NETSNMP_FD_MASK_TYPE 'unknown' i kompilacja pada. Ustaw poprawny typ.
sed -i 's/^#define NETSNMP_FD_MASK_TYPE .*/#define NETSNMP_FD_MASK_TYPE __fd_mask/' \
include/net-snmp/net-snmp-config.h
make NETSNMP_DONT_CHECK_VERSION=1
sed -i -e "s:install --basedir=\$\$dir:install --basedir=\$\$dir --root=${PKGDIR}:" Makefile
make DESTDIR=${PKGDIR} INSTALL_PREFIX=${PKGDIR} INSTALLDIRS=vendor install
# Remove perllocal.pod and .packlist if present in the package
for i in perllocal.pod .packlist; do
find ${PKGDIR} -name "$i" -exec rm -rf {} \;
done
# Obsolets libs
rm -f ${PKGDIR}/usr/lib/libnetsnmp.la
rm -f ${PKGDIR}/usr/lib/libnetsnmpagent.la
rm -f ${PKGDIR}/usr/lib/libnetsnmphelpers.la
rm -f ${PKGDIR}/usr/lib/libnetsnmpmibs.la
rm -f ${PKGDIR}/usr/lib/libnetsnmptrapd.la
rm -f ${PKGDIR}/usr/lib/libsnmp.la
package: |
true