rpms/snmp++/devel import.log, NONE, 1.1 snmp++.spec, NONE, 1.1 snmp-build.patch, NONE, 1.1 snmp-settings.patch, NONE, 1.1 snmp-warnings.patch, NONE, 1.1 .cvsignore, 1.1, 1.2 sources, 1.1, 1.2

Hayden James hjames at fedoraproject.org
Sun Nov 23 05:24:17 UTC 2008


Author: hjames

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

Modified Files:
	.cvsignore sources 
Added Files:
	import.log snmp++.spec snmp-build.patch snmp-settings.patch 
	snmp-warnings.patch 
Log Message:
Initial import of snmp++ library



--- NEW FILE import.log ---
snmp++-3_2_23-5_fc9:HEAD:snmp++-3.2.23-5.fc9.src.rpm:1227417699


--- NEW FILE snmp++.spec ---
Name: snmp++
Version: 3.2.23
Release: 5%{?dist}
Summary: SNMP++v3.x is based on SNMP++v2.8 from HP* and extends it by support for SNMPv3

Group:	Development/Libraries
License: MIT
URL: http://www.agentpp.com/index.html
Source0: http://www.agentpp.com/snmp++v%{version}.tar.gz	
Patch0: snmp-settings.patch
Patch1: snmp-build.patch
Patch2: snmp-warnings.patch
BuildRoot:	%{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)

BuildRequires: openssl-devel

%description
SNMP++v3.x is based on SNMP++v2.8 from HP* and extends it by support for 
SNMPv3 and a couple of bug fixes. SNMP++v3.x is a C++ API which supports 
SNMP v1, v2c, and v3.

%prep
%setup -q -n %{name}
%patch0 -p1
%patch1 -p1
%patch2 -p1

%define soversion 0.0.0

%build
cd src
export USEROPTS="%{optflags}"
export LDFLAGS="-Wl,-soname -Wl,libsnmp++.so.0 -lssl"
export VERSION="%{soversion}"
make %{?_smp_mflags} -f Makefile.linux

%install
rm -rf $RPM_BUILD_ROOT
export INSTPREFIX=$RPM_BUILD_ROOT%{_prefix}
export INSTLIBPATH=$RPM_BUILD_ROOT%{_libdir}
export VERSION="%{soversion}"
cd src
make %{?_smp_mflags} -f Makefile.linux install
cd $RPM_BUILD_ROOT%{_libdir}
ln -s libsnmp++.so.%{soversion} libsnmp++.so.0
ln -s libsnmp++.so.%{soversion} libsnmp++.so

%clean
rm -rf $RPM_BUILD_ROOT

%post -p /sbin/ldconfig
%postun -p /sbin/ldconfig

%files
%defattr(-,root,root,-)
%exclude %{_libdir}/libsnmp++.a
%{_libdir}/libsnmp++.so.%{soversion}
%{_libdir}/libsnmp++.so.0
%doc README.v3 readme.txt CHANGES.snmp++v3

%package devel
Summary: Header files and libraries for %{name}
Group: Development/Libraries
Requires: %{name} = %{version}-%{release},openssl-devel
%description devel
This package contains the header files  for %{name}. If you 
like to develop programs using %{name}, you will need to 
install %{name}-devel

%files devel
%defattr(-,root,root,-)
%{_libdir}/libsnmp++.so
%defattr(0644,root,root,0755)
%{_includedir}/snmp_pp

%changelog
* Thu Nov 20 2008 Hayden James - 3.2.23-5
- Fixed weak references in shared object
- Changed soname version once again

* Tue Nov 18 2008 Hayden James - 3.2.23-4
- Fixed build problem due to soname change

* Tue Nov 18 2008 Hayden James - 3.2.23-3
- Change soname to start at version 0.0.0 as upstream will continue with 1.0.0 for the 3.2.24 release

* Sat Nov 15 2008 Hayden James - 3.2.23-2
- Fixed missing soname problem. Fixed some compilation warnings. 
- Fixed description and summary formatting

* Wed Nov 12 2008 Hayden James - 3.2.23-1
- Initial package.

snmp-build.patch:

--- NEW FILE snmp-build.patch ---
diff -ur snmp++.orig/src/common.mk snmp++/src/common.mk
--- snmp++.orig/src/common.mk	2007-11-11 09:11:10.000000000 -0500
+++ snmp++/src/common.mk	2008-11-15 10:23:08.000000000 -0500
@@ -50,8 +50,12 @@
 #
 #  Libraries:  dependencies and produced
 #
+ifndef VERSION
+VERSION = 3.2.23
+endif
+
 LIBPATH = ../lib
-LIBSNMPPLUS_SHARED = $(LIBPATH)/libsnmp++.so
+LIBSNMPPLUS_SHARED = $(LIBPATH)/libsnmp++.so.$(VERSION)
 LIBSNMPPLUS = $(LIBPATH)/libsnmp++.a
 LIBSNMPX11 = $(LIBPATH)/libsnmpx11.a
 
