2020-08-26 14:26:37 +08:00
|
|
|
%global gem_name thor
|
2022-03-04 14:29:52 +08:00
|
|
|
|
2023-08-11 10:14:05 +08:00
|
|
|
Name: rubygem-%{gem_name}
|
|
|
|
|
Version: 1.2.1
|
|
|
|
|
Release: 1
|
|
|
|
|
Summary: Thor is a toolkit for building powerful command-line interfaces
|
|
|
|
|
License: MIT
|
|
|
|
|
URL: http://whatisthor.com/
|
|
|
|
|
Source0: https://rubygems.org/gems/%{gem_name}-%{version}.gem
|
|
|
|
|
Source1: %{gem_name}-%{version}-spec.txz
|
|
|
|
|
|
|
|
|
|
Patch0: rubygem-thor-1.2.1-Fix-expectations-for-ruby-3-treatment-of-hash-arg.patch
|
|
|
|
|
Patch1: rubygem-thor-1.2.1-Fix-rspec-mocks-3.11.0-compatibility.patch
|
|
|
|
|
Patch2: rubygem-thor-1.2.1-did_you_mean-ruby32.patch
|
|
|
|
|
|
|
|
|
|
Requires: rubygem(io-console)
|
|
|
|
|
BuildRequires: ruby(release)
|
|
|
|
|
BuildRequires: rubygems-devel
|
|
|
|
|
BuildRequires: ruby
|
|
|
|
|
BuildRequires: rubygem(io-console)
|
|
|
|
|
BuildRequires: rubygem(rake)
|
|
|
|
|
BuildRequires: rubygem(rspec)
|
|
|
|
|
BuildRequires: rubygem(webmock)
|
|
|
|
|
BuildRequires: rubygem(did_you_mean)
|
|
|
|
|
BuildRequires: git
|
|
|
|
|
BuildArch: noarch
|
2022-03-04 14:29:52 +08:00
|
|
|
|
2020-08-26 14:26:37 +08:00
|
|
|
%description
|
|
|
|
|
Thor is a toolkit for building powerful command-line interfaces.
|
|
|
|
|
|
2022-03-04 14:29:52 +08:00
|
|
|
%package doc
|
|
|
|
|
Summary: Documentation for %{name}
|
|
|
|
|
Requires: %{name} = %{version}-%{release}
|
|
|
|
|
BuildArch: noarch
|
|
|
|
|
|
2023-08-11 10:14:05 +08:00
|
|
|
%description doc
|
2020-08-26 14:26:37 +08:00
|
|
|
Documentation for %{name}.
|
|
|
|
|
|
|
|
|
|
%prep
|
2022-03-04 14:29:52 +08:00
|
|
|
%setup -q -n %{gem_name}-%{version} -b1
|
2020-08-26 14:26:37 +08:00
|
|
|
|
2023-08-11 10:14:05 +08:00
|
|
|
%patch2 -p1
|
2022-06-29 18:00:38 +08:00
|
|
|
pushd %{_builddir}
|
|
|
|
|
%patch0 -p1
|
2023-01-17 10:34:01 +08:00
|
|
|
%patch1 -p1
|
2023-08-11 10:14:05 +08:00
|
|
|
popd
|
2023-01-17 10:34:01 +08:00
|
|
|
|
2020-08-26 14:26:37 +08:00
|
|
|
%build
|
|
|
|
|
gem build ../%{gem_name}-%{version}.gemspec
|
|
|
|
|
%gem_install
|
|
|
|
|
|
|
|
|
|
%install
|
|
|
|
|
mkdir -p %{buildroot}%{gem_dir}
|
|
|
|
|
cp -a .%{gem_dir}/* \
|
|
|
|
|
%{buildroot}%{gem_dir}/
|
2022-03-04 14:29:52 +08:00
|
|
|
|
|
|
|
|
|
2020-08-26 14:26:37 +08:00
|
|
|
mkdir -p %{buildroot}%{_bindir}
|
|
|
|
|
cp -a .%{_bindir}/* \
|
|
|
|
|
%{buildroot}%{_bindir}/
|
2022-03-04 14:29:52 +08:00
|
|
|
|
2020-08-26 14:26:37 +08:00
|
|
|
find %{buildroot}%{gem_instdir}/bin -type f | xargs chmod a+x
|
2022-03-04 14:29:52 +08:00
|
|
|
|
2020-08-26 14:26:37 +08:00
|
|
|
find %{buildroot}%{gem_instdir}/bin -type f | \
|
|
|
|
|
xargs -n 1 sed -i -e 's"^#!/usr/bin/env ruby"#!/usr/bin/ruby"'
|
|
|
|
|
|
|
|
|
|
%check
|
|
|
|
|
pushd .%{gem_instdir}
|
2022-03-04 14:29:52 +08:00
|
|
|
cp -r %{_builddir}/spec .
|
2020-08-26 14:26:37 +08:00
|
|
|
sed -i '/simplecov/,/end/ s/^/#/' spec/helper.rb
|
2022-03-04 14:29:52 +08:00
|
|
|
LC_ALL=C.UTF-8 rspec -rreadline spec
|
2020-08-26 14:26:37 +08:00
|
|
|
popd
|
|
|
|
|
|
|
|
|
|
%files
|
|
|
|
|
%dir %{gem_instdir}
|
|
|
|
|
%{_bindir}/thor
|
|
|
|
|
%license %{gem_instdir}/LICENSE.md
|
|
|
|
|
%{gem_instdir}/bin
|
|
|
|
|
%{gem_libdir}
|
|
|
|
|
%exclude %{gem_instdir}/.document
|
|
|
|
|
%exclude %{gem_cache}
|
|
|
|
|
%{gem_spec}
|
|
|
|
|
|
|
|
|
|
%files doc
|
|
|
|
|
%doc %{gem_docdir}
|
|
|
|
|
%doc %{gem_instdir}/CONTRIBUTING.md
|
|
|
|
|
%doc %{gem_instdir}/README.md
|
|
|
|
|
%{gem_instdir}/thor.gemspec
|
|
|
|
|
|
|
|
|
|
%changelog
|
2023-08-11 10:14:05 +08:00
|
|
|
* Thu Aug 10 2023 wubijie <wubijie@kylinos.cn> - 1.2.1-1
|
|
|
|
|
- Upgrade to version 1.2.1
|
|
|
|
|
|
2023-01-17 10:34:01 +08:00
|
|
|
* Tue Jan 17 2023 yaoxin <yaoxin30@h-partners.com> - 1.1.0-4
|
|
|
|
|
- Fix build failed due to ruby update to 3.1.3
|
|
|
|
|
|
2022-06-29 18:00:38 +08:00
|
|
|
* Wed Jun 29 2022 liyanan <liyanan32@h-partners.com> - 1.1.0-3
|
|
|
|
|
- Fix build failed with rubygem-rspec-mocks
|
|
|
|
|
|
2022-04-14 15:03:49 +08:00
|
|
|
* Wed Mar 30 2022 ouyangminxiang <ouyangminxiang@kylinsec.com.cn> - 1.1.0-2
|
|
|
|
|
- add BuildRequires: rubygem-bigdecimal rubygem-io-console rubygem-openssl rubygem-psych
|
|
|
|
|
to resolve koji build error during check
|
|
|
|
|
|
2022-03-15 00:58:12 +00:00
|
|
|
* Fri Mar 04 2022 wangkerong <wangkerong@h-partners.com> - 1.1.0-1
|
2022-03-04 14:29:52 +08:00
|
|
|
- Upgrade to 1.1.0
|
|
|
|
|
|
2020-09-05 18:01:31 +08:00
|
|
|
* Sat Sep 5 2020 liyanan <liyanan32@huawei.com> - 0.20.3-2
|
|
|
|
|
- fix build fail
|
|
|
|
|
|
2020-08-26 14:26:37 +08:00
|
|
|
* Mon Aug 10 2020 yanan li <liyanan032@huawei.com> - 0.20.3-1
|
|
|
|
|
- Package init
|
2023-08-11 10:14:05 +08:00
|
|
|
|