packages: openwsman/openwsman.spec, openwsman/openwsman-java.patch (NEW), o...

qboosh qboosh at pld-linux.org
Sat Oct 1 09:00:13 CEST 2011


Author: qboosh                       Date: Sat Oct  1 07:00:13 2011 GMT
Module: packages                      Tag: HEAD
---- Log message:
- added ruby,java patches, package java and ruby bindings (java needs fix)

---- Files affected:
packages/openwsman:
   openwsman.spec (1.5 -> 1.6) , openwsman-java.patch (NONE -> 1.1)  (NEW), openwsman-ruby.patch (NONE -> 1.1)  (NEW)

---- Diffs:

================================================================
Index: packages/openwsman/openwsman.spec
diff -u packages/openwsman/openwsman.spec:1.5 packages/openwsman/openwsman.spec:1.6
--- packages/openwsman/openwsman.spec:1.5	Fri Sep 30 18:13:28 2011
+++ packages/openwsman/openwsman.spec	Sat Oct  1 09:00:08 2011
@@ -1,8 +1,7 @@
 # $Revision$, $Date$
 # TODO:
 # - daemon init script
-# - fix and package java and ruby
-#
+# - where should arch-dependent .jar be packaged?
 Summary:	Implementation of the Web Services Management specification (WS-Management)
 Summary(pl.UTF-8):	Implementacja specyfikacji Web Services Management (WS-Management)
 Name:		openwsman
@@ -13,9 +12,12 @@
 Source0:	http://downloads.sourceforge.net/openwsman/%{name}-%{version}.tar.bz2
 # Source0-md5:	55b59e467630e00b958a0231942b686f
 Patch0:		%{name}-link.patch
+Patch1:		%{name}-ruby.patch
+Patch2:		%{name}-java.patch
 URL:		http://www.openwsman.org/project/openwsman
 BuildRequires:	cmake >= 2.4
 BuildRequires:	curl-devel >= 7.12.0
+BuildRequires:	jdk
 BuildRequires:	libstdc++-devel
 BuildRequires:	libxml2-devel >= 2.0
 BuildRequires:	openssl-devel
@@ -24,6 +26,7 @@
 BuildRequires:	pkgconfig
 BuildRequires:	python-devel
 BuildRequires:	rpmbuild(macros) >= 1.606
+BuildRequires:	ruby-devel >= 1.9
 BuildRequires:	sblim-sfcc-devel
 BuildRequires:	sed >= 4.0
 BuildRequires:	swig >= 1.3.30
@@ -78,6 +81,19 @@
 %description devel -l pl.UTF-8
 Pliki nagłówkowe openwsman.
 
+%package -n java-openwsman
+Summary:	Java bindings for openwsman libraries
+Summary(pl.UTF-8):	Wiązania Javy do bibliotek openwsman
+Group:		Libraries/Java
+Requires:	%{name}-libs = %{version}-%{release}
+Requires:	jre
+
+%description -n java-openwsman
+Java bindings for openwsman libraries.
+
+%description -n java-openwsman -l pl.UTF-8
+Wiązania Javy do bibliotek openwsman.
+
 %package -n perl-openwsman
 Summary:	Perl bindings for openwsman libraries
 Summary(pl.UTF-8):	Wiązania Perla do bibliotek openwsman
@@ -93,8 +109,9 @@
 %package -n python-openwsman
 Summary:	Python bindings for openwsman libraries
 Summary(pl.UTF-8):	Wiązania Pythona do bibliotek openwsman
-Group:		Development/Languages/Python
+Group:		Libraries/Python
 Requires:	%{name}-libs = %{version}-%{release}
+%pyrequires_eq	python-libs
 
 %description -n python-openwsman
 Python bindings for openwsman libraries.
@@ -102,18 +119,35 @@
 %description -n python-openwsman -l pl.UTF-8
 Wiązania Pythona do bibliotek openwsman.
 
+%package -n ruby-openwsman
+Summary:	Ruby bindings for openwsman libraries
+Summary(pl.UTF-8):	Wiązania języka Ruby do bibliotek openwsman
+Group:		Development/Languages
+Requires:	%{name}-libs = %{version}-%{release}
+Requires:	ruby
+
+%description -n ruby-openwsman
+Ruby bindings for openwsman libraries.
+
+%description -n ruby-openwsman -l pl.UTF-8
+Wiązania języka Ruby do bibliotek openwsman.
+
 %prep
 %setup -q
 %undos src/cpp/CMakeLists.txt
 %patch0 -p1
