diff options
Diffstat (limited to 'rdoc-generator-fedora-darkfish.spec')
-rw-r--r-- | rdoc-generator-fedora-darkfish.spec | 87 |
1 files changed, 87 insertions, 0 deletions
diff --git a/rdoc-generator-fedora-darkfish.spec b/rdoc-generator-fedora-darkfish.spec new file mode 100644 index 0000000..96708e5 --- /dev/null +++ b/rdoc-generator-fedora-darkfish.spec @@ -0,0 +1,87 @@ +%global gem_name fedora_darkfish + +%global gem_plugin %{gem_dir}/plugins/%{name}_plugin.rb + +Name: rdoc-generator-fedora-darkfish +Version: 6.4.0 +Release: 1%{?dist} +Summary: Darkfish RDoc Generator +# BSD-3-Clause: lib/rdoc/generator/darkfish.rb +# CC-BY-2.5: lib/rdoc/generator/template/darkfish/images/loadingAnimation.gif +License: GPL-2.0 AND Ruby AND BSD-3-Clause AND CC-BY-2.5 +URL: https://ruby.github.io/rdoc +Source0: https://rubygems.org/gems/rdoc-%{version}.gem +Source1: fedora_darkfish.rb +Source2: rubygems_plugin.rb +# Because the fonts are not embedded, do not refer to them in the font.css +# file. +Patch0: rdoc-6.4.0-Drop-the-font-URLs-from-css.patch +Requires: %{name}-assets +Requires: ruby(rubygems) +BuildRequires: rubygems-devel +BuildArch: noarch + +%description +Darkfish RDoc generator extracted from RDoc usedfor the purpose of generating +documentation of rubygem- packages during their build. Any other use case is +not supported. + + +%package assets +Summary: Darkfish template shared assets +# Originally shipped in lib/rdoc/generator/template/darkfish/fonts +# and specified via lib/rdoc/generator/template/darkfish/css/fonts.css +Requires: font(lato) +Requires: font(sourcecodepro) +BuildArch: noarch + +%description assets +This package provides Darkfish template shared assets for documentaion +generated for rubygem- packages on Fedora. + +%prep +%setup -q -n rdoc-%{version} + +%patch0 -p1 + +%build + +%install +pushd lib/rdoc/generator/template/ +find . -mindepth 2 -type d \ + -exec install -d %{buildroot}%{_datadir}/%{name}/{} \; +find . -type f \ + -exec install -p -m 644 {} %{buildroot}%{_datadir}/%{name}/{} \; +popd + +rm %{buildroot}%{_datadir}/%{name}/{darkfish,json_index}/.document + +# Drop fonts. System fonts are going to be pulled in instead. +rm -rf %{buildroot}%{_datadir}/%{name}/darkfish/fonts + +install -p -m 644 %{SOURCE1} %{buildroot}%{_datadir}/%{name}/ +install -p -m 644 %{SOURCE2} %{buildroot}%{_datadir}/%{name}/ + +mkdir -p $(dirname %{buildroot}%{gem_plugin}) +echo "require '%{_datadir}/%{name}/rubygems_plugin.rb'" > %{buildroot}%{gem_plugin} + +%check +# Not test ATM. Not clear if there is actually something to test. + +%files +%{gem_plugin} +%{_datadir}/%{name}/darkfish/*.rhtml +%{_datadir}/%{name}/fedora_darkfish.rb +%{_datadir}/%{name}/rubygems_plugin.rb + +%files assets +%dir %{_datadir}/%{name}/ +%dir %{_datadir}/%{name}/darkfish/ +%{_datadir}/%{name}/darkfish/css +%{_datadir}/%{name}/darkfish/images +%{_datadir}/%{name}/darkfish/js +%{_datadir}/%{name}/json_index + +%changelog +* Thu Oct 20 2022 Vít Ondruch <vondruch@redhat.com> - 6.4.0-1 +- Initial version of Darfish RDoc Generator as extracted from RDoc 6.4.0. |