rpms/net-snmp/devel net-snmp.spec,1.155,1.156

Jan Šafránek jsafrane at fedoraproject.org
Tue Sep 16 08:29:17 UTC 2008


Author: jsafrane

Update of /cvs/pkgs/rpms/net-snmp/devel
In directory cvs1.fedora.phx.redhat.com:/tmp/cvs-serv14404

Modified Files:
	net-snmp.spec 
Log Message:
add net-snmp-python
Resolves: #461947


Index: net-snmp.spec
===================================================================
RCS file: /cvs/pkgs/rpms/net-snmp/devel/net-snmp.spec,v
retrieving revision 1.155
retrieving revision 1.156
diff -u -r1.155 -r1.156
--- net-snmp.spec	25 Jul 2008 11:03:32 -0000	1.155
+++ net-snmp.spec	16 Sep 2008 08:28:47 -0000	1.156
@@ -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 @@
 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 @@
 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 @@
 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 @@
 	| 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 @@
 %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 @@
 %{_libdir}/lib*.so.*
 
 %changelog
+* Wed Sep 10 2008 John A. Khvatov <ivaxer at fedoraproject.org> 5.4.1-22
+- add net-snmp-python
+
 * Tue Jul 22 2008 Jan Safranek <jsafranek at redhat.com> 5.4.1-21
 - fix perl SNMP::Session::set (#452131)
 




More information about the fedora-extras-commits mailing list