!5 rename sub package

Merge pull request !5 from lkx690/master
This commit is contained in:
openeuler-ci-bot 2020-03-12 09:25:32 +08:00 committed by Gitee
commit 3f413fe3d7

View File

@ -1,30 +1,26 @@
%bcond_with pam
# RubyGems's macros expect gem_name to exist.
%global gem_name %{name}
Name: openwsman
Version: 2.6.5
Release: 11
Summary: Opensource Implementation of WS-Management
License: BSD
URL: http://www.openwsman.org/
Source0: https://github.com/Openwsman/openwsman/archive/v%{version}.tar.gz
Source1: openwsmand.8.gz
Source2: openwsmand.service
Source3: owsmantestcert.sh
%if %{with pam}
Patch1: openwsman-2.4.0-pamsetup.patch
%endif
Patch2: openwsman-2.4.12-ruby-binding-build.patch
Patch3: openwsman-2.6.2-openssl-1.1-fix.patch
Patch4: openwsman-2.6.5-fix-set-cipher-list-retval-check.patch
Patch5: openwsman-2.6.5-libcurl-error-codes-update.patch
Patch6000: CVE-2019-3833.patch
Name: openwsman
Version: 2.6.5
Release: 12
Summary: Opensource Implementation of WS-Management
License: BSD
URL: http://www.openwsman.org/
Source0: https://github.com/Openwsman/openwsman/archive/v%{version}.tar.gz
Source1: openwsmand.8.gz
Source2: openwsmand.service
Source3: owsmantestcert.sh
Patch1: openwsman-2.4.0-pamsetup.patch
Patch2: openwsman-2.4.12-ruby-binding-build.patch
Patch3: openwsman-2.6.2-openssl-1.1-fix.patch
Patch4: openwsman-2.6.5-fix-set-cipher-list-retval-check.patch
Patch5: openwsman-2.6.5-libcurl-error-codes-update.patch
Patch6000: CVE-2019-3833.patch
BuildRequires: swig libcurl-devel libxml2-devel pam-devel sblim-sfcc-devel python3
BuildRequires: python3-devel ruby ruby-devel rubygems-devel perl-interpreter
BuildRequires: perl-devel perl-generators pkgconfig openssl-devel
BuildRequires: perl-devel perl-generators pkgconfig openssl-devel libwsman-devel
BuildRequires: cmake systemd-units gcc gcc-c++ python2 python2-devel
@ -50,10 +46,8 @@ Requires: libwsman1 = %{version}-%{release}
Requires: %{name}-server = %{version}-%{release}
Requires: %{name}-client = %{version}-%{release}
Requires: sblim-sfcc-devel libxml2-devel libcurl-devel
%if %{with pam}
Requires: pam-devel
%endif
%description -n libwsman-devel
Opensource Implementation of WS-Management stack
(Development files)
@ -83,8 +77,7 @@ Requires: libwsman1 = %{version}-%{release}
%description python3
This package provides Python3 bindings to access the openwsman client API.
%if %{with pam}
%package ruby
%package -n rubygem-%{gem_name}
License: BSD
Summary: Ruby bindings for openwsman client API
Obsoletes: %{name}-ruby < %{version}-%{release}
@ -92,16 +85,14 @@ Obsoletes: %{name}-ruby < %{version}-%{release}
%description -n rubygem-%{gem_name}
This package provides Ruby bindings to access the openwsman client API.
%package ruby-docs
%package -n rubygem-%{gem_name}-doc
Summary: HTML documentation for Opendwsman Ruby bindings
BuildArch: noarch
%description ruby-docs
%description -n rubygem-%{gem_name}-doc
This package provides HTML documentation for the Openwsman Ruby
bindings.
%endif
%package perl
License: BSD
Requires: perl(:MODULE_COMPAT_%(eval "`%{__perl} -V:version`"; echo $version))
@ -144,32 +135,21 @@ cmake \
-DPACKAGE_ARCHITECTURE=`uname -m` \
-DLIB=%{_lib} \
-DBUILD_JAVA=no \
%if %{without pam}
-DBUILD_RUBY_GEM=no \
%endif
..
make
%if %{with pam}
# Make the freshly build openwsman libraries available to build the gem's
# binary extension.
export LIBRARY_PATH=%{_builddir}/%{name}-%{version}/build/src/lib
export CPATH=%{_builddir}/%{name}-%{version}/include/
export LD_LIBRARY_PATH=%{_builddir}/%{name}-%{version}/build/src/lib/
%endif
%if %{with pam}
%gem_install -n ./bindings/ruby/%{name}-%{version}.gem
%endif
%install
cd build
%if %{with pam}
# Do not install the ruby extension, we are proviging the rubygem- instead.
echo -n > bindings/ruby/cmake_install.cmake
%endif
%make_install
cd ..
@ -191,15 +171,12 @@ 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
%if %{with pam}
install -d %{buildroot}%{gem_dir}
cp -pa ./build%{gem_dir}/* %{buildroot}%{gem_dir}/
install -d %{buildroot}%{gem_extdir_mri}
cp -a ./build%{gem_extdir_mri}/{gem.build_complete,*.so} %{buildroot}%{gem_extdir_mri}/
%endif
%post -n libwsman1 -p /sbin/ldconfig
%postun -n libwsman1 -p /sbin/ldconfig
%post server
@ -223,22 +200,7 @@ rm -f /var/log/wsmand.log
%{_libdir}/libwsman.so.*
%{_libdir}/libwsman_client.so.*
%{_libdir}/libwsman_curl_client_transport.so.*
%if %{without pam}
%exclude %{_exec_prefix}/lib/debug/usr/lib64/ruby/vendor_ruby/_openwsman.so*
%exclude %{_libdir}/ruby/vendor_ruby/_openwsman.so
%exclude %{_datadir}/ruby/vendor_ruby/%{name}/%{name}.rb
%exclude %{_datadir}/ruby/vendor_ruby/%{name}/version.rb
%exclude %{_datadir}/ruby/vendor_ruby/%{name}/xmldoc.rb
%exclude %{_datadir}/ruby/vendor_ruby/%{name}/xmlnode.rb
%{_sysconfdir}/pam.d/openwsman
%{_exec_prefix}/lib/debug%{python2_sitearch}/_pywsman.so*
%{python2_sitearch}/_pywsman.so
%{python2_sitearch}/pywsman.py
%{python2_sitearch}/pywsman.pyc
%{python2_sitearch}/pywsman.pyo
%endif
%{python2_sitearch}/*
%files -n libwsman-devel
%{_includedir}/*
@ -246,14 +208,8 @@ rm -f /var/log/wsmand.log
%{_libdir}/*.so
%files python3
%if %{with pam}
%{python3_sitearch}/*.so
%{python3_sitearch}/*.py
%{python3_sitearch}/__pycache__/*
%endif
%if %{with pam}
%files ruby
%files -n rubygem-%{gem_name}
%dir %{gem_instdir}
%exclude %{gem_instdir}/ext
%{gem_libdir}
@ -261,12 +217,9 @@ rm -f /var/log/wsmand.log
%exclude %{gem_cache}
%{gem_spec}
%files ruby-docs
%files -n rubygem-%{gem_name}-doc
%doc %{gem_docdir}
%endif
%files perl
%{perl_vendorarch}/openwsman.so
%{perl_vendorlib}/openwsman.pm
@ -279,9 +232,7 @@ rm -f /var/log/wsmand.log
%config(noreplace) %{_sysconfdir}/openwsman/ssleay.cnf
%attr(0755,root,root) %{_sysconfdir}/openwsman/owsmangencert.sh
%attr(0755,root,root) %{_sysconfdir}/openwsman/owsmantestcert.sh
%if %{with pam}
%config(noreplace) %{_sysconfdir}/pam.d/openwsman
%endif
%{_unitdir}/openwsmand.service
%dir %{_libdir}/openwsman
%dir %{_libdir}/openwsman/authenticators
@ -305,6 +256,9 @@ rm -f /var/log/wsmand.log
%{_mandir}/man8/*
%changelog
* Mon Mar 9 2020 likexin <likexin4@huawei.com> - 2.6.5-12
- rename sub package
* Fri Feb 28 2020 likexin <likexin4@huawei.com> - 2.6.5-11
- update release