You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
rubygem-thor/rubygem-thor.spec

138 lines
3.6 KiB

# Generated from thor-0.12.0.gem by gem2rpm -*- rpm-spec -*-
%global gem_name thor
%global rubyabi 1.9.1
Summary: Scripting framework that replaces rake, sake and rubigen
Name: rubygem-%{gem_name}
Version: 0.14.6
Release: 5%{?dist}
Group: Development/Languages
License: MIT
URL: http://github.com/wycats/thor
Source0: http://rubygems.org/download/%{gem_name}-%{version}.gem
# all these patches should be contained in next version
Patch0: thor-allow-random-test-execution-order.patch
Patch1: thor-rake-0.9-compat.patch
Patch2: thor-fix-method-missing.patch
Patch3: thor-fix-rake-desc-not-being-passed.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
Requires: ruby(rubygems)
Requires: ruby(abi) = %{rubyabi}
Requires: rubygem(ruby2ruby)
Requires: rubygem(rake)
Requires: rubygem(diff-lcs)
BuildRequires: rubygems-devel
BuildRequires: ruby(abi) = %{rubyabi}
BuildRequires: rubygem(rspec-core)
BuildRequires: rubygem(rake)
BuildRequires: rubygem(diff-lcs)
BuildRequires: rubygem(rdoc)
BuildRequires: rubygem(fakeweb)
BuildArch: noarch
Provides: rubygem(%{gem_name}) = %{version}
%description
Thor is a scripting framework that replaces rake, sake and rubigen.
%package doc
Summary: Documentation for %{name}
Group: Documentation
Requires: %{name} = %{version}-%{release}
%description doc
This package contains documentation for %{name}.
%prep
%setup -q -c -T
mkdir -p .%{gem_dir}
gem install -V \
--local \
--install-dir $(pwd)/%{gem_dir} \
--force --rdoc \
%{SOURCE0}
pushd .%{gem_instdir}
%patch0 -p1
%patch1 -p1
%patch2 -p1
%patch3 -p1
popd
%build
%install
rm -rf %{buildroot}
mkdir -p %{buildroot}%{gem_dir}
cp -a .%{gem_dir}/* %{buildroot}%{gem_dir}/
mkdir -p %{buildroot}/%{_bindir}
mv %{buildroot}%{gem_dir}/bin/* %{buildroot}/%{_bindir}
rmdir %{buildroot}%{gem_dir}/bin
find %{buildroot}%{gem_instdir}/bin -type f | xargs chmod a+x
find %{buildroot}%{gem_instdir}/bin -type f | \
xargs -n 1 sed -i -e 's"^#!/usr/bin/env ruby"#!/usr/bin/ruby"'
%clean
rm -rf %{buildroot}
%check
pushd %{buildroot}%{gem_instdir}
# kill simplecov dependency
sed -i '3,7d' spec/spec_helper.rb
rspec spec
popd
%files
%defattr(-,root,root,-)
%{_bindir}/thor
%{_bindir}/rake2thor
%doc %{gem_instdir}/CHANGELOG.rdoc
%doc %{gem_instdir}/LICENSE
%doc %{gem_instdir}/README.md
%dir %{gem_instdir}
%{gem_instdir}/bin
%{gem_libdir}
%{gem_cache}
%{gem_spec}
%files doc
%defattr(-,root,root,-)
%{gem_instdir}/Thorfile
%{gem_instdir}/spec
%{gem_docdir}
%changelog
* Wed Feb 01 2012 Bohuslav Kabrda <bkabrda@redhat.com> - 0.14.6-5
- Enable tests.
- Add patches for the failing tests.
- Removed unnecessary ParseTree dependency.
* Mon Jan 30 2012 Bohuslav Kabrda <bkabrda@redhat.com> - 0.14.6-4
- Rebuilt for Ruby 1.9.3.
* Sat Jan 14 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.14.6-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild
* Wed Feb 09 2011 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.14.6-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild
* Mon Jan 17 2011 Mohammed Morsi <mmorsi@redhat.com> - 0.14.6-1
- Updated to latest upstream version
* Wed May 5 2010 Matthew Kent <mkent@magoazul.com> - 0.13.6-1
- New upstream version.
* Fri Dec 18 2009 Matthew Kent <mkent@magoazul.com> - 0.12.0-2
- Add Requires for rubygem(rake) (#542559).
- Upstream replaced Source after the gemcutter migration, update to latest
(#542559).
- Add Requires for rubygem(diff-lcs) as Thor can take advantage of it for
colourized diff output (#542559).
* Mon Nov 16 2009 Matthew Kent <mkent@magoazul.com> - 0.12.0-1
- Initial package