Blame rubygem-sprite-factory.spec

Josef Stribny 2b1f7fe
# Generated from sprite-factory-1.6.0.gem by gem2rpm -*- rpm-spec -*-
Josef Stribny 2b1f7fe
%global gem_name sprite-factory
Josef Stribny 2b1f7fe
Josef Stribny 2b1f7fe
Name: rubygem-%{gem_name}
Josef Stribny 2b1f7fe
Version: 1.6.1
Josef Stribny 2b1f7fe
Release: 1%{?dist}
Josef Stribny 2b1f7fe
Summary: Automatic CSS sprite generator
Josef Stribny 2b1f7fe
Group: Development/Languages
Josef Stribny 2b1f7fe
License: MIT
Josef Stribny 2b1f7fe
URL: https://github.com/jakesgordon/sprite-factory
Josef Stribny 2b1f7fe
Source0: https://rubygems.org/gems/%{gem_name}-%{version}.gem
Josef Stribny 2b1f7fe
BuildRequires: ruby(release)
Josef Stribny 2b1f7fe
BuildRequires: rubygems-devel
Josef Stribny 2b1f7fe
BuildRequires: ruby
Josef Stribny 2b1f7fe
BuildRequires: ruby-RMagick
Josef Stribny 2b1f7fe
BuildRequires: rubygem(chunky_png)
Josef Stribny 2b1f7fe
BuildRequires: rubygem(minitest)
Josef Stribny 2b1f7fe
BuildRequires: pngcrush
Josef Stribny 2b1f7fe
BuildArch: noarch
Josef Stribny 2b1f7fe
Josef Stribny 2b1f7fe
%description
Josef Stribny 2b1f7fe
Combines individual images from a directory into a single sprite image file and creates an appropriate CSS stylesheet.
Josef Stribny 2b1f7fe
Josef Stribny 2b1f7fe
Josef Stribny 2b1f7fe
%package doc
Josef Stribny 2b1f7fe
Summary: Documentation for %{name}
Josef Stribny 2b1f7fe
Group: Documentation
Josef Stribny 2b1f7fe
Requires: %{name} = %{version}-%{release}
Josef Stribny 2b1f7fe
BuildArch: noarch
Josef Stribny 2b1f7fe
Josef Stribny 2b1f7fe
%description doc
Josef Stribny 2b1f7fe
Documentation for %{name}.
Josef Stribny 2b1f7fe
Josef Stribny 2b1f7fe
%prep
Josef Stribny 2b1f7fe
gem unpack %{SOURCE0}
Josef Stribny 2b1f7fe
Josef Stribny 2b1f7fe
%setup -q -D -T -n  %{gem_name}-%{version}
Josef Stribny 2b1f7fe
Josef Stribny 2b1f7fe
gem spec %{SOURCE0} -l --ruby > %{gem_name}.gemspec
Josef Stribny 2b1f7fe
Josef Stribny 2b1f7fe
%build
Josef Stribny 2b1f7fe
gem build %{gem_name}.gemspec
Josef Stribny 2b1f7fe
Josef Stribny 2b1f7fe
%gem_install
Josef Stribny 2b1f7fe
Josef Stribny 2b1f7fe
%install
Josef Stribny 2b1f7fe
mkdir -p %{buildroot}%{gem_dir}
Josef Stribny 2b1f7fe
cp -a .%{gem_dir}/* \
Josef Stribny 2b1f7fe
        %{buildroot}%{gem_dir}/
Josef Stribny 2b1f7fe
Josef Stribny 2b1f7fe
Josef Stribny 2b1f7fe
mkdir -p %{buildroot}%{_bindir}
Josef Stribny 2b1f7fe
cp -a .%{_bindir}/* \
Josef Stribny 2b1f7fe
        %{buildroot}%{_bindir}/
Josef Stribny 2b1f7fe
Josef Stribny 2b1f7fe
find %{buildroot}%{gem_instdir}/bin -type f | xargs chmod a+x
Josef Stribny 2b1f7fe
Josef Stribny 2b1f7fe
%check
Josef Stribny 2b1f7fe
pushd .%{gem_instdir}
Josef Stribny 2b1f7fe
# To run the test suite against minitest 5
Josef Stribny 2b1f7fe
# 2-3 failures, pretty unstable test suite
Josef Stribny 2b1f7fe
# https://github.com/jakesgordon/sprite-factory/issues/37
Josef Stribny 2b1f7fe
ruby -rminitest/autorun -rrubygems -Ilib:test - <
Josef Stribny 2b1f7fe
  module Kernel
Josef Stribny 2b1f7fe
    alias orig_require require
Josef Stribny 2b1f7fe
    remove_method :require
Josef Stribny 2b1f7fe
Josef Stribny 2b1f7fe
    def require path
Josef Stribny 2b1f7fe
      orig_require path unless path == 'test/unit'
Josef Stribny 2b1f7fe
    end
Josef Stribny 2b1f7fe
  end
Josef Stribny 2b1f7fe
  module MiniTest::Assertions
Josef Stribny 2b1f7fe
    def assert_raise(*exp)
Josef Stribny 2b1f7fe
      assert_raises(*exp)
Josef Stribny 2b1f7fe
    end
Josef Stribny 2b1f7fe
  end
Josef Stribny 2b1f7fe
  Test = Minitest
Josef Stribny 2b1f7fe
  Dir.glob("./test/*_test.rb").sort.each { |t| require t }
Josef Stribny 2b1f7fe
EOF
Josef Stribny 2b1f7fe
popd
Josef Stribny 2b1f7fe
Josef Stribny 2b1f7fe
%files
Josef Stribny 2b1f7fe
%dir %{gem_instdir}
Josef Stribny 2b1f7fe
%{_bindir}/sf
Josef Stribny 2b1f7fe
%{gem_instdir}/bin
Josef Stribny 2b1f7fe
%{gem_libdir}
Josef Stribny 2b1f7fe
%exclude %{gem_cache}
Josef Stribny 2b1f7fe
%exclude %{gem_instdir}/.gitignore
Josef Stribny 2b1f7fe
%{gem_spec}
Josef Stribny 2b1f7fe
%doc %{gem_instdir}/LICENSE
Josef Stribny 2b1f7fe
Josef Stribny 2b1f7fe
%files doc
Josef Stribny 2b1f7fe
%doc %{gem_docdir}
Josef Stribny 2b1f7fe
%doc %{gem_instdir}/README.md
Josef Stribny 2b1f7fe
%doc %{gem_instdir}/RELEASE_NOTES.md
Josef Stribny 2b1f7fe
%{gem_instdir}/test
Josef Stribny 2b1f7fe
%{gem_instdir}/Rakefile
Josef Stribny 2b1f7fe
%{gem_instdir}/Gemfile
Josef Stribny 2b1f7fe
%{gem_instdir}/sprite_factory.gemspec
Josef Stribny 2b1f7fe
Josef Stribny 2b1f7fe
%changelog
Josef Stribny 2b1f7fe
* Wed Aug 27 2014 Josef Stribny <jstribny@redhat.com> - 1.6.1-1
Josef Stribny 2b1f7fe
- Update to sprite-factory 1.6.1
Josef Stribny 2b1f7fe
Josef Stribny 2b1f7fe
* Fri Aug 22 2014 Josef Stribny <jstribny@redhat.com> - 1.6.0-2
Josef Stribny 2b1f7fe
- Allow 2 or 3 failures due to the unstability of the test suite
Josef Stribny 2b1f7fe
Josef Stribny 2b1f7fe
* Tue Jul 15 2014 Josef Stribny <jstribny@redhat.com> - 1.6.0-1
Josef Stribny 2b1f7fe
- Initial package