rubygem-pry/rubygem-pry.spec

79 lines
2.2 KiB
RPMSpec
Raw Normal View History

2020-08-28 12:09:05 +08:00
%global gem_name pry
Name: rubygem-%{gem_name}
2023-11-16 15:39:56 +08:00
Version: 0.14.2
Release: 1
2020-08-28 12:09:05 +08:00
Summary: An IRB alternative and runtime developer console
License: MIT
URL: https://rubygems.org/gems/pry
Source0: https://rubygems.org/gems/%{gem_name}-%{version}.gem
Source1: https://github.com/pry/%{gem_name}/archive/v%{version}.tar.gz
BuildRequires: ruby(release) rubygems-devel ruby rubygem(rspec) rubygem(coderay) => 1.1.0
2023-11-16 15:39:56 +08:00
BuildRequires: rubygem(did_you_mean) ruby-irb
BuildRequires: rubygem(slop) => 3.4 rubygem(method_source) => 0.8.1 vi rubygem(bundler)
2020-08-28 12:09:05 +08:00
BuildArch: noarch
%description
An IRB alternative and runtime developer console.
%package doc
Summary: Documentation for %{name}
Requires: %{name} = %{version}-%{release}
BuildArch: noarch
%description doc
Documentation for %{name}.
%prep
gem unpack %{SOURCE0}
%setup -q -D -T -n %{gem_name}-%{version}
gem spec %{SOURCE0} -l --ruby > %{gem_name}.gemspec
%build
gem build %{gem_name}.gemspec
%gem_install
%install
mkdir -p %{buildroot}%{gem_dir}
cp -a .%{gem_dir}/* \
%{buildroot}%{gem_dir}/
mkdir -p %{buildroot}%{_bindir}
cp -a .%{_bindir}/* \
%{buildroot}%{_bindir}/
find %{buildroot}%{gem_instdir}/bin -type f | xargs chmod a+x
%check
pushd .%{gem_instdir}
tar xvf %{SOURCE1}
ln -s %{gem_name}-%{version}/spec spec
touch Rakefile
sed -i '/pry\/foo/ s/pry/pry-%{version}/' spec/cli_spec.rb
2023-11-16 15:39:56 +08:00
env COLUMNS=160 \
RUBYOPT=-rbundler rspec -rspec_helper spec
2020-08-28 12:09:05 +08:00
popd
%files
%{!?_licensedir:%global license %%doc}
%dir %{gem_instdir}
%{_bindir}/pry
%license %{gem_instdir}/LICENSE
%{gem_instdir}/bin
%{gem_libdir}
%exclude %{gem_cache}
%{gem_spec}
%files doc
%doc %{gem_docdir}
%doc %{gem_instdir}/CHANGELOG.md
%doc %{gem_instdir}/README.md
%changelog
2023-11-16 15:39:56 +08:00
* Thu Nov 16 2023 liyanan <liyanan61@h-partners.com> - 0.14.2-1
- Update to 0.14.2
* Tue Aug 01 2023 chenchen <chen_aka_jan@163.com> - 0.13.1-2
- fix build error for ruby upgrade to 3.2.2
* Mon Feb 21 2022 houyingchao <houyingchao@huawei.com> - 0.13.1-1
- Upgrade to 0.13.1 version
2020-08-28 12:09:05 +08:00
* Thu Aug 20 2020 luoshengwei <luoshengwei@huawei.com> - 0.10.4-1
- package init