rubygem-childprocess/rubygem-childprocess.spec
chen-jan 2cfd0c8ec9 fix build error by upgrading to ruby3
(cherry picked from commit 338907f235eb730548c956dce46f3145f0b04aa0)
2022-03-23 10:54:04 +08:00

68 lines
2.0 KiB
RPMSpec

%global gem_name childprocess
Summary: A simple and reliable gem for controlling external programs
Name: rubygem-%{gem_name}
Version: 0.5.9
Release: 2
License: MIT
URL: http://github.com/enkessler/childprocess
Source0: http://rubygems.org/gems/%{gem_name}-%{version}.gem
Patch1: Rewrite-unix-fork-reopen-to-be-compatible-with-ruby-.patch
BuildRequires: rubygems-devel rubygem(rspec) >= 3 rubygem(did_you_mean)
BuildArch: noarch
%description
This gem aims at being a simple and reliable solution for controlling external
programs running in the background on any Ruby / OS combination.
%package doc
Summary: Documentation for %{name}
Requires: %{name} = %{version}-%{release}
BuildArch: noarch
%description doc
Documentation for %{name}
%prep
%setup -q -n %{gem_name}-%{version}
%patch1 -p1
%build
gem build ../%{gem_name}-%{version}.gemspec
%gem_install
%install
mkdir -p %{buildroot}%{gem_dir}
cp -a .%{gem_dir}/* %{buildroot}%{gem_dir}/
rm -f %{buildroot}%{gem_instdir}/.document %{buildroot}%{gem_instdir}/.gitignore
rm -f %{buildroot}%{gem_instdir}/.rspec %{buildroot}%{gem_instdir}/Rakefile
rm -f %{buildroot}%{gem_instdir}/.travis.yml
rm -f %{buildroot}%{gem_instdir}/childprocess.gemspec
rm -f %{buildroot}%{gem_instdir}/Gemfile
chmod 644 %{buildroot}%{gem_libdir}/childprocess/jruby/process.rb
chmod 644 %{buildroot}%{gem_libdir}/childprocess/windows/process.rb
chmod 644 %{buildroot}%{gem_instdir}/spec/*.rb
%check
pushd .%{gem_instdir}
sed -i -e '5,6d' spec/spec_helper.rb
rspec spec
popd
%files
%doc %{gem_instdir}/LICENSE
%{gem_libdir}
%dir %{gem_instdir}
%{gem_cache}
%{gem_spec}
%files doc
%doc %{gem_instdir}/README.md
%{gem_instdir}/spec
%doc %doc %{gem_docdir}
%changelog
* Tue Feb 22 2022 chenchen <chen_aka_jan@163.com> - 0.5.9-2
- fix build error caused by upgrading to ruby3
* Tue Aug 18 2020 wanglin <wanglin175@huawei.com> - 0.5.9-1
- package init