diff --git a/MIT-LICENSE b/MIT-LICENSE new file mode 100644 index 0000000..9df1f93 --- /dev/null +++ b/MIT-LICENSE @@ -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. diff --git a/expression_parser-0.9.0.gem b/expression_parser-0.9.0.gem new file mode 100644 index 0000000..95785c5 Binary files /dev/null and b/expression_parser-0.9.0.gem differ diff --git a/rubygem-expression_parser.spec b/rubygem-expression_parser.spec new file mode 100644 index 0000000..4782b33 --- /dev/null +++ b/rubygem-expression_parser.spec @@ -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 - 0.9.0-1 +- package init diff --git a/rubygem-expression_parser.yaml b/rubygem-expression_parser.yaml new file mode 100644 index 0000000..682b527 --- /dev/null +++ b/rubygem-expression_parser.yaml @@ -0,0 +1,4 @@ +version_control: github +src_repo: nricciar/expression_parser +tag_prefix: "v" +seperator: "."