+%patch1 -p1
+%patch2 -p1
+
+%{__sed} -i -e 's,rubyio\.h,ruby/io.h,' \
+	bindings/openwsman.i \
+	src/plugins/swig/plugin.i
 
 %build
 install -d build
 cd build
 %cmake .. \
-	-DPACKAGE_ARCHITECTURE=%{_target_cpu} \
-	-DBUILD_JAVA=NO \
-	-DBUILD_RUBY=NO
+	-DPACKAGE_ARCHITECTURE=%{_target_cpu}
 
 %install
 rm -rf $RPM_BUILD_ROOT
@@ -173,6 +207,10 @@
 %{_pkgconfigdir}/openwsman++.pc
 %{_pkgconfigdir}/openwsman-server.pc
 
+%files -n java-openwsman
+%defattr(644,root,root,755)
+%{_javadir}/openwsman-%{_target_cpu}-%{version}.jar
+
 %files -n perl-openwsman
 %defattr(644,root,root,755)
 %attr(755,root,root) %{perl_vendorarch}/openwsman.so
@@ -183,12 +221,21 @@
 %attr(755,root,root) %{py_sitedir}/_pywsman.so
 %{py_sitedir}/pywsman.py[co]
 
+%files -n ruby-openwsman
+%defattr(644,root,root,755)
+%attr(755,root,root) %{ruby_sitearchdir}/openwsman.so
+%{ruby_sitelibdir}/openwsmanplugin.rb
+%{ruby_sitelibdir}/openwsman
+
 %define date	%(echo `LC_ALL="C" date +"%a %b %d %Y"`)
 %changelog
 * %{date} PLD Team <feedback at pld-linux.org>
 All persons listed below can be reached at <cvs_login>@pld-linux.org
 
 $Log$
+Revision 1.6  2011/10/01 07:00:08  qboosh
+- added ruby,java patches, package java and ruby bindings (java needs fix)
+
 Revision 1.5  2011/09/30 16:13:28  qboosh
 - separated -libs
 - package perl- and python-

