56 lines
1.3 KiB
RPMSpec
56 lines
1.3 KiB
RPMSpec
|
|
%global gem_name ruby-rc4
|
||
|
|
Name: rubygem-%{gem_name}
|
||
|
|
Version: 0.1.5
|
||
|
|
Release: 1
|
||
|
|
Summary: Pure Ruby implementation of the RC4 algorithm
|
||
|
|
License: MIT
|
||
|
|
URL: https://github.com/caiges/Ruby-RC4
|
||
|
|
Source0: https://rubygems.org/gems/ruby-rc4-%{version}.gem
|
||
|
|
BuildRequires: ruby(release) rubygems-devel ruby rubygem(rspec)
|
||
|
|
BuildArch: noarch
|
||
|
|
%description
|
||
|
|
RubyRC4 is a pure Ruby implementation of the RC4 algorithm.
|
||
|
|
|
||
|
|
%package doc
|
||
|
|
Summary: Documentation for %{name}
|
||
|
|
Requires: %{name} = %{version}-%{release}
|
||
|
|
BuildArch: noarch
|
||
|
|
%description doc
|
||
|
|
Documentation for %{name}.
|
||
|
|
|
||
|
|
%prep
|
||
|
|
%setup -q -n %{gem_name}-%{version}
|
||
|
|
|
||
|
|
%build
|
||
|
|
gem build ../%{gem_name}-%{version}.gemspec
|
||
|
|
%gem_install
|
||
|
|
|
||
|
|
%install
|
||
|
|
mkdir -p %{buildroot}%{gem_dir}
|
||
|
|
cp -a .%{gem_dir}/* \
|
||
|
|
%{buildroot}%{gem_dir}/
|
||
|
|
sed -i 's|#!/usr/bin/env ruby|#!/usr/bin/ruby|' %{buildroot}%{gem_instdir}/spec/rc4_spec.rb
|
||
|
|
rm %{buildroot}%{gem_instdir}/{README.md,LICENSE}
|
||
|
|
|
||
|
|
%check
|
||
|
|
pushd .%{gem_instdir}
|
||
|
|
rspec spec
|
||
|
|
popd
|
||
|
|
|
||
|
|
%files
|
||
|
|
%dir %{gem_instdir}
|
||
|
|
%license LICENSE
|
||
|
|
%{gem_libdir}
|
||
|
|
%exclude %{gem_cache}
|
||
|
|
%{gem_spec}
|
||
|
|
|
||
|
|
%files doc
|
||
|
|
%doc %{gem_docdir}
|
||
|
|
%doc README.md
|
||
|
|
%{gem_instdir}/Rakefile
|
||
|
|
%{gem_instdir}/spec
|
||
|
|
|
||
|
|
%changelog
|
||
|
|
* Wed Aug 5 2020 wangchong <wangchong56@huawei.com> - 0.1.5-1
|
||
|
|
- package init
|