rubygem-hashdiff/rubygem-hashdiff.spec

60 lines
1.5 KiB
RPMSpec
Raw Normal View History

2020-08-21 09:40:12 +08:00
%global gem_name hashdiff
Name: rubygem-%{gem_name}
Version: 0.3.2
Release: 1
Summary: HashDiff is a diff lib to compute the smallest difference between two hashes
License: MIT
URL: https://github.com/liufengyun/hashdiff
Source0: https://rubygems.org/gems/hashdiff-%{version}.gem
BuildRequires: ruby(release) rubygems-devel ruby >= 1.8.7 rubygem(rspec)
BuildArch: noarch
%description
HashDiff is a diff lib to compute the smallest difference between two hashes.
%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}
rspec spec
popd
%files
%dir %{gem_instdir}
%exclude %{gem_instdir}/.*
%license %{gem_instdir}/LICENSE
%exclude %{gem_instdir}/hashdiff.gemspec
%{gem_libdir}
%exclude %{gem_cache}
%{gem_spec}
%files doc
%doc %{gem_docdir}
%{gem_instdir}/Gemfile
%doc %{gem_instdir}/README.md
%{gem_instdir}/Rakefile
%doc %{gem_instdir}/changelog.md
%{gem_instdir}/spec
%changelog
* Mon Aug 10 2020 yanan li <liyanan032@huawei.com> - 0.3.2-1
- Package init