================================================================
Index: packages/openwsman/openwsman-java.patch
diff -u /dev/null packages/openwsman/openwsman-java.patch:1.1
--- /dev/null	Sat Oct  1 09:00:13 2011
+++ packages/openwsman/openwsman-java.patch	Sat Oct  1 09:00:08 2011
@@ -0,0 +1,10 @@
+--- openwsman-2.2.6/bindings/java/CMakeLists.txt.orig	2011-04-20 13:23:03.000000000 +0200
++++ openwsman-2.2.6/bindings/java/CMakeLists.txt	2011-10-01 08:29:33.064604676 +0200
+@@ -34,6 +34,7 @@
+    COMMAND ${CMAKE_COMMAND} -E echo_append "Creating JAR ..."
+    COMMAND ${JAVA_ARCHIVE} cvf ${jar_NAME} *.so org/*
+    DEPENDS ${SWIG_OUTPUT}
++   DEPENDS jwsman
+ )
+ 
+ ADD_CUSTOM_TARGET ( jwsman_all ALL

================================================================
Index: packages/openwsman/openwsman-ruby.patch
diff -u /dev/null packages/openwsman/openwsman-ruby.patch:1.1
--- /dev/null	Sat Oct  1 09:00:13 2011
+++ packages/openwsman/openwsman-ruby.patch	Sat Oct  1 09:00:08 2011
@@ -0,0 +1,75 @@
+--- openwsman-2.2.6/bindings/ruby/helpers.c.orig	2011-04-20 13:23:03.000000000 +0200
++++ openwsman-2.2.6/bindings/ruby/helpers.c	2011-09-30 21:40:44.696634545 +0200
+@@ -147,7 +147,7 @@
+     VALUE result = rb_funcall( TRANSPORT_CLASS.klass, rb_intern( "auth_request_callback" ), 2, c, INT2NUM( t ) );
+ 
+     if (CLASS_OF( result ) == rb_cArray) {
+-	if (RARRAY(result)->len == 2 ) {
++	if (RARRAY_LEN(result) == 2 ) {
+ 	    VALUE first = rb_ary_entry( result, 0 );
+ 	    VALUE second = rb_ary_entry( result, 1 );
+ 	    if ((TYPE( first ) == T_STRING)
+--- openwsman-2.2.6/src/plugins/swig/src/target_ruby.c.orig	2011-04-20 13:23:04.000000000 +0200
++++ openwsman-2.2.6/src/plugins/swig/src/target_ruby.c	2011-10-01 07:06:25.661104347 +0200
+@@ -284,7 +284,7 @@
+ 	  return 1;
+ 	}
+   
+-      len = RARRAY(resulta)->len;
++      len = RARRAY_LEN(resulta);
+       if (len > 0) 
+ 	{
+ 	  VALUE code = rb_ary_entry(resulta, 0);
+@@ -375,24 +375,24 @@
+     if (NIL_P(ary)) {
+       rb_raise( rb_eArgError, "namespaces is not array", klass);
+     }
+-    int len = RARRAY(ary)->len;
++    int len = RARRAY_LEN(ary);
+     if (len <= 0) {
+       rb_raise( rb_eArgError, "namespaces returned array with %d elements", klass, len);
+     }
+     int i;
+     for (i = 0; i < len; ++i) {
+       lnode_t *node;
+-      VALUE elem = RARRAY(ary)->ptr[i];
++      VALUE elem = RARRAY_PTR(ary)[i];
+       VALUE pair = rb_check_array_type( elem );
+       if (NIL_P(pair)) {
+ 	rb_raise( rb_eArgError, "namespaces must return array of arrays", klass);
+       }
+-      if (RARRAY(pair)->len != 2) {
++      if (RARRAY_LEN(pair) != 2) {
+ 	rb_raise( rb_eArgError, "namespaces must return array of ['<namespace>','<class_prefix>']", klass);
+       }
+       WsSupportedNamespaces *ns = (WsSupportedNamespaces *)u_malloc(sizeof(WsSupportedNamespaces));
+-      ns->ns = StringValuePtr( RARRAY(pair)->ptr[0] );
+-      ns->class_prefix = StringValuePtr( RARRAY(pair)->ptr[1] );
++      ns->ns = StringValuePtr( RARRAY_PTR(pair)[0] );
++      ns->class_prefix = StringValuePtr( RARRAY_PTR(pair)[1] );
+       node = lnode_create(ns);
+       list_append(namespaces, node);
+     }
+--- openwsman-2.2.6/bindings/ruby/CMakeLists.txt.orig	2011-04-20 13:23:03.000000000 +0200
++++ openwsman-2.2.6/bindings/ruby/CMakeLists.txt	2011-10-01 06:34:06.741039424 +0200
+@@ -58,20 +58,6 @@
+ 	PATTERN ".svn" EXCLUDE
+ 	PATTERN "Makefile.am" EXCLUDE)
+ 
+-# rdoc
+-SET(rdoc_dir "${CMAKE_CURRENT_BINARY_DIR}/html")
+-ADD_CUSTOM_COMMAND (
+-   OUTPUT ${rdoc_dir}
+-   COMMAND ${CMAKE_COMMAND} -E echo_append "Creating rdoc documentation ..."
+-   COMMAND rm -rf ${rdoc_dir}
+-   COMMAND ${CMAKE_CURRENT_SOURCE_DIR}/rdoc -o ${rdoc_dir} openwsman.i *.i
+-   COMMAND ${CMAKE_COMMAND} -E echo "Done."
+-   WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}/bindings
+-   DEPENDS ${CMAKE_SOURCE_DIR}/bindings/*.i
+-)
+-ADD_CUSTOM_TARGET(ruby_rdoc ALL DEPENDS "${rdoc_dir}")
+-ADD_DEPENDENCIES(ruby_rdoc rbwsman)
+-
+ #
+ # Leave this to %doc in the .spec file
+ #INSTALL(DIRECTORY "${rdoc_dir}" DESTINATION ${DOC_INSTALL_DIR})
================================================================

---- CVS-web:
    http://cvs.pld-linux.org/cgi-bin/cvsweb.cgi/packages/openwsman/openwsman.spec?r1=1.5&r2=1.6&f=u



More information about the pld-cvs-commit mailing list