init package

This commit is contained in:
fanjiachen 2020-08-28 14:36:58 +08:00
parent 42e924e3ed
commit cae4fce0ca
4 changed files with 85 additions and 0 deletions

20
MIT-LICENSE Normal file
View File

@ -0,0 +1,20 @@
Copyright (c) 2009.
Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associated documentation files (the
"Software"), to deal in the Software without restriction, including
without limitation the rights to use, copy, modify, merge, publish,
distribute, sublicense, and/or sell copies of the Software, and to
permit persons to whom the Software is furnished to do so, subject to
the following conditions:
The above copyright notice and this permission notice shall be
included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

BIN
expression_parser-0.9.0.gem Normal file

Binary file not shown.

View File

@ -0,0 +1,61 @@
%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

View File

@ -0,0 +1,4 @@
version_control: github
src_repo: nricciar/expression_parser
tag_prefix: "v"
seperator: "."