59 lines
1.4 KiB
RPMSpec
59 lines
1.4 KiB
RPMSpec
|
|
%define gem_name fattr
|
||
|
|
Name: rubygem-%{gem_name}
|
||
|
|
Summary: Fatter attribute for Ruby
|
||
|
|
Version: 2.2.2
|
||
|
|
Release: 1
|
||
|
|
License: BSD or Ruby
|
||
|
|
URL: https://github.com/ahoward/fattr
|
||
|
|
Source0: https://rubygems.org/gems/%{gem_name}-%{version}.gem
|
||
|
|
BuildRequires: ruby(release) rubygems-devel rubygem(test-unit)
|
||
|
|
BuildArch: noarch
|
||
|
|
%description
|
||
|
|
The fattr gem is a Fatter attribute for Ruby
|
||
|
|
|
||
|
|
%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}/
|
||
|
|
|
||
|
|
%check
|
||
|
|
pushd .%{gem_instdir}
|
||
|
|
ruby -e 'Dir.glob "./test/**/*_test.rb", &method(:require)'
|
||
|
|
popd
|
||
|
|
|
||
|
|
%files
|
||
|
|
%doc %{gem_docdir}
|
||
|
|
%doc %{gem_instdir}/LICENSE
|
||
|
|
%dir %{gem_instdir}/
|
||
|
|
%{gem_libdir}
|
||
|
|
%exclude %{gem_cache}
|
||
|
|
%{gem_spec}
|
||
|
|
|
||
|
|
%files doc
|
||
|
|
%doc %{gem_docdir}
|
||
|
|
%doc %{gem_instdir}/Rakefile
|
||
|
|
%doc %{gem_instdir}/README
|
||
|
|
%doc %{gem_instdir}/README.erb
|
||
|
|
%doc %{gem_instdir}/samples
|
||
|
|
%doc %{gem_instdir}/test
|
||
|
|
|
||
|
|
%changelog
|
||
|
|
* Tue Aug 18 2020 wanglin <wanglin175@huawei.com> - 2.2.2-1
|
||
|
|
- package init
|