###############################################################################
name = net-snmp
-version = 5.7.3
-release = 1
+version = 5.9.3
+release = 4
groups = Networking/Daemons
url = http://net-snmp.sourceforge.net
autoconf
automake
bzip2-devel
- chrpath
elfutils-devel
lm-sensors-devel >= 3
openssl-devel
- perl(ExtUtils::Embed)
+ patchelf
procps
- python-setuptools
- python-devel
+ python3-devel
+ python3-setuptools
systemd-devel
- systemd-units
end
- PARALLELISMFLAGS = # No parallel build
-
prepare_cmds
autoreconf -vfi
end
--enable-ucd-snmp-compatibility \
--with-openssl \
--with-pic \
- --enable-embedded-perl \
--enable-as-needed \
- --with-perl-modules="INSTALLDIRS=vendor" \
--enable-mfd-rewrites \
--enable-local-smux \
--with-temp-file-pattern=/var/run/net-snmp/snmp-tmp-XXXXXX \
--with-transports="DTLSUDP TLSTCP" \
--with-security-modules=tsm \
- --with-systemd
-
- build_cmds
- # Remove rpath from compiled perl libs
- find perl/blib -type f -name "*.so" -print -exec chrpath --delete {} \;
-
- # Compile python module
- pushd python
- %{python} setup.py --basedir=".." build
- popd
- end
+ --with-systemd \
+ --with-default-snmp-version="3" \
+ --without-perl-modules \
+ --disable-embedded-perl \
+ --with-python-modules
install_cmds
# Remove stuff we don't want to distribute.
# Copy missing mib2c.conf files.
install -v -m 644 local/mib2c.*.conf %{BUILDROOT}%{datadir}/snmp
- # Install python module.
- pushd python
- %{python} setup.py --basedir=".." install -O1 --skip-build --root %{BUILDROOT}
- popd
-
# Make libs executable.
find %{BUILDROOT} -name "*.so" | xargs chmod -v 755
install -v -m644 %{DIR_SOURCE}/snmptrapd.conf \
%{BUILDROOT}%{sysconfdir}/snmp/snmptrapd.conf
- # Prepare runtime directories.
- mkdir -pv %{BUILDROOT}%{localstatedir}/{lib,run}/net-snmp
+ # Prepare runtime directory
+ mkdir -pv %{BUILDROOT}%{sharedstatedir}/net-snmp
+
+ # Remove scripts in /bin which requires the SNMP
+ # perl bindings.
+ rm -rvf %{BUILDROOT}%{bindir}/net-snmp-cert
+ rm -rvf %{BUILDROOT}%{bindir}/tkmib
+ rm -rvf %{BUILDROOT}%{bindir}/mib2c
+ rm -rvf %{BUILDROOT}%{bindir}/snmp-bridge-mib
+
+ # Remove checkbandwidth script
+ # This uses a deprecated perl module (Mail::Sender)
+ rm -rvf %{BUILDROOT}%{bindir}/checkbandwidth
# Remove more RPATHs.
find %{BUILDROOT}%{bindir} -type f -print \
- -exec chrpath --delete {} \;
+ -exec patchelf --remove-rpath {} \;
end
end
template LIBS
end
- package %{name}-python
- template PYTHON
+ package python3-%{name}
+ template PYTHON3
end
package %{name}-devel