diff --git a/.gitignore b/.gitignore index 57d3230..9902873 100644 --- a/.gitignore +++ b/.gitignore @@ -1,5 +1,5 @@ -/*.gem /*.rpm +/*.tar.gz /.build*.log /asciidoctor-*/ /results_*/ diff --git a/rubygem-asciidoctor.spec b/rubygem-asciidoctor.spec index 028324d..7cff70d 100644 --- a/rubygem-asciidoctor.spec +++ b/rubygem-asciidoctor.spec @@ -2,45 +2,42 @@ %global mandir %{_mandir}/man1 %define pre %nil +%global gittag v%{version}%{pre} Summary: A fast, open source AsciiDoc implementation in Ruby Name: rubygem-%{gem_name} -Version: 1.5.8 -Release: 2%{?dist} +Version: 2.0.26 +Release: 1%{?dist} License: MIT -URL: https://github.com/asciidoctor/asciidoctor -Source0: https://rubygems.org/gems/%{gem_name}-%{version}%{pre}.gem +URL: https://asciidoctor.org +Source0: https://github.com/asciidoctor/asciidoctor/archive/%{gittag}/%{gem_name}-%{version}%{pre}.tar.gz %if 0%{?el7} Requires: ruby(release) BuildRequires: ruby(release) %endif -%if 0%{?el6} -Requires: ruby(rubygems) -Requires: ruby(abi) = 1.8 -BuildRequires: ruby(abi) = 1.8 -%endif BuildRequires: rubygems-devel BuildRequires: ruby(rubygems) -%if 0%{?el6} || 0%{?el7} +%if ! 0%{?rhel} # Dependencies aren't available on EPEL -%else BuildRequires: rubygem(coderay) BuildRequires: rubygem(concurrent-ruby) -BuildRequires: rubygem(erubis) +BuildRequires: rubygem(erubi) BuildRequires: rubygem(haml) +BuildRequires: rubygem(logger) BuildRequires: rubygem(minitest) BuildRequires: rubygem(nokogiri) +BuildRequires: rubygem(rouge) BuildRequires: rubygem(slim) BuildRequires: rubygem(tilt) %endif BuildArch: noarch Provides: asciidoctor = %{version} -%if 0%{?el6} || 0%{?el7} +%if 0%{?el7} Provides: rubygem(%{gem_name}) = %{version} %endif %if %{?pre:1} -%global gem_instdir %{gem_dir}/gems/%{gem_name}-%{version}%{pre} +%global gem_instdir() %{gem_dir}/gems/%{gem_name}-%{version}%{pre} %global gem_cache %{gem_dir}/cache/%{gem_name}-%{version}%{pre}.gem %global gem_spec %{gem_dir}/specifications/%{gem_name}-%{version}%{pre}.gemspec %global gem_docdir %{gem_dir}/doc/%{gem_name}-%{version}%{pre} @@ -62,13 +59,18 @@ BuildArch: noarch Documentation for %{name} %prep -gem unpack -V %{SOURCE0} -%setup -q -D -T -n %{gem_name}-%{version}%{pre} -gem spec %{SOURCE0} -l --ruby > %{gem_name}.gemspec +%autosetup -n %{gem_name}-%{version}%{pre} -p1 + +# Include tests in the gem, they're disabled by default +sed -i -e 's/#\(s\.test_files\)/\1/' %{gem_name}.gemspec # Fix shebang (avoid Requires: /usr/bin/env) -sed -i -e 's|#!/usr/bin/env ruby|#!/usr/bin/ruby|' \ - bin/%{gem_name} bin/%{gem_name}-safe +sed -i -e 's|#!/usr/bin/env ruby|#!/usr/bin/ruby|' bin/%{gem_name} + +# ref: https://github.com/asciidoctor/asciidoctor/issues/4684 +# the upstream plans to remove logger dep, but for now +# add logger dep explicitly for ruby3_5 +%gemspec_add_dep -g logger -s ./%{gem_name}.gemspec %build gem build %{gem_name}.gemspec @@ -77,15 +79,12 @@ gem build %{gem_name}.gemspec %check pushd .%{gem_instdir} -%if 0%{?el6} || 0%{?el7} +%if ! 0%{?rhel} # Asciidoctor tests require Minitest 5, so we can't run them on EPEL -%else -sed -i "/test 'should convert asciimath macro content to MathML when asciimath gem is available' do/a \\ - skip('asciimath gem is not available on Fedora')" test/substitutions_test.rb - -sed -i "/should render asciimath block in textobject of equation in DocBook backend/a \\ - skip('asciimath gem is not available on Fedora')" test/blocks_test.rb - +# +# disable tests which require open-uri-cached gem +sed -Ei "/test 'should cache remote (SVG|image) when allow-uri-read, cache-uri, and (inline option|data-uri) are set' do/a \\ + skip('open-uri-cached gem is not avaiable on Fedora')" test/blocks_test.rb LANG=C.UTF-8 ruby -I"lib:test" -e 'Dir.glob "./test/**/*_test.rb", &method(:require)' %endif popd @@ -104,18 +103,14 @@ cp -a .%{gem_instdir}/man/*.1 \ %{buildroot}%{mandir}/ %files -%{!?_licensedir:%global license %%doc} %dir %{gem_instdir} %exclude %{gem_cache} %exclude %{gem_instdir}/asciidoctor.gemspec %exclude %{gem_instdir}/man %exclude %{gem_instdir}/test %exclude %{gem_instdir}/features -%exclude %{gem_instdir}/Gemfile -%exclude %{gem_instdir}/Rakefile %license %{gem_instdir}/LICENSE %doc %{gem_instdir}/CHANGELOG.adoc -%doc %{gem_instdir}/CONTRIBUTING.adoc %doc %{gem_instdir}/README.* %lang(de) %doc %{gem_instdir}/README-de.* %lang(fr) %doc %{gem_instdir}/README-fr.* @@ -132,6 +127,101 @@ cp -a .%{gem_instdir}/man/*.1 \ %doc %{gem_docdir} %changelog +* Mon Dec 15 2025 Dominik Mierzejewski - 2.0.26-1 +- updated to 2.0.26 (resolves rhbz#2265214) +- droped upstreamed patches + +* Wed Nov 05 2025 Mamoru TASAKA - 2.0.20-11 +- Add logger dep for ruby3_5 + +* Fri Jul 25 2025 Fedora Release Engineering - 2.0.20-10 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_43_Mass_Rebuild + +* Sat Jan 18 2025 Fedora Release Engineering - 2.0.20-9 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_42_Mass_Rebuild + +* Thu Nov 14 2024 Mamoru TASAKA - 2.0.20-8 +- Backport upstream PR to remove base64 dependency +- Backport upstream fix for ruby34 formatting change + +* Fri Jul 19 2024 Fedora Release Engineering - 2.0.20-7 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_41_Mass_Rebuild + +* Fri Jan 26 2024 Fedora Release Engineering - 2.0.20-6 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild + +* Mon Jan 22 2024 Fedora Release Engineering - 2.0.20-5 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild + +* Fri Sep 29 2023 Mamoru TASAKA - 2.0.20-4 +- Apply the upstream PR to support ruby 3.3 Logger + +* Fri Jul 21 2023 Fedora Release Engineering - 2.0.20-3 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild + +* Thu May 25 2023 Todd Zullinger - 2.0.20-2 +- improve ruby-2.5 compatibility (epel8) + +* Thu May 18 2023 Todd Zullinger - 2.0.20-1 +- update to asciidoctor 2.0.20 (rhbz#2208089) + +* Wed May 17 2023 Todd Zullinger - 2.0.19-1 +- update to asciidoctor 2.0.19 (rhbz#2208089) + +* Mon Feb 20 2023 Todd Zullinger - 2.0.18-3 +- fixes for ruby-3.2.x and rouge-4.1.0 (rhbz#2171711) + +* Fri Jan 20 2023 Fedora Release Engineering - 2.0.18-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild + +* Sat Oct 15 2022 Todd Zullinger - 2.0.18-1 +- update to asciidoctor 2.0.18 (rhbz#1989716) + +* Tue Aug 02 2022 Todd Zullinger - 2.0.17-1 +- update to asciidoctor 2.0.17 (rhbz#2113688) +- disable tests which require open-uri-cached gem + +* Sat Jul 23 2022 Fedora Release Engineering - 2.0.15-4 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild + +* Fri Jan 21 2022 Neal Gompa - 2.0.15-3 +- Simplify RHEL conditionals + +* Fri Jul 23 2021 Fedora Release Engineering - 2.0.15-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild + +* Tue Apr 27 2021 Todd Zullinger - 2.0.15-1 +- update to asciidoctor 2.0.15 + Resolves: rhbz#1954314 +- remove el6 conditionals + +* Mon Apr 19 2021 Todd Zullinger - 2.0.14-1 +- Update to asciidoctor 2.0.14 + Resolves: rhbz#1950947 + +* Sat Apr 10 2021 Todd Zullinger - 2.0.13-1 +- Update to asciidoctor 2.0.13 + Resolves: rhbz#1948231 + +* Wed Jan 27 2021 Pavel Valena - 2.0.12-1 +- Update to asciidoctor 2.0.12. + Resolves: rhbz#1893940 + +* Wed Jan 27 2021 Fedora Release Engineering - 2.0.10-5 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild + +* Wed Aug 19 2020 Vít Ondruch - 2.0.10-4 +- Replace build time Erubis dependency by Erubi. + +* Wed Jul 29 2020 Fedora Release Engineering - 2.0.10-3 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild + +* Thu Jan 30 2020 Fedora Release Engineering - 2.0.10-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild + +* Sun Sep 22 2019 Todd Zullinger - 2.0.10-1 +- Update to Asciidoctor 2.0.10 + * Fri Jul 26 2019 Fedora Release Engineering - 1.5.8-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild diff --git a/sources b/sources index 7927eb8..7fdf3a8 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (asciidoctor-1.5.8.gem) = 34ff0df98ff9ebb2d3640629870cd848cf2f4b617564a42e7b30b6cf60c01d1188b4cc695af49550e054c9e833accc1ed5d622b4952ece3da99c8ed98af769ac +SHA512 (asciidoctor-2.0.26.tar.gz) = 5e42079374fb1767dd0fd6767fd1e718d2c1c673e131ef1ae401c7b17e5b413168de3b25889eda35d2021ded55855b83b78f6110729e1a7765f757b37bbf5858