加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
rubygem-gem2rpm.spec 2.06 KB
一键复制 编辑 原始数据 按行查看 历史
algorithmofdish 提交于 2020-03-06 18:07 . package init
%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
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化