2006-10-27 12:13:46 +00:00
|
|
|
%define modname pysnmp
|
|
|
|
Name: python-%{modname}
|
|
|
|
URL: http://pysnmp.sourceforge.net/
|
|
|
|
Summary: SNMP framework for Python
|
2010-09-14 23:44:03 +00:00
|
|
|
Version: 4.1.14
|
2006-10-27 12:13:46 +00:00
|
|
|
%define prever a
|
|
|
|
Release: 1
|
|
|
|
License: Other License(s), see package
|
|
|
|
Group: Development/Libraries/Python
|
|
|
|
Source: %{modname}-%{version}%{prever}.tar.bz2
|
|
|
|
BuildRoot: %{_tmppath}/%{name}-%{version}-root
|
|
|
|
%{py_requires}
|
2010-09-14 23:44:03 +00:00
|
|
|
Requires: python-crypto python-asn1
|
2007-04-24 01:26:44 +00:00
|
|
|
BuildRequires: python-devel
|
2006-10-27 12:13:46 +00:00
|
|
|
|
2010-03-23 19:54:03 +00:00
|
|
|
%if 0%{?suse_version} != 1110
|
2010-09-14 23:44:03 +00:00
|
|
|
BuildArch: noarch
|
2010-03-23 19:54:03 +00:00
|
|
|
%endif
|
|
|
|
|
2006-10-27 12:13:46 +00:00
|
|
|
%description
|
|
|
|
This project aims at developing an SNMP v1/v2c/v3 engine written in the Python
|
|
|
|
programming language.
|
|
|
|
|
|
|
|
Authors:
|
|
|
|
--------
|
|
|
|
Ilya Etingof <ilya@glas.net>
|
|
|
|
|
2010-03-23 19:54:03 +00:00
|
|
|
%package utils
|
2010-09-14 23:44:03 +00:00
|
|
|
Group: Development/Tools/Other
|
|
|
|
Requires: python-pysnmp >= %version
|
|
|
|
Summary: Python-pysnmp libsmi utilities
|
2010-03-23 19:54:03 +00:00
|
|
|
# Needed for build-pysnmp-mib
|
2010-09-14 23:44:03 +00:00
|
|
|
Requires: libsmi >= 0.4.8
|
2010-03-23 19:54:03 +00:00
|
|
|
|
|
|
|
%description utils
|
2010-09-14 23:44:03 +00:00
|
|
|
Utitilites used for the creation of python mib description files.
|
|
|
|
|
|
|
|
Authors:
|
|
|
|
--------
|
|
|
|
Ilya Etingof <ilya@glas.net>
|
2010-03-23 19:54:03 +00:00
|
|
|
|
2006-10-27 12:13:46 +00:00
|
|
|
%prep
|
|
|
|
%setup -q -n %{modname}-%{version}%{prever}
|
|
|
|
|
|
|
|
%build
|
|
|
|
export CFLAGS="$RPM_OPT_FLAGS"
|
|
|
|
python setup.py build
|
|
|
|
|
|
|
|
%install
|
|
|
|
rm -rf %{buildroot}
|
2010-09-14 23:44:03 +00:00
|
|
|
python setup.py install --prefix=%{_prefix} --root=%{buildroot} --record-rpm=INSTALLED_FILES.full
|
2010-03-23 19:54:03 +00:00
|
|
|
install -m 0755 -d %{buildroot}%{_bindir}
|
|
|
|
install -m 0755 tools/libsmi2pysnmp %{buildroot}%{_bindir}/libsmi2pysnmp
|
|
|
|
install -m 0755 tools/build-pysnmp-mib %{buildroot}%{_bindir}/build-pysnmp-mib
|
2010-09-14 23:44:03 +00:00
|
|
|
grep -v "/usr/bin" INSTALLED_FILES.full > INSTALLED_FILES
|
2006-10-27 12:13:46 +00:00
|
|
|
|
|
|
|
%clean
|
|
|
|
rm -rf %{buildroot}
|
|
|
|
|
|
|
|
%files -f INSTALLED_FILES
|
|
|
|
%defattr(-,root,root)
|
2010-09-14 23:44:03 +00:00
|
|
|
%doc CHANGES LICENSE README THANKS TODO docs examples
|
2010-03-23 19:54:03 +00:00
|
|
|
|
|
|
|
%files utils
|
|
|
|
%defattr(-,root,root)
|
|
|
|
%{_bindir}/libsmi2pysnmp
|
|
|
|
%{_bindir}/build-pysnmp-mib
|
2006-10-27 12:13:46 +00:00
|
|
|
|
|
|
|
%changelog
|