Blame SPECS/rubygem-thor.spec

24b08a
%{!?scl:%global pkg_name %{name}}
24b08a
%{?scl:%scl_package rubygem-%{gem_name}}
24b08a
24b08a
# Generated from thor-0.12.0.gem by gem2rpm -*- rpm-spec -*-
24b08a
%global gem_name thor
24b08a
24b08a
# There are not all test dependencies are available in RHEL.
24b08a
%global enable_test 0%{!?rhel:1}
24b08a
24b08a
Summary: Thor is a toolkit for building powerful command-line interfaces
24b08a
Name: %{?scl_prefix}rubygem-%{gem_name}
24b08a
Version: 0.19.1
24b08a
Release: 1%{?dist}
24b08a
Group: Development/Languages
24b08a
License: MIT
24b08a
URL: http://whatisthor.com/
24b08a
Source0: http://rubygems.org/downloads/%{gem_name}-%{version}.gem
24b08a
Requires: %{?scl_prefix_ruby}ruby(rubygems)
24b08a
Requires: %{?scl_prefix_ruby}ruby(release)
24b08a
%{?scl:BuildRequires: scldevel(ruby)}
24b08a
BuildRequires: %{?scl_prefix_ruby}rubygems-devel
24b08a
BuildRequires: %{?scl_prefix_ruby}ruby(release)
24b08a
%if %{enable_test} > 0
24b08a
BuildRequires: %{?scl_prefix}rubygem(rspec)
24b08a
BuildRequires: %{?scl_prefix}rubygem(fakeweb)
24b08a
BuildRequires: git
24b08a
%endif
24b08a
BuildArch: noarch
24b08a
Provides: %{?scl_prefix}rubygem(%{gem_name}) = %{version}
24b08a
24b08a
# Filter auto requires from /spec
24b08a
%global __requires_exclude_from ^%{gem_instdir}/spec/.*$
24b08a
%if ( 0%{?rhel} && 0%{?rhel} < 7 )
24b08a
%filter_requires_in %{gem_instdir}/spec/.*$
24b08a
%filter_setup
24b08a
%endif
24b08a
24b08a
24b08a
%description
24b08a
Thor is a toolkit for building powerful command-line interfaces.
24b08a
24b08a
%package doc
24b08a
Summary: Documentation for %{pkg_name}
24b08a
Group: Documentation
24b08a
Requires: %{?scl_prefix}%{pkg_name} = %{version}-%{release}
24b08a
BuildArch: noarch
24b08a
24b08a
%description doc
24b08a
This package contains documentation for %{pkg_name}.
24b08a
24b08a
%prep
24b08a
%setup -q -c -T
24b08a
%{?scl:scl enable %{scl} - << \EOF}
24b08a
%gem_install -n %{SOURCE0}
24b08a
%{?scl:EOF}
24b08a
24b08a
%build
24b08a
24b08a
%install
24b08a
mkdir -p %{buildroot}%{gem_dir}
24b08a
cp -a .%{gem_dir}/* %{buildroot}%{gem_dir}/
24b08a
24b08a
mkdir -p %{buildroot}%{_bindir}
24b08a
cp -pa .%{_bindir}/* \
24b08a
        %{buildroot}%{_bindir}/
24b08a
24b08a
find %{buildroot}%{gem_instdir}/bin -type f | xargs chmod a+x
24b08a
24b08a
find %{buildroot}%{gem_instdir}/bin -type f | \
24b08a
  xargs -n 1 sed -i -e 's"^#!/usr/bin/env ruby"#!%{?scl:%_scl_root}/usr/bin/ruby"'
24b08a
24b08a
find %{buildroot}%{_bindir} -type f | \
24b08a
  xargs -n 1 sed -i -e 's"^#!/usr/bin/ruby"#!%{?scl:%_scl_root}/usr/bin/ruby"'
24b08a
24b08a
%if %{enable_test} > 0
24b08a
%check
24b08a
pushd .%{gem_instdir}
24b08a
24b08a
# Drop bundler dependency
24b08a
sed -i '/require "bundler"/ s/^/#/' Thorfile
24b08a
24b08a
# kill simplecov dependency
24b08a
sed -i '/simplecov/,/end/ s/^/#/' spec/helper.rb
24b08a
24b08a
# Fix failing tests
24b08a
# /components and .empty_directory are present in git under v0.18.1 tag,
24b08a
# but missing in .gem so the tests are failing
24b08a
mkdir spec/fixtures/doc/components
24b08a
touch spec/fixtures/doc/components/.empty_directory
24b08a
24b08a
%{?scl:scl enable %{scl} - << \EOF}
24b08a
rspec2 spec
24b08a
%{?scl:EOF}
24b08a
popd
24b08a
%endif
24b08a
24b08a
%files
24b08a
%{_bindir}/thor
24b08a
%doc %{gem_instdir}/LICENSE.md
24b08a
%dir %{gem_instdir}
24b08a
%{gem_instdir}/bin
24b08a
%{gem_libdir}
24b08a
%exclude %{gem_instdir}/.*
24b08a
%exclude %{gem_cache}
24b08a
%{gem_spec}
24b08a
24b08a
%files doc
24b08a
%doc %{gem_docdir}
24b08a
%doc %{gem_instdir}/CHANGELOG.md
24b08a
%doc %{gem_instdir}/README.md
24b08a
%{gem_instdir}/Thorfile
24b08a
%{gem_instdir}/spec
24b08a
%{gem_instdir}/thor.gemspec
24b08a
24b08a
%changelog
24b08a
* Tue Dec 09 2014 Vít Ondruch <vondruch@redhat.com> - 0.19.1-1
24b08a
- Update to thor 1.19.1.
24b08a
24b08a
* Thu Feb 13 2014 Josef Stribny <jstribny@redhat.com> - 0.18.1-3
24b08a
- Filter auto-generated requires from example .sh script included in tests
24b08a
24b08a
* Mon Jan 27 2014 Josef Stribny <jstribny@redhat.com> - 0.18.1-2
24b08a
- Fix upstream url
24b08a
24b08a
* Wed Jun 05 2013 Josef Stribny <jstribny@redhat.com> - 0.18.1-1
24b08a
- Rebuild for https://fedoraproject.org/wiki/Features/Ruby_2.0.0
24b08a
- Update to Thor 0.18.1
24b08a
24b08a
* Thu Jul 26 2012 Bohuslav Kabrda <bkabrda@redhat.com> - 0.15.4-1
24b08a
- Update to Thor 0.15.4.
24b08a
- Specfile cleanup
24b08a
24b08a
* Thu May 31 2012 Bohuslav Kabrda <bkabrda@redhat.com> - 0.14.6-7
24b08a
- Fix patches to apply cleanly.
24b08a
24b08a
* Tue Apr 03 2012 Bohuslav Kabrda <bkabrda@redhat.com> - 0.14.6-6
24b08a
- Rebuilt for scl.
24b08a
24b08a
* Wed Feb 01 2012 Bohuslav Kabrda <bkabrda@redhat.com> - 0.14.6-5
24b08a
- Enable tests.
24b08a
- Add patches for the failing tests.
24b08a
- Removed unnecessary ParseTree dependency.
24b08a
24b08a
* Mon Jan 30 2012 Bohuslav Kabrda <bkabrda@redhat.com> - 0.14.6-4
24b08a
- Rebuilt for Ruby 1.9.3.
24b08a
24b08a
* Sat Jan 14 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.14.6-3
24b08a
- Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild
24b08a
24b08a
* Wed Feb 09 2011 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.14.6-2
24b08a
- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild
24b08a
24b08a
* Mon Jan 17 2011 Mohammed Morsi <mmorsi@redhat.com> - 0.14.6-1
24b08a
- Updated to latest upstream version
24b08a
24b08a
* Wed May 5 2010 Matthew Kent <mkent@magoazul.com> - 0.13.6-1
24b08a
- New upstream version.
24b08a
24b08a
* Fri Dec 18 2009 Matthew Kent <mkent@magoazul.com> - 0.12.0-2
24b08a
- Add Requires for rubygem(rake) (#542559).
24b08a
- Upstream replaced Source after the gemcutter migration, update to latest
24b08a
  (#542559).
24b08a
- Add Requires for rubygem(diff-lcs) as Thor can take advantage of it for
24b08a
  colourized diff output (#542559).
24b08a
24b08a
* Mon Nov 16 2009 Matthew Kent <mkent@magoazul.com> - 0.12.0-1
24b08a
- Initial package