%global gem_name yard Name: rubygem-%{gem_name} Version: 0.9.34 Release: 2 Summary: Documentation tool for consistent and usable documentation in Ruby License: MIT and (BSD or Ruby) URL: http://yardoc.org Source0: https://rubygems.org/gems/%{gem_name}-%{version}.gem # git clone http://github.com/lsegal/yard # cd yard && git archive -v -o yard-0.9.34-spec.txz v0.9.34 spec/ Source1: %{gem_name}-%{version}-spec.txz # https://github.com/lsegal/yard/commit/d78fc393d603c4fc35975969296ed381146a29d4 Patch0: CVE-2024-27285.patch BuildRequires: ruby(release) rubygems-devel ruby rubygem(RedCloth) rubygem(asciidoctor) rubygem(bundler) BuildRequires: rubygem(rspec) rubygem(redcarpet) rubygem(rack) rubygem(webrick) BuildArch: noarch %description YARD is a documentation generation tool for the Ruby programming language. It enables the user to generate consistent, usable documentation that can be exported to a number of formats very easily, and also supports extending for custom Ruby constructs such as custom class level definitions. %package doc Summary: Documentation for %{name} Requires: %{name} = %{version}-%{release} BuildArch: noarch %description doc Documentation for %{name}. %prep %setup -q -n %{gem_name}-%{version} -b1 %patch0 -p1 %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 0755 %check pushd .%{gem_instdir} cp -r %{_builddir}/spec . sed -i spec/cli/diff_spec.rb -e '\@"searches for .gem file"@s|\([ \t]it \)|\txit |' rspec -r spec_helper spec popd %files %dir %{gem_instdir} %{_bindir}/yard %{_bindir}/yardoc %{_bindir}/yri %exclude %{gem_instdir}/.* %license %{gem_instdir}/LEGAL %license %{gem_instdir}/LICENSE %{gem_instdir}/bin %{gem_libdir} %{gem_instdir}/po %{gem_instdir}/templates %exclude %{gem_cache} %{gem_spec} %files doc %doc %{gem_docdir} %doc %{gem_instdir}/CHANGELOG.md %doc %{gem_instdir}/README.md %{gem_plugin} %doc %{gem_instdir}/docs %changelog * Thu Feb 29 2024 yaoxin - 0.9.34-2 - Fix CVE-2024-27285 * Tue Aug 1 2023 liyanan - 0.9.34-1 - Update to 0.9.34 * Tue Jan 17 2023 caodongxia - 0.9.28-1 - update to 0.9.28 * Sat Jan 22 2022 liyanan - 0.9.26-2 - Fix build error for Ruby 3 * Mon Jul 26 2021 houyingchao - 0.9.26-1 - Upgrade to 0.9.26 * Sat Aug 8 2020 yanan li - 0.9.12-1 - Package init