!1 初始化 rubygem-gherkin

Merge pull request !1 from tushenmei/master
This commit is contained in:
openeuler-ci-bot 2020-09-01 09:57:21 +08:00 committed by Gitee
commit 8ca7549dc2
4 changed files with 74 additions and 0 deletions

BIN
gherkin-5.1.0.gem Normal file

Binary file not shown.

69
rubygem-gherkin.spec Normal file
View File

@ -0,0 +1,69 @@
%global gem_name gherkin
Name: rubygem-%{gem_name}
Version: 5.1.0
Release: 1
Summary: Fast Gherkin lexer/parser
License: MIT
URL: https://github.com/cucumber/gherkin-ruby
Source0: https://rubygems.org/gems/%{gem_name}-%{version}.gem
Source1: https://github.com/cucumber/gherkin-ruby/archive/v%{version}.tar.gz
BuildRequires: ruby(release) rubygems-devel ruby rubygem(rspec) jq
BuildArch: noarch
%description
A fast Gherkin lexer/parser based on the Ragel State Machine Compiler.
%package doc
Summary: Documentation for %{name}
Requires: %{name} = %{version}-%{release}
BuildArch: noarch
%description doc
Documentation for %{name}.
%prep
%setup -q -n %{gem_name}-%{version} -b 1
%build
gem build ../%{gem_name}-%{version}.gemspec
%gem_install
%install
mkdir -p %{buildroot}%{gem_dir}
cp -a .%{gem_dir}/* \
%{buildroot}%{gem_dir}/
mkdir -p %{buildroot}%{_bindir}
cp -a .%{_bindir}/* \
%{buildroot}%{_bindir}/
find %{buildroot}%{gem_instdir}/bin -type f | xargs chmod a+x
find %{buildroot}%{gem_instdir}/bin -type f | \
xargs sed -i 's|^#!/usr/bin/env ruby$|#!/usr/bin/ruby|'
%check
pushd .%{gem_instdir}
rspec spec
ln -s %{_builddir}/%{gem_name}-ruby-%{version}/Makefile ./Makefile
ln -s %{_builddir}/%{gem_name}-ruby-%{version}/testdata ./testdata
ln -s %{_builddir}/%{gem_name}-ruby-%{version}/bin/gherkin-generate-tokens ./bin/gherkin-generate-tokens
sed -i '/.built:/ i .built:\n' Makefile
sed -i '/.built: /,/^$/ s/^/#/' Makefile
make .compared
popd
%files
%dir %{gem_instdir}
%{_bindir}/gherkin-ruby
%{_bindir}/gherkin
%license %{gem_instdir}/LICENSE
%{gem_instdir}/bin
%{gem_libdir}
%exclude %{gem_cache}
%{gem_spec}
%files doc
%doc %{gem_docdir}
%doc %{gem_instdir}/README.md
%{gem_instdir}/spec
%changelog
* Tue Aug 18 2020 tuShenmei <tushenmei@huawei.com> - 5.1.0-1
- package init

5
rubygem-gherkin.yaml Normal file
View File

@ -0,0 +1,5 @@
version_control: github
src_repo: cucumber/gherkin-ruby
tag_prefix: "gherkin-"
separator: "."

BIN
v5.1.0.tar.gz Normal file

Binary file not shown.