Blame SPECS/rubygem-sdoc.spec

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