%define modname pysnmp Name: python-%{modname} URL: http://pysnmp.sourceforge.net/ Summary: SNMP framework for Python Version: 4.1.14 %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} Requires: python-crypto python-asn1 BuildRequires: python-devel %if 0%{?suse_version} != 1110 BuildArch: noarch %endif %description This project aims at developing an SNMP v1/v2c/v3 engine written in the Python programming language. Authors: -------- Ilya Etingof %package utils Group: Development/Tools/Other Requires: python-pysnmp >= %version Summary: Python-pysnmp libsmi utilities # Needed for build-pysnmp-mib Requires: libsmi > 0.4.5 %description utils Utitilites used for the creation of python mib description files. Authors: -------- Ilya Etingof %prep %setup -q -n %{modname}-%{version}%{prever} %build export CFLAGS="$RPM_OPT_FLAGS" python setup.py build %install rm -rf %{buildroot} python setup.py install --prefix=%{_prefix} --root=%{buildroot} --record-rpm=INSTALLED_FILES.full 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 grep -v "/usr/bin" INSTALLED_FILES.full > INSTALLED_FILES %clean rm -rf %{buildroot} %files -f INSTALLED_FILES %defattr(-,root,root) %doc CHANGES LICENSE README THANKS TODO docs examples %files utils %defattr(-,root,root) %{_bindir}/libsmi2pysnmp %{_bindir}/build-pysnmp-mib %changelog