enable ruby binding again
This commit is contained in:
parent
3cafe13c83
commit
ad0f62e8b0
12
openwsman-2.4.12-ruby-binding-build.patch
Normal file
12
openwsman-2.4.12-ruby-binding-build.patch
Normal file
@ -0,0 +1,12 @@
|
||||
diff -up openwsman-2.4.12/bindings/ruby/extconf.rb.orig openwsman-2.4.12/bindings/ruby/extconf.rb
|
||||
--- openwsman-2.4.12/bindings/ruby/extconf.rb.orig 2015-02-09 09:28:58.232581263 +0100
|
||||
+++ openwsman-2.4.12/bindings/ruby/extconf.rb 2015-02-09 09:38:22.836772879 +0100
|
||||
@@ -32,7 +32,7 @@ swig = find_executable("swig")
|
||||
raise "SWIG not found" unless swig
|
||||
|
||||
major, minor, path = RUBY_VERSION.split(".")
|
||||
-raise "SWIG failed to run" unless system("#{swig} -ruby -autorename -DRUBY_VERSION=#{major}#{minor} -I. -I/usr/include/openwsman -o openwsman_wrap.c openwsman.i")
|
||||
+raise "SWIG failed to run" unless system("#{swig} -ruby -autorename -DRUBY_VERSION=#{major}#{minor} -I. -I/usr/include/openwsman -I/builddir/build/BUILD/openwsman-2.4.12/include/ -o openwsman_wrap.c openwsman.i")
|
||||
|
||||
$CPPFLAGS = "-I/usr/include/openwsman -I.."
|
||||
|
108
openwsman.spec
108
openwsman.spec
@ -4,13 +4,15 @@
|
||||
%{!?python_sitearch: %global python_sitearch %(%{__python} -c "from distutils.sysconfig import get_python_lib; print(get_python_lib(1))")}
|
||||
%endif
|
||||
|
||||
# RubyGems's macros expect gem_name to exist.
|
||||
%global gem_name %{name}
|
||||
|
||||
Name: openwsman
|
||||
BuildRequires: swig
|
||||
BuildRequires: libcurl-devel libxml2-devel pam-devel sblim-sfcc-devel
|
||||
BuildRequires: python python-devel ruby ruby-devel rubygems-devel perl
|
||||
BuildRequires: python python-devel perl
|
||||
BuildRequires: perl-devel pkgconfig openssl-devel
|
||||
#BuildRequires: java-1.8.0-openjdk-devel
|
||||
BuildRequires: cmake
|
||||
BuildRequires: systemd-units
|
||||
Version: 2.4.12
|
||||
@ -19,8 +21,9 @@ Url: http://www.openwsman.org/
|
||||
License: BSD
|
||||
Group: Applications/System
|
||||
Summary: Open source Implementation of WS-Management
|
||||
Source: https://github.com/Openwsman/openwsman/archive/%{name}-%{version}.tar.gz
|
||||
#Source: https://github.com/Openwsman/openwsman/archive/v%{version}.tar.gz
|
||||
# You can get this tarball here:
|
||||
# https://github.com/Openwsman/openwsman/archive/v2.4.12.tar.gz
|
||||
Source: %{name}-%{version}.tar.gz
|
||||
# help2man generated manpage for openwsmand binary
|
||||
Source1: openwsmand.8.gz
|
||||
# service file for systemd
|
||||
@ -29,6 +32,7 @@ Source2: openwsmand.service
|
||||
Source3: owsmantestcert.sh
|
||||
Patch1: openwsman-2.2.7-libssl.patch
|
||||
Patch2: openwsman-2.4.0-pamsetup.patch
|
||||
Patch3: openwsman-2.4.12-ruby-binding-build.patch
|
||||
|
||||
%description
|
||||
Openwsman is a project intended to provide an open-source
|
||||
@ -113,34 +117,25 @@ API.
|
||||
|
||||
|
||||
|
||||
#%package -n rubygem-%{gem_name}
|
||||
#License: BSD
|
||||
#Group: Development/Libraries
|
||||
#Summary: Ruby client bindings for Openwsman
|
||||
#Obsoletes: %{name}-ruby < %{version}-%{release}
|
||||
#
|
||||
#%description -n rubygem-%{gem_name}
|
||||
#The openwsman gem provides a Ruby API to manage systems using
|
||||
#the WS-Management protocol.
|
||||
#
|
||||
#%package -n rubygem-%{gem_name}-doc
|
||||
#Summary: Documentation for %{name}
|
||||
#Group: Documentation
|
||||
#Requires: rubygem-%{gem_name} = %{version}-%{release}
|
||||
#BuildArch: noarch
|
||||
#
|
||||
#%description -n rubygem-%{gem_name}-doc
|
||||
#Documentation for rubygem-%{gem_name}
|
||||
%package -n rubygem-%{gem_name}
|
||||
License: BSD
|
||||
Group: Development/Libraries
|
||||
Summary: Ruby client bindings for Openwsman
|
||||
Obsoletes: %{name}-ruby < %{version}-%{release}
|
||||
|
||||
%description -n rubygem-%{gem_name}
|
||||
The openwsman gem provides a Ruby API to manage systems using
|
||||
the WS-Management protocol.
|
||||
|
||||
#%package java
|
||||
#Requires: java
|
||||
#Requires: libwsman1 = %{version}
|
||||
#Summary: Java bindings for openwsman client API
|
||||
#Group: Development/Libraries
|
||||
%package -n rubygem-%{gem_name}-doc
|
||||
Summary: Documentation for %{name}
|
||||
Group: Documentation
|
||||
Requires: rubygem-%{gem_name} = %{version}-%{release}
|
||||
BuildArch: noarch
|
||||
|
||||
%description -n rubygem-%{gem_name}-doc
|
||||
Documentation for rubygem-%{gem_name}
|
||||
|
||||
#%description java
|
||||
#This package provides Java bindings to access the openwsman client API.
|
||||
|
||||
|
||||
|
||||
@ -161,6 +156,14 @@ This package provides Perl bindings to access the openwsman client API.
|
||||
%setup -q
|
||||
%patch1 -p1 -b .libssl
|
||||
%patch2 -p1 -b .pamsetup
|
||||
%patch3 -p1 -b .ruby-binding-build
|
||||
|
||||
# support ruby 2.2
|
||||
pushd bindings/ruby
|
||||
cat rdoc2.1 | sed -e 's|rdoc2_1|rdoc2_2|' > rdoc2.2
|
||||
chmod 0755 rdoc2.2
|
||||
ln -sf %{_bindir}/rdoc rdoc2_2.rb
|
||||
popd
|
||||
|
||||
%build
|
||||
# Removing executable permissions on .c and .h files to fix rpmlint warnings.
|
||||
@ -183,21 +186,31 @@ cmake \
|
||||
-DCMAKE_SKIP_RPATH=1 \
|
||||
-DPACKAGE_ARCHITECTURE=`uname -m` \
|
||||
-DLIB=%{_lib} \
|
||||
-DBUILD_RUBY=no \
|
||||
-DBUILD_RUBY_GEM=no \
|
||||
..
|
||||
|
||||
make CFLAGS="-DSSL_LIB='\"$SSL_LIB\"'"
|
||||
|
||||
# Make the freshly build openwsman libraries available to build the gem's
|
||||
# binary extension.
|
||||
export LIBRARY_PATH=/builddir/build/BUILD/%{name}-%{version}/build/src/lib
|
||||
export CPATH=/builddir/build/BUILD/%{name}-%{version}/include/
|
||||
export LD_LIBRARY_PATH=/builddir/build/BUILD/%{name}-%{version}/build/src/lib/
|
||||
|
||||
%gem_install -n ./bindings/ruby/%{name}-%{version}.gem
|
||||
|
||||
%install
|
||||
cd build
|
||||
|
||||
# Do not install the ruby extension, we are proviging the rubygem- instead.
|
||||
echo -n > bindings/ruby/cmake_install.cmake
|
||||
|
||||
make DESTDIR=%{buildroot} install
|
||||
cd ..
|
||||
rm -f %{buildroot}/%{_libdir}/*.la
|
||||
rm -f %{buildroot}/%{_libdir}/openwsman/plugins/*.la
|
||||
rm -f %{buildroot}/%{_libdir}/openwsman/authenticators/*.la
|
||||
[ -d %{buildroot}/%{ruby_vendorlibdir} ] && rm -f %{buildroot}/%{ruby_vendorlibdir}/openwsmanplugin.rb
|
||||
[ -d %{buildroot}/%{ruby_vendorlibdir} ] && rm -f %{buildroot}/%{ruby_vendorlibdir}/openwsman.rb
|
||||
mkdir -p %{buildroot}%{_sysconfdir}/init.d
|
||||
install -m 644 etc/openwsman.conf %{buildroot}/%{_sysconfdir}/openwsman
|
||||
install -m 644 etc/openwsman_client.conf %{buildroot}/%{_sysconfdir}/openwsman
|
||||
@ -213,6 +226,15 @@ install -m 644 include/wsman-xml.h %{buildroot}/%{_includedir}/openwsman
|
||||
install -m 644 include/wsman-xml-binding.h %{buildroot}/%{_includedir}/openwsman
|
||||
install -m 644 include/wsman-dispatcher.h %{buildroot}/%{_includedir}/openwsman
|
||||
|
||||
mkdir -p %{buildroot}%{gem_dir}
|
||||
cp -pa ./build%{gem_dir}/* \
|
||||
%{buildroot}%{gem_dir}/
|
||||
|
||||
rm -rf %{buildroot}%{gem_instdir}/ext
|
||||
|
||||
mkdir -p %{buildroot}%{gem_extdir_mri}
|
||||
cp -a ./build%{gem_extdir_mri}/{gem.build_complete,*.so} %{buildroot}%{gem_extdir_mri}/
|
||||
|
||||
%post -n libwsman1 -p /sbin/ldconfig
|
||||
|
||||
%postun -n libwsman1 -p /sbin/ldconfig
|
||||
@ -252,21 +274,16 @@ rm -f /var/log/wsmand.log
|
||||
%{python_sitearch}/*.pyo
|
||||
%doc AUTHORS COPYING ChangeLog README.md
|
||||
|
||||
#%files -n rubygem-%{gem_name}
|
||||
#%doc AUTHORS COPYING ChangeLog README.md
|
||||
#%dir %{gem_instdir}
|
||||
#%{gem_libdir}
|
||||
#%{gem_extdir_mri}
|
||||
#%exclude %{gem_cache}
|
||||
#%{gem_spec}
|
||||
|
||||
#%files -n rubygem-%{gem_name}-doc
|
||||
#%doc %{gem_docdir}
|
||||
|
||||
#%files java
|
||||
#%defattr(-,root,root)
|
||||
#%{_javadir}/*jar
|
||||
%files -n rubygem-%{gem_name}
|
||||
%doc AUTHORS COPYING ChangeLog README.md
|
||||
%dir %{gem_instdir}
|
||||
%{gem_libdir}
|
||||
%{gem_extdir_mri}
|
||||
%exclude %{gem_cache}
|
||||
%{gem_spec}
|
||||
|
||||
%files -n rubygem-%{gem_name}-doc
|
||||
%doc %{gem_docdir}
|
||||
|
||||
%files perl
|
||||
%{perl_vendorarch}/openwsman.so
|
||||
@ -302,9 +319,8 @@ rm -f /var/log/wsmand.log
|
||||
|
||||
|
||||
%changelog
|
||||
* Thu Feb 05 2015 Vitezslav Crhonek <vcrhonek@redhat.com> - 2.4.12-1
|
||||
* Mon Feb 09 2015 Vitezslav Crhonek <vcrhonek@redhat.com> - 2.4.12-1
|
||||
- Update to openwsman-2.4.12
|
||||
- Disable ruby
|
||||
|
||||
* Sat Jan 17 2015 Mamoru TASAKA <mtasaka@fedoraproject.org> - 2.4.6-5
|
||||
- Rebuild for https://fedoraproject.org/wiki/Changes/Ruby_2.2
|
||||
|
Loading…
Reference in New Issue
Block a user