add net-snmp-python Resolves: #461947
This commit is contained in:
parent
a5aa1571f7
commit
b9fb5fcf10
@ -1,3 +1,4 @@
|
||||
%{!?python_sitelib: %define python_sitelib %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib(1)")}
|
||||
%{!?tcp_wrappers:%define tcp_wrappers 1}
|
||||
|
||||
# Arches on which we need to prevent arch conflicts on net-snmp-config.h
|
||||
@ -7,7 +8,7 @@
|
||||
Summary: A collection of SNMP protocol tools and libraries
|
||||
Name: net-snmp
|
||||
Version: %{major_ver}
|
||||
Release: 21%{?dist}
|
||||
Release: 22%{?dist}
|
||||
Epoch: 1
|
||||
|
||||
License: BSD and MIT
|
||||
@ -54,6 +55,7 @@ BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
|
||||
BuildRequires: openssl-devel, bzip2-devel, elfutils-devel
|
||||
BuildRequires: libselinux-devel, elfutils-libelf-devel, rpm-devel
|
||||
BuildRequires: perl-devel, perl(ExtUtils::Embed), gawk, procps
|
||||
BuildRequires: python-devel, python-setuptools
|
||||
%ifnarch s390 s390x
|
||||
BuildRequires: lm_sensors-devel >= 3
|
||||
%endif
|
||||
@ -149,6 +151,17 @@ Summary: The NET-SNMP runtime libraries
|
||||
The net-snmp-libs package contains the runtime libraries for shared binaries
|
||||
and applications.
|
||||
|
||||
%package python
|
||||
Group: Development/Libraries
|
||||
Summary: The Python 'netsnmp' module for the NET-SNMP
|
||||
Requires: %{name} = %{epoch}:%{version}
|
||||
|
||||
%description python
|
||||
The 'netsnmp' module provides a full featured, tri-lingual SNMP (SNMPv3,
|
||||
SNMPv2c, SNMPv1) client API. The 'netsnmp' module internals rely on the
|
||||
Net-SNMP toolkit library.
|
||||
|
||||
|
||||
%prep
|
||||
%setup -q -n %{name}-%{major_ver}
|
||||
%patch1 -p1 -b .mnttab
|
||||
@ -225,6 +238,11 @@ perl -pi -e 's/^LD_RUN_PATH.*//;s/LD_RUN_PATH=\".*\" //;' default_store/Makefile
|
||||
make %{?smp_mflags}
|
||||
popd
|
||||
|
||||
pushd python
|
||||
# built python module building
|
||||
%{__python} setup.py --basedir="../" build
|
||||
popd
|
||||
|
||||
%install
|
||||
rm -rf ${RPM_BUILD_ROOT}
|
||||
%makeinstall ucdincludedir=${RPM_BUILD_ROOT}/usr/include/ucd-snmp
|
||||
@ -294,6 +312,11 @@ find $RPM_BUILD_ROOT/$installvendorarch -type f -print \
|
||||
| grep -v '/auto$' \
|
||||
> ../perl.lst
|
||||
popd
|
||||
|
||||
pushd python
|
||||
%{__python} setup.py install -O1 --skip-build --root $RPM_BUILD_ROOT
|
||||
popd
|
||||
|
||||
find $RPM_BUILD_ROOT -name '*.so' | xargs chmod 0755
|
||||
|
||||
# remove docs that do not apply to Linux
|
||||
@ -379,6 +402,11 @@ rm -rf ${RPM_BUILD_ROOT}
|
||||
%attr(0644,root,root) %{_mandir}/man1/mib2c.1*
|
||||
%attr(0644,root,root) %{_mandir}/man3/*.3pm.*
|
||||
|
||||
%files python
|
||||
%defattr(-,root,root,-)
|
||||
%doc README
|
||||
%{python_sitelib}/*
|
||||
|
||||
%files gui
|
||||
%defattr(-,root,root)
|
||||
%{_bindir}/tkmib
|
||||
@ -389,6 +417,9 @@ rm -rf ${RPM_BUILD_ROOT}
|
||||
%{_libdir}/lib*.so.*
|
||||
|
||||
%changelog
|
||||
* Wed Sep 10 2008 John A. Khvatov <ivaxer@fedoraproject.org> 5.4.1-22
|
||||
- add net-snmp-python
|
||||
|
||||
* Tue Jul 22 2008 Jan Safranek <jsafranek@redhat.com> 5.4.1-21
|
||||
- fix perl SNMP::Session::set (#452131)
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user