@@ -62,7 +66,10 @@
 INSTPREFIX	= /usr/local
 endif
 
+ifndef INSTLIBPATH
 INSTLIBPATH	= $(INSTPREFIX)/lib
+endif
+
 INSTINCPATH	= $(INSTPREFIX)/include
 
 #
diff -ur snmp++.orig/src/Makefile.linux snmp++/src/Makefile.linux
--- snmp++.orig/src/Makefile.linux	2007-11-11 09:11:09.000000000 -0500
+++ snmp++/src/Makefile.linux	2008-11-15 10:21:08.000000000 -0500
@@ -34,9 +34,12 @@
 COPTIONS = -D_XPG4_EXTENDED -Wall # -DHEADER_DES_LOCL_H # -D_DEBUG
 TEMPOPTS = -I. 
 
+ifndef USEROPTS
 USEROPTS = -g
+endif
+
 CFLAGS	 = $(COPTIONS) $(CINCDIRS) $(USEROPTS)
-LDFLAGS  = $(CFLAGS)
+LDFLAGS  += $(CFLAGS)
 SHARED	 = -fPIC -shared
 
 #

snmp-settings.patch:

--- NEW FILE snmp-settings.patch ---
diff -ur snmp++.orig/include/snmp_pp/config_snmp_pp.h snmp++/include/snmp_pp/config_snmp_pp.h
--- snmp++.orig/include/snmp_pp/config_snmp_pp.h	2007-11-11 09:11:06.000000000 -0500
+++ snmp++/include/snmp_pp/config_snmp_pp.h	2008-11-12 22:57:12.000000000 -0500
@@ -56,10 +56,10 @@
 #endif
 
 // define SNMP_PP_IPv6 if you want to use IPv6
-// #define SNMP_PP_IPv6
+#define SNMP_PP_IPv6
 
 // define SNMP_PP_NAMESPACE to enclose all library names in Snmp_pp namespace
-// #define SNMP_PP_NAMESPACE
+#define SNMP_PP_NAMESPACE
 
 // define _NO_SNMPv3 here or in the Makefile if you do not want to use SNMPv3
 // (default is to use SNMPv3)
@@ -74,7 +74,7 @@
 // If you define _USE_OPENSSL, snmp++ will use OpenSSL for SHA1,
 // MD5, DES and AES. Please note that you will have to change the Makefiles
 // of the examples: Add -lssl to the link command
-// #define _USE_OPENSSL
+#define _USE_OPENSSL
 
 // If you do not use SNMP++ for commercial purposes or if you
 // have licensed IDEA (read README.v3) you may define the following

snmp-warnings.patch:

--- NEW FILE snmp-warnings.patch ---
diff -ur snmp++.orig/include/snmp_pp/collect1.h snmp++/include/snmp_pp/collect1.h
--- snmp++.orig/include/snmp_pp/collect1.h	2007-11-11 09:11:05.000000000 -0500
+++ snmp++/include/snmp_pp/collect1.h	2008-11-15 09:56:42.000000000 -0500
@@ -27,6 +27,8 @@
   _##  
   _##########################################################################*/
 // $Id: collect1.h 287 2007-03-22 22:37:09Z katz $
+#include <stdlib.h>
+
 #ifdef SNMP_PP_NAMESPACE
 namespace Snmp_pp {
 #endif
@@ -81,7 +83,7 @@
 	current = nextBlock;
 	cn=0;
       }
-      T *tmp;
+      T *tmp = NULL;
       c.get_element(tmp, count);
       current->item[cn] = (T*) (tmp->clone());
       count++;
diff -ur snmp++.orig/src/address.cpp snmp++/src/address.cpp
--- snmp++.orig/src/address.cpp	2007-11-11 09:11:00.000000000 -0500
+++ snmp++/src/address.cpp	2008-11-15 09:56:12.000000000 -0500
@@ -530,7 +530,7 @@
   trim_white_space(temp);
 
   // first check for ipv6 scope
-  unsigned int scope;
+  unsigned int scope = 0;
   bool have_scope = false;
 
   {


Index: .cvsignore
===================================================================
RCS file: /cvs/pkgs/rpms/snmp++/devel/.cvsignore,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- .cvsignore	23 Nov 2008 04:21:16 -0000	1.1
+++ .cvsignore	23 Nov 2008 05:23:46 -0000	1.2
@@ -0,0 +1 @@
+snmp++v3.2.23.tar.gz


Index: sources
===================================================================
RCS file: /cvs/pkgs/rpms/snmp++/devel/sources,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- sources	23 Nov 2008 04:21:16 -0000	1.1
+++ sources	23 Nov 2008 05:23:46 -0000	1.2
@@ -0,0 +1 @@
+a8b0e51fbf20e436999781b7f5ea187b  snmp++v3.2.23.tar.gz




More information about the scm-commits mailing list