#2 WIP: Add man pages for gherkin executable.
Closed 2 years ago by vondruch. Opened 5 years ago by jackorp.
rpms/ jackorp/rubygem-gherkin add-man-pages  into  rawhide

file modified
+15 -1
@@ -2,7 +2,7 @@ 

  

  Name: rubygem-%{gem_name}

  Version: 5.1.0

- Release: 1%{?dist}

+ Release: 2%{?dist}

  Summary: Fast Gherkin lexer/parser

  License: MIT

  URL: https://github.com/cucumber/gherkin-ruby
@@ -13,6 +13,7 @@ 

  BuildRequires: ruby(release)

  BuildRequires: rubygems-devel

  BuildRequires: ruby

+ BuildRequires: %{_bindir}/help2man

  BuildRequires: rubygem(rspec)

  BuildRequires: %{_bindir}/jq

  BuildArch: noarch
@@ -54,6 +55,14 @@ 

  find %{buildroot}%{gem_instdir}/bin -type f | \

    xargs sed -i 's|^#!/usr/bin/env ruby$|#!/usr/bin/ruby|'

  

+ # Build man page from `gherkin --help" output

+ export GEM_PATH="%{buildroot}/%{gem_dir}:%{gem_dir}"

+ mkdir -p %{buildroot}%{_mandir}/man1

+ # Pass version manually to help2man, gherkin does not support "--version" option

+ help2man -N -s1 --version-string=%{version} -o %{buildroot}%{_mandir}/man1/%{gem_name}.1 \

+     %{buildroot}/usr/share/gems/gems/%{gem_name}-%{version}/bin/%{gem_name}

+ ln -s %{_mandir}/man1/%{gem_name}.1 %{buildroot}%{_mandir}/man1/%{gem_name}-ruby.1

+ 

  %check

  pushd .%{gem_instdir}

  
@@ -74,6 +83,8 @@ 

  %dir %{gem_instdir}

  %{_bindir}/gherkin-ruby

  %{_bindir}/gherkin

+ %{_mandir}/man1/gherkin-ruby.1*

+ %{_mandir}/man1/gherkin.1*

  %license %{gem_instdir}/LICENSE

  %{gem_instdir}/bin

  %{gem_libdir}
@@ -86,6 +97,9 @@ 

  %{gem_instdir}/spec

  

  %changelog

+ * Wed Sep 19 2018 Jaroslav Prokop <jar.prokop@volny.cz> - 5.1.0-2

+ - Add man pages for executables.

+ 

  * Mon Sep 03 2018 Jaroslav Prokop <jar.prokop@volny.cz> - 5.1.0-1

  - Update to Gherkin 5.1.0.

  

This PR adds man pages for gherkin.

As of now, the gherkin does not have much meaningful executable documentation, upstream ticket was opened to track this: https://github.com/cucumber/cucumber/issues/475

Could you please rebase this on top of the master? Thx.

rebased onto 3da0fbc

5 years ago

Package has been rebased.

@jackorp Could you please check if this is something we could utilize in rubygem-cucumber-gherking?

Pull-Request has been closed by vondruch

2 years ago