代码拉取完成,页面将自动刷新
%global gem_name gem2rpm
%global debug_package %{nil}
Name: rubygem-gem2rpm
Version: 1.0.1
Release: 1
Summary: Generate rpm specfiles from gems
License: GPLv2+
URL: https://github.com/fedora-ruby/gem2rpm
Source0: https://rubygems.org/gems/gem2rpm-%{version}.gem
Source1: gem2rpm-%{version}-tests.tgz
# Fix Ruby 2.6 test failure.
# https://github.com/rubygems/rubygems/issues/2627
# https://github.com/fedora-ruby/gem2rpm/pull/99/commits/4b40d342761a3fdc402fbddccccaa99f38c50ddd
Patch0: sort-dependencies-in-the-test-case.patch
BuildRequires: ruby rubygems-devel rubygem-minitest rpmdevtools
Requires: rpmdevtools
%description
Generate source rpms and rpm spec files from a Ruby Gem. The spec file
tries to follow the gem as closely as possible, and be compliant with the
Fedora rubygem packaging guidelines.
%package doc
Summary: Documentation for %{name}
BuildArch: noarch
Requires: %{name} = %{version}-%{release}
%description doc
Documentation for %{name}.
%prep
%setup -q -n gem2rpm-%{version}
%build
# Create the gem as gem install only works on a gem file
gem build ../gem2rpm-%{version}.gemspec
# %%gem_install compiles any C extensions and installs the gem into ./%%gem_dir
# by default, so that we can move it into the buildroot in %%install
%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 xzvf %{SOURCE1}
cat %{PATCH0} | patch -p1
TEST_GEM2RPM_LOCAL=1 ruby -Itest -e 'Dir.glob "./test/**/test_*.rb", &method(:require)'
popd
%files
%dir %{gem_instdir}
%doc %{gem_instdir}/README.md
%doc %{gem_instdir}/AUTHORS
%license %{gem_instdir}/LICENSE
%{_bindir}/gem2rpm
%{gem_instdir}/bin
%{gem_libdir}
%{gem_instdir}/templates
%{gem_spec}
%exclude %{gem_cache}
%files doc
%doc %{gem_docdir}
%changelog
* Fri Mar 6 2020 hexiujun <hexiujun1@huawei.com> - 1.0.1-1
- Package init
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。