Blob Blame History Raw
# Generated from rdoc-3.4.gem by gem2rpm -*- rpm-spec -*-
%global gem_name rdoc

Name: rubygem-%{gem_name}
Version: 4.2.2
Release: 2%{?dist}
Summary: RDoc produces HTML and command-line documentation for Ruby projects
Group: Development/Languages
License: GPLv2 and Ruby and MIT
URL: http://docs.seattlerb.org/rdoc
Source0: https://rubygems.org/gems/%{gem_name}-%{version}.gem
# Documentation is not rendered correctly due to broken links.
# https://github.com/rdoc/rdoc/pull/360
Patch0: rubygem-rdoc-4.2.3-Fix-broken-links-to-assets.patch
Requires: ruby(irb)
BuildRequires: ruby(release)
BuildRequires: rubygems-devel
BuildRequires: ruby
BuildRequires: rubygem(minitest) > 5
BuildRequires: rubygem(json) => 1.4
BuildRequires: rubygem(json) < 2
# Execute Rake integration test cases.
BuildRequires: rubygem(rake)
BuildRequires: ruby(irb)
BuildArch: noarch

%description
RDoc produces HTML and command-line documentation for Ruby projects.  RDoc
includes the +rdoc+ and +ri+ tools for generating and displaying documentation
from the command-line.


%package doc
Summary: Documentation for %{name}
Group: Documentation
Requires: %{name} = %{version}-%{release}
BuildArch: noarch

%description doc
Documentation for %{name}.

%prep
%setup -q -c -T
%gem_install -n %{SOURCE0}

pushd ./%{gem_instdir}
%patch0 -p1
popd

%build

%install
mkdir -p %{buildroot}%{gem_dir}
cp -a .%{gem_dir}/* \
        %{buildroot}%{gem_dir}/


mkdir -p %{buildroot}%{_bindir}
cp -pa .%{_bindir}/* \
        %{buildroot}%{_bindir}/

find %{buildroot}%{gem_instdir}/bin -type f | xargs chmod a+x

%check
pushd .%{gem_instdir}
# There is neccessary to disable system gems to avoid conflicts with system
# RDoc and specify several paths for test dependencies manually. Let's evaluate
# them by this nice Ruby snippet.
RUBYOPT=-I`ruby <<EOF
  specs = %w{rake minitest json}.map {|g| Gem::Specification.find_by_name(g)}
  paths = specs.map {|s| s.full_require_paths}
  puts paths.join(':')
EOF`:lib GEM_PATH= ruby -e 'Dir.glob "./test/**/test_*.rb", &method(:require)'

popd

%files
%dir %{gem_instdir}
%license %{gem_instdir}/LICENSE.rdoc
%doc %{gem_instdir}/LEGAL.rdoc
%exclude %{gem_instdir}/.*
%{_bindir}/rdoc
%{_bindir}/ri
%{gem_instdir}/bin
%{gem_libdir}
%exclude %{gem_cache}
%{gem_spec}

%files doc
%doc %{gem_docdir}
%doc %{gem_instdir}/CONTRIBUTING.rdoc
%doc %{gem_instdir}/CVE-2013-0256.rdoc
%doc %{gem_instdir}/Example*
%doc %{gem_instdir}/History.rdoc
%doc %{gem_instdir}/Manifest.txt
%doc %{gem_instdir}/README.rdoc
%doc %{gem_instdir}/RI.rdoc
%{gem_instdir}/Rakefile
%doc %{gem_instdir}/TODO.rdoc
%{gem_instdir}/test


%changelog
* Thu Jun 09 2016 Vít Ondruch <vondruch@redhat.com> - 4.2.2-2
- Fix broken links to assets.

* Mon May 23 2016 Vít Ondruch <vondruch@redhat.com> - 4.2.2-1
- Update to RDoc 4.2.2.

* Thu Feb 04 2016 Fedora Release Engineering <releng@fedoraproject.org> - 4.1.1-4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild

* Thu Jun 18 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 4.1.1-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild

* Tue Jul 08 2014 Vít Ondruch <vondruch@redhat.com> - 4.1.1-2
- Add missing IRB dependency.

* Mon Jul 07 2014 Vít Ondruch <vondruch@redhat.com> - 4.1.1-1
- Update to RDoc 4.1.1.

* Sun Jun 08 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 4.0.1-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild

* Sun Aug 04 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 4.0.1-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild

* Fri Mar 29 2013 Vít Ondruch <vondruch@redhat.com> - 4.0.1-1
- Update to RDoc 4.0.1.

* Tue Mar 26 2013 Josef Stribny <jstribny@redhat.com> - 4.0.0-100
- Rebuild for https://fedoraproject.org/wiki/Features/Ruby_2.0.0
- Update to RDoc 4.0.0

* Wed Feb 06 2013 Josef Stribny <jstribny@redhat.com> - 3.12.1-2
- Encoding issue is still unresolved in upstream.

* Wed Feb 06 2013 Josef Stribny <jstribny@redhat.com> - 3.12.1-1
- Update to version 3.12.1

* Thu Sep 06 2012 Vít Ondruch <vondruch@redhat.com> - 3.12-5
- Fix the location of Ruby documentation (rhbz#854418).

* Sat Jul 21 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 3.12-4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild

* Mon Apr 02 2012 Vít Ondruch <vondruch@redhat.com> - 3.12-3
- Add missing obsolete (rhbz#809007).

* Mon Feb 13 2012 Vít Ondruch <vondruch@redhat.com> - 3.12-2
- Add missing IRB dependency.

* Tue Feb 07 2012 Vít Ondruch <vondruch@redhat.com> - 3.12-1
- Rebuilt for Ruby 1.9.3.
- Updated to RDoc 3.12.

* Sat Jan 14 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 3.8-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild

* Wed Jul 20 2011 Mo Morsi <mmorsi@redhat.com> - 3.8-2
- Fixes for fedora compliance

* Mon Jan 10 2011 mo morsi <mmorsi@redhat.com> - 3.8-1
- Initial package