Blame SPECS/rubygem-sass-rails.spec

cc1d14
%{?scl:%scl_package rubygem-%{gem_name}}
cc1d14
%{!?scl:%global pkg_name %{name}}
cc1d14
cc1d14
# Generated from sass-rails-3.2.5.gem by gem2rpm -*- rpm-spec -*-
cc1d14
%global gem_name sass-rails
cc1d14
cc1d14
Summary: Sass adapter for the Rails asset pipeline
cc1d14
Name: %{?scl_prefix}rubygem-%{gem_name}
cc1d14
Version: 4.0.3
cc1d14
Release: 1%{?dist}
cc1d14
Group: Development/Languages
cc1d14
License: MIT
cc1d14
URL: https://github.com/rails/sass-rails
cc1d14
Source0: http://rubygems.org/gems/%{gem_name}-%{version}.gem
cc1d14
# Fix compatibility with sprockets 3.12.
cc1d14
# https://github.com/rails/sass-rails/commit/a62bdf85e56a678aa5fded3d4ed0d10bbc0b7a7b
cc1d14
Patch0: rubygem-sass-rails-4.0.3-template-instead-of-monkey-patching-spsrockets.patch
cc1d14
# https://github.com/rails/sass-rails/commit/bd63297c31aceb079595c3a3d9007b0e4df505b6
cc1d14
Patch1: rubygem-sass-rails-4.0.3-own-importer-instead-of-monkey-patching-sprockets.patch
cc1d14
# https://github.com/rails/sass-rails/commit/e56c2fbf60ef2bd879aae6f6163c90326b4017be
cc1d14
Patch2: rubygem-sass-rails-4.0.3-restore-special-behavior-in-sassimporter.patch
cc1d14
Requires: %{?scl_prefix_ruby}ruby(release)
cc1d14
Requires: %{?scl_prefix_ruby}ruby(rubygems)
cc1d14
Requires: %{?scl_prefix}rubygem(sass) >= 3.1.10
cc1d14
Requires: %{?scl_prefix}rubygem(railties) => 4.0.0
cc1d14
Requires: %{?scl_prefix}rubygem(railties) < 5.0.0
cc1d14
Requires: %{?scl_prefix}rubygem(sprockets-rails) => 2.0.0
cc1d14
Requires: %{?scl_prefix}rubygem(sprockets-rails) < 3.0.0
cc1d14
BuildRequires: %{?scl_prefix_ruby}ruby(release)
cc1d14
BuildRequires: %{?scl_prefix_ruby}rubygems-devel
cc1d14
BuildRequires: %{?scl_prefix_ruby}ruby
cc1d14
BuildRequires: %{?scl_prefix_ruby}rubygem(bundler)
cc1d14
BuildRequires: %{?scl_prefix}rubygem(sqlite3)
cc1d14
BuildRequires: %{?scl_prefix}rubygem(rails)
cc1d14
BuildRequires: %{?scl_prefix}rubygem(sass)
cc1d14
BuildRequires: %{?scl_prefix}rubygem(sprockets)
cc1d14
BuildArch: noarch
cc1d14
Provides: %{?scl_prefix}rubygem(%{gem_name}) = %{version}
cc1d14
cc1d14
%description
cc1d14
Sass adapter for the Rails asset pipeline.
cc1d14
cc1d14
%package doc
cc1d14
Summary: Documentation for %{pkg_name}
cc1d14
Group: Documentation
cc1d14
Requires: %{?scl_prefix}%{pkg_name} = %{version}-%{release}
cc1d14
BuildArch: noarch
cc1d14
cc1d14
%description doc
cc1d14
Documentation for %{pkg_name}.
cc1d14
cc1d14
%prep
cc1d14
%{?scl:scl enable %scl - << \EOF}
cc1d14
gem unpack %{SOURCE0}
cc1d14
%setup -q -D -T -n  %{gem_name}-%{version}
cc1d14
cc1d14
# Use .gemspec shipped with gem, since one patch modifies the dependencies.
cc1d14
# gem spec %%{SOURCE0} -l --ruby > %%{gem_name}.gemspec
cc1d14
cc1d14
%patch0 -p1
cc1d14
%patch1 -p1
cc1d14
%patch2 -p1
cc1d14
cc1d14
%{?scl:EOF}
cc1d14
cc1d14
cc1d14
%build
cc1d14
%{?scl:scl enable %{scl} - << \EOF}
cc1d14
gem build %{gem_name}.gemspec
cc1d14
cc1d14
%gem_install
cc1d14
%{?scl:EOF}
cc1d14
cc1d14
cc1d14
%install
cc1d14
mkdir -p %{buildroot}%{gem_dir}
cc1d14
cp -a .%{gem_dir}/* \
cc1d14
        %{buildroot}%{gem_dir}/
cc1d14
cc1d14
%check
cc1d14
%{?scl:scl enable %scl - << \EOF}
cc1d14
set -e
cc1d14
cc1d14
pushd .%{gem_instdir}
cc1d14
# Use just locally available gems.
cc1d14
sed -i -r 's/runcmd "bundle install --verbose/\0 --local/' test/support/sass_rails_test_case.rb
cc1d14
cc1d14
# Explicitly depend on RDoc.
cc1d14
echo 'gem "rdoc"' >> Gemfile
cc1d14
sed -i '/possible_dev_dependencies/ s/%w(/%w(rdoc /' test/test_helper.rb
cc1d14
cc1d14
# Require action_controller explicitely. This should be fixed with RoR 4.1.2+.
cc1d14
# https://github.com/rails/sass-rails/issues/205
cc1d14
ruby -I.:test -raction_controller -e 'Dir.glob "test/**/*_test.rb", &method(:require)'
cc1d14
popd
cc1d14
%{?scl:EOF}
cc1d14
cc1d14
cc1d14
%files
cc1d14
%dir %{gem_instdir}
cc1d14
%exclude %{gem_instdir}/.*
cc1d14
%{gem_instdir}/MIT-LICENSE
cc1d14
%{gem_libdir}
cc1d14
%exclude %{gem_cache}
cc1d14
%{gem_spec}
cc1d14
cc1d14
%files doc
cc1d14
%doc %{gem_docdir}
cc1d14
%doc %{gem_instdir}/README.md
cc1d14
%doc %{gem_instdir}/CHANGELOG.md
cc1d14
%{gem_instdir}/Gemfile
cc1d14
%{gem_instdir}/Rakefile
cc1d14
%{gem_instdir}/sass-rails.gemspec
cc1d14
%{gem_instdir}/sass-rails.gemspec.erb
cc1d14
# Leave out the test suite, since rpmlint complains a lot about dot and
cc1d14
# empty files.
cc1d14
%exclude %{gem_instdir}/test
cc1d14
cc1d14
%changelog
cc1d14
* Tue Jul 01 2014 Vít Ondruch <vondruch@redhat.com> - 4.0.3-1
cc1d14
- Update to sass-rails 4.0.3.
cc1d14
cc1d14
* Thu Oct 17 2013 Josef Stribny <jstribny@redhat.com> - 4.0.0-2
cc1d14
- Convert to scl
cc1d14
cc1d14
* Mon Aug 05 2013 Josef Stribny <jstribny@redhat.com> - 4.0.0-1
cc1d14
- Update to sass-rails 4.0.0
cc1d14
cc1d14
* Sun Aug 04 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 3.2.6-2
cc1d14
- Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild
cc1d14
cc1d14
* Mon Mar 11 2013 Vít Ondruch <vondruch@redhat.com> - 3.2.6-1
cc1d14
- Rebuild for https://fedoraproject.org/wiki/Features/Ruby_2.0.0
cc1d14
- Update to sass-rails 3.2.6.
cc1d14
cc1d14
* Thu Feb 14 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 3.2.5-2
cc1d14
- Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild
cc1d14
cc1d14
* Mon Jul 23 2012 Vít Ondruch <vondruch@redhat.com> - 3.2.5-1
cc1d14
- Initial package