Blame SPECS/rubygem-sdoc.spec

62149f
%{?scl:%scl_package rubygem-%{gem_name}}
62149f
%{!?scl:%global pkg_name %{name}}
62149f
62149f
# Generated from sdoc-0.3.20.gem by gem2rpm -*- rpm-spec -*-
62149f
%global gem_name sdoc
62149f
62149f
Name: %{?scl_prefix}rubygem-%{gem_name}
62149f
Version: 0.4.1
62149f
Release: 6%{?dist}
62149f
Summary: RDoc generator to build searchable HTML documentation for Ruby code
62149f
Group: Development/Languages
62149f
# License needs to take RDoc and Darkfish into account apparantly
62149f
# https://github.com/voloko/sdoc/issues/27
62149f
# SDoc itself is MIT, RDoc part is (GPLv2 or Ruby) and Darkfish is BSD
62149f
License: MIT and (GPLv2 or Ruby) and BSD
62149f
URL: http://github.com/voloko/sdoc
62149f
# Let's build the gem on the latest stable release to avoid confusion
62149f
Source0: https://rubygems.org/gems/%{gem_name}-%{version}.gem
62149f
# Man pages
62149f
# https://github.com/voloko/sdoc/pull/49
62149f
Source1: sdoc.1
62149f
Source2: sdoc-merge.1
62149f
# Fix sdoc --version to return the correct version
62149f
Patch0: rubygem-sdoc-version-option-fix.patch
62149f
62149f
Requires:      %{?scl_prefix_ruby}ruby(release)
62149f
Requires:      %{?scl_prefix_ruby}ruby(rubygems) >= 1.3.6
62149f
Requires:      %{?scl_prefix_ruby}rubygem(rdoc) => 4.0
62149f
Requires:      %{?scl_prefix_ruby}rubygem(rdoc) < 5
62149f
Requires:      %{?scl_prefix_ruby}rubygem(json) < 2
62149f
Requires:      %{?scl_prefix_ruby}rubygem(json) >= 1.7.7
62149f
BuildRequires: %{?scl_prefix_ruby}ruby(release)
62149f
BuildRequires: %{?scl_prefix_ruby}rubygem(minitest)
62149f
BuildRequires: %{?scl_prefix_ruby}rubygems-devel
62149f
BuildRequires: %{?scl_prefix_ruby}ruby
62149f
BuildArch:     noarch
62149f
Provides:      %{?scl_prefix}rubygem(%{gem_name}) = %{version}
62149f
62149f
%description
62149f
SDoc is simply a wrapper for the rdoc command line tool.
62149f
62149f
%package doc
62149f
Summary: Documentation for %{pkg_name}
62149f
Group: Documentation
62149f
Requires: %{?scl_prefix}%{pkg_name} = %{version}-%{release}
62149f
BuildArch: noarch
62149f
62149f
%description doc
62149f
Documentation for %{pkg_name}.
62149f
62149f
%prep
62149f
%{?scl:scl enable %{scl} - << \EOF}
62149f
gem unpack %{SOURCE0}
62149f
%{?scl:EOF}
62149f
62149f
%setup -q -D -T -n  %{gem_name}-%{version}
62149f
62149f
%{?scl:scl enable %{scl} - << \EOF}
62149f
gem spec %{SOURCE0} -l --ruby > %{gem_name}.gemspec
62149f
%{?scl:EOF}
62149f
62149f
%patch0 -p1
62149f
62149f
%build
62149f
%{?scl:scl enable %{scl} - << \EOF}
62149f
gem build %{gem_name}.gemspec
62149f
%gem_install
62149f
%{?scl:EOF}
62149f
62149f
%install
62149f
mkdir -p %{buildroot}%{gem_dir}
62149f
cp -pa .%{gem_dir}/* \
62149f
        %{buildroot}%{gem_dir}/
62149f
62149f
mkdir -p %{buildroot}%{_bindir}
62149f
cp -pa .%{_bindir}/* \
62149f
        %{buildroot}%{_bindir}/
62149f
62149f
# Install man pages into appropriate place.
62149f
mkdir -p %{buildroot}%{_mandir}/man1
62149f
mv %{SOURCE1} %{buildroot}%{_mandir}/man1
62149f
mv %{SOURCE2} %{buildroot}%{_mandir}/man1
62149f
62149f
find %{buildroot}%{gem_instdir}/bin -type f | xargs chmod a+x
62149f
find %{buildroot}%{gem_instdir}/lib/rdoc/generator/template -type f | xargs chmod a-x
62149f
62149f
%check
62149f
pushd .%{gem_instdir}
62149f
# Get rid of Bundler
62149f
sed -i "s/require 'bundler\/setup'//" ./spec/spec_helper.rb
62149f
# To run the tests using minitest 5
62149f
%{?scl:scl enable %{scl} - << \EOF}
62149f
set -e
62149f
ruby -rminitest/autorun -Ilib - << \EOR
62149f
  Test = Minitest
62149f
  Dir.glob "./spec/*.rb", &method(:require)
62149f
EOR
62149f
%{?scl:EOF}
62149f
popd
62149f
62149f
%files
62149f
%dir %{gem_instdir}
62149f
%{_bindir}/sdoc
62149f
%{_bindir}/sdoc-merge
62149f
%{gem_instdir}/bin
62149f
%{gem_libdir}
62149f
%exclude %{gem_cache}
62149f
%exclude %{gem_instdir}/.travis.yml
62149f
%exclude %{gem_instdir}/.gitignore
62149f
%{gem_spec}
62149f
%doc %{gem_instdir}/LICENSE
62149f
%doc %{_mandir}/man1/sdoc-merge.1*
62149f
%doc %{_mandir}/man1/sdoc.1*
62149f
62149f
%files doc
62149f
%doc %{gem_docdir}
62149f
%doc %{gem_instdir}/README.md
62149f
%{gem_instdir}/Gemfile
62149f
%{gem_instdir}/%{gem_name}.gemspec
62149f
%{gem_instdir}/Rakefile
62149f
%{gem_instdir}/spec
62149f
62149f
%changelog
62149f
* Wed Apr 06 2016 Pavel Valena <pvalena@redhat.com> - 0.4.1-6
62149f
- Fix: build should fail on test failure
62149f
62149f
* Wed Mar 02 2016 Pavel Valena <pvalena@redhat.com> - 0.4.1-5
62149f
- Rebuilt for rh-ror42
62149f
62149f
* Mon Aug 18 2014 Josef Stribny <jstribny@redhat.com> - 0.4.1-1
62149f
- Update to 0.4.1
62149f
62149f
* Fri Mar 21 2014 Vít Ondruch <vondruch@redhat.com> - 0.4.0-4
62149f
- Rebuid against new scl-utils to depend on -runtime package.
62149f
  Resolves: rhbz#1069109
62149f
62149f
* Mon Jan 27 2014 Vít Ondruch <vondruch@redhat.com> - 0.4.0-3
62149f
- Fix ruby200 scl dependencies.
62149f
62149f
* Fri Jan 24 2014 Josef Stribny <jstribny@redhat.com> - 0.4.0-2
62149f
- Fix disttag
62149f
62149f
* Mon Nov 25 2013 Josef Stribny <jstribny@redhat.com> - 0.4.0-1
62149f
- Update to sdoc 0.4.0
62149f
- Run tests
62149f
- Fix changelog
62149f
62149f
* Mon Nov 25 2013 Josef Stribny <jstribny@redhat.com> - 0.4.0-2.rc1
62149f
- Convert to scl
62149f
62149f
* Wed Nov 06 2013 Josef Stribny <jstribny@redhat.com> - 0.4.0-1.rc1
62149f
- sdoc 0.4.0 git pre-release to support RDoc 4.0
62149f
62149f
* Tue Aug 06 2013 Josef Stribny <jstribny@redhat.com> - 0.3.20-2
62149f
- Add man pages
62149f
62149f
* Tue Jul 30 2013 Josef Stribny <jstribny@redhat.com> - 0.3.20-1
62149f
- Initial package