%global gem_name asciidoctor Name: rubygem-%{gem_name} Version: 2.0.10 Release: 1%{?dist} Summary: An implementation of the AsciiDoc text processor and publishing toolchain License: MIT URL: https://asciidoctor.org Source0: https://rubygems.org/gems/%{gem_name}-%{version}.gem BuildRequires: ruby(release) BuildRequires: rubygems-devel BuildRequires: ruby BuildArch: noarch %description A fast, open source text processor and publishing toolchain, written in Ruby, for transforming AsciiDoc markup into HTML 5, DocBook 4.5, DocBook 5.0 and custom output formats. The transformation from AsciiDoc to custom output formats is performed by running the nodes in the parsed document tree through a collection of templates written in a template language supported by Tilt. %package doc Summary: Documentation for %{name} Requires: %{name} = %{version}-%{release} BuildArch: noarch %description doc Documentation for %{name}. %prep %setup -q -n %{gem_name}-%{version} %build # Create the gem as gem install only works on a gem file gem build ../%{gem_name}-%{version}.gemspec # %%gem_install compiles any C extensions and installs the gem into ./%%gem_dir # by default, so that we can move it into the buildroot in %%install %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 %files %dir %{gem_instdir} %{_bindir}/asciidoctor %exclude %{gem_instdir}/.yardopts %license %{gem_instdir}/LICENSE %{gem_instdir}/bin %{gem_instdir}/data %{gem_libdir} %{gem_instdir}/man %exclude %{gem_cache} %{gem_spec} %files doc %doc %{gem_docdir} %doc %{gem_instdir}/CHANGELOG.adoc %doc %{gem_instdir}/README-de.adoc %doc %{gem_instdir}/README-fr.adoc %doc %{gem_instdir}/README-jp.adoc %doc %{gem_instdir}/README-zh_CN.adoc %doc %{gem_instdir}/README.adoc %doc %{gem_instdir}/asciidoctor.gemspec %changelog * Thu Apr 23 2020 Breno B Fernandes - 2.0.10-1 - Initial package