62 lines
1.6 KiB
RPMSpec
62 lines
1.6 KiB
RPMSpec
%global gem_name expression_parser
|
|
Name: rubygem-%{gem_name}
|
|
Version: 0.9.0
|
|
Release: 1
|
|
Summary: A math parser
|
|
License: MIT
|
|
URL: http://lukaszwrobel.pl/blog/math-parser-part-3-implementation
|
|
Source0: https://rubygems.org/gems/%{gem_name}-%{version}.gem
|
|
# https://github.com/nricciar/expression_parser/blob/master/MIT-LICENSE
|
|
Source1: MIT-LICENSE
|
|
Requires: ruby(release) ruby(rubygems)
|
|
BuildRequires: ruby(release) rubygems-devel rubygem(rspec) < 3
|
|
BuildArch: noarch
|
|
Provides: rubygem(%{gem_name}) = %{version}
|
|
%description
|
|
A math parser
|
|
|
|
%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
|
|
rm Rakefile
|
|
sed -ri "s|\"Rakefile\"(\.freeze)?,||g" %{gem_name}.gemspec
|
|
|
|
%build
|
|
gem build %{gem_name}.gemspec
|
|
%gem_install
|
|
|
|
%install
|
|
mkdir -p %{buildroot}%{gem_dir}
|
|
cp -pa .%{gem_dir}/* \
|
|
%{buildroot}%{gem_dir}/
|
|
install -m 0644 -p %{SOURCE1} %{buildroot}%{gem_instdir}/MIT-LICENSE
|
|
|
|
%check
|
|
pushd .%{gem_instdir}
|
|
rspec2 parser_spec.rb
|
|
popd
|
|
|
|
%files
|
|
%dir %{gem_instdir}
|
|
%doc %{gem_instdir}/MIT-LICENSE
|
|
%doc %{gem_instdir}/README
|
|
%{gem_libdir}
|
|
%exclude %{gem_cache}
|
|
%{gem_spec}
|
|
|
|
%files doc
|
|
%doc %{gem_docdir}
|
|
%exclude %{gem_instdir}/parser_spec.rb
|
|
|
|
%changelog
|
|
* Fri Aug 21 2020 fanjiachen <fanjiachen3@huawei.com> - 0.9.0-1
|
|
- package init
|