rubygem-yard/rubygem-yard.spec

97 lines
2.8 KiB
RPMSpec
Raw Normal View History

2020-08-20 16:33:19 +08:00
%global gem_name yard
Name: rubygem-%{gem_name}
2023-08-01 14:45:07 +08:00
Version: 0.9.34
2024-02-29 10:37:42 +08:00
Release: 2
2020-08-20 16:33:19 +08:00
Summary: Documentation tool for consistent and usable documentation in Ruby
License: MIT and (BSD or Ruby)
URL: http://yardoc.org
2021-07-26 18:28:07 +08:00
Source0: https://rubygems.org/gems/%{gem_name}-%{version}.gem
2023-01-17 16:41:19 +08:00
# git clone http://github.com/lsegal/yard
2023-08-01 14:45:07 +08:00
# cd yard && git archive -v -o yard-0.9.34-spec.txz v0.9.34 spec/
2021-07-26 18:28:07 +08:00
Source1: %{gem_name}-%{version}-spec.txz
2024-02-29 10:37:42 +08:00
# https://github.com/lsegal/yard/commit/d78fc393d603c4fc35975969296ed381146a29d4
Patch0: CVE-2024-27285.patch
2021-07-26 18:28:07 +08:00
BuildRequires: ruby(release) rubygems-devel ruby rubygem(RedCloth) rubygem(asciidoctor) rubygem(bundler)
BuildRequires: rubygem(rspec) rubygem(redcarpet) rubygem(rack) rubygem(webrick)
2020-08-20 16:33:19 +08:00
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
2021-07-26 18:28:07 +08:00
%setup -q -n %{gem_name}-%{version} -b1
2024-02-29 10:37:42 +08:00
%patch0 -p1
2020-08-20 16:33:19 +08:00
%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}/
2023-08-01 14:45:07 +08:00
find %{buildroot}%{gem_instdir}/bin -type f | xargs chmod 0755
2020-08-20 16:33:19 +08:00
%check
pushd .%{gem_instdir}
2021-07-26 18:28:07 +08:00
cp -r %{_builddir}/spec .
2023-08-01 14:45:07 +08:00
sed -i spec/cli/diff_spec.rb -e '\@"searches for .gem file"@s|\([ \t]it \)|\txit |'
2023-01-17 16:41:19 +08:00
2023-08-01 14:45:07 +08:00
rspec -r spec_helper spec
2020-08-20 16:33:19 +08:00
popd
%files
%dir %{gem_instdir}
%{_bindir}/yard
%{_bindir}/yardoc
%{_bindir}/yri
2021-07-26 18:28:07 +08:00
%exclude %{gem_instdir}/.*
2020-08-20 16:33:19 +08:00
%license %{gem_instdir}/LEGAL
%license %{gem_instdir}/LICENSE
%{gem_instdir}/bin
%{gem_libdir}
2021-07-26 18:28:07 +08:00
%{gem_instdir}/po
2020-08-20 16:33:19 +08:00
%{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}
2020-08-20 16:33:19 +08:00
%doc %{gem_instdir}/docs
%changelog
2024-02-29 10:37:42 +08:00
* Thu Feb 29 2024 yaoxin <yao_xin001@hoperun.com> - 0.9.34-2
- Fix CVE-2024-27285
2023-08-01 14:45:07 +08:00
* Tue Aug 1 2023 liyanan <thistleslyn@163.com> - 0.9.34-1
- Update to 0.9.34
2023-01-17 16:41:19 +08:00
* Tue Jan 17 2023 caodongxia <caodongxia@h-partners.com> - 0.9.28-1
- update to 0.9.28
* Sat Jan 22 2022 liyanan <liyanan32@huawei.com> - 0.9.26-2
- Fix build error for Ruby 3
2021-07-26 18:28:07 +08:00
* Mon Jul 26 2021 houyingchao <houyingchao@huawei.com> - 0.9.26-1
- Upgrade to 0.9.26
2020-08-20 16:33:19 +08:00
* Sat Aug 8 2020 yanan li <liyanan032@huawei.com> - 0.9.12-1
- Package init