Blame SPECS/rubygem-erubis.spec

3322d9
%{?scl:%scl_package rubygem-%{gem_name}}
3322d9
%{!?scl:%global pkg_name %{name}}
3322d9
3322d9
# Generated from erubis-2.6.5.gem by gem2rpm -*- rpm-spec -*-
3322d9
%global gem_name erubis
3322d9
3322d9
3322d9
Summary: A fast and extensible eRuby implementation
3322d9
Name: %{?scl_prefix}rubygem-%{gem_name}
3322d9
Version: 2.7.0
3322d9
Release: 15%{?dist}
3322d9
Group: Development/Languages
3322d9
License: MIT
3322d9
URL: http://www.kuwata-lab.com/erubis/
3322d9
Source0: http://gems.rubyforge.org/gems/%{gem_name}-%{version}.gem
3322d9
# needed for tests, to get it, run
3322d9
# git clone https://github.com/kwatch/erubis && cd erubis
3322d9
# git checkout 14d3eab57f && tar czvf erubis-2.7.0-public_html.tgz public_html
3322d9
Source1: %{gem_name}-%{version}-public_html.tgz
3322d9
# Fixes issues with test suite using Psych.
3322d9
# https://github.com/kwatch/erubis/pull/2
3322d9
Patch0: rubygem-erubis-2.7.0-ruby-2.0-compatibility.patch
3322d9
# https://github.com/kwatch/erubis/pull/5
3322d9
Patch1: rubygem-erubis-2.7-Add-support-for-Ruby-2.1.patch
3322d9
Patch2: rubygem-erubis-2.7.0-Add-support-for-Ruby-2.2.patch
3322d9
3322d9
Requires: %{?scl_prefix_ruby}ruby(rubygems)
3322d9
Requires: %{?scl_prefix_ruby}ruby(release)
3322d9
BuildRequires: %{?scl_prefix_ruby}rubygems-devel
3322d9
BuildRequires: %{?scl_prefix_ruby}ruby(release)
3322d9
BuildRequires: %{?scl_prefix_ruby}rubygem(test-unit)
3322d9
BuildArch: noarch
3322d9
Provides: %{?scl_prefix}rubygem(%{gem_name}) = %{version}
3322d9
3322d9
%description
3322d9
Erubis is a very fast, secure, and extensible implementation of eRuby.
3322d9
3322d9
%package doc
3322d9
Summary: Documentation for %{pkg_name}
3322d9
Group: Documentation
3322d9
# contrib/erubis-run.rb is BSD
3322d9
License: MIT and BSD
3322d9
Requires: %{?scl_prefix}%{pkg_name} = %{version}-%{release}
3322d9
3322d9
%description doc
3322d9
This package contains documentation for %{pkg_name}.
3322d9
3322d9
%prep
3322d9
mkdir -p .%{_bindir}
3322d9
%{?scl:scl enable %{scl} - << \EOF}
3322d9
%gem_install -n %{SOURCE0}
3322d9
%{?scl:EOF}
3322d9
3322d9
pushd .%{gem_instdir}
3322d9
%patch0 -p1
3322d9
%patch1 -p1
3322d9
%patch2 -p1
3322d9
popd
3322d9
3322d9
%build
3322d9
3322d9
%install
3322d9
mkdir -p %{buildroot}%{gem_dir}
3322d9
mkdir -p %{buildroot}%{_bindir}
3322d9
3322d9
cp -a .%{gem_dir}/* %{buildroot}%{gem_dir}/
3322d9
cp -a .%{_bindir}/* %{buildroot}%{_bindir}/
3322d9
3322d9
find %{buildroot}%{gem_instdir}/bin -type f | xargs chmod a+x
3322d9
3322d9
%{?scl:scl enable %{scl} - << \EOF}
3322d9
find %{buildroot}%{gem_instdir}/ -type f | \
3322d9
  xargs -n 1 sed -i -e "s|^#\!/usr/bin/env ruby|#\!`which ruby`|"
3322d9
%{?scl:EOF}
3322d9
3322d9
%check
3322d9
%{?scl:scl enable %{scl} - << \EOF}
3322d9
set -e
3322d9
export GEM_PATH=%{buildroot}%{gem_dir}:%{gem_dir}:$GEM_PATH
3322d9
export PATH=%{buildroot}%{_bindir}:$PATH
3322d9
3322d9
pushd .%{gem_instdir}
3322d9
tar xzf %{SOURCE1}
3322d9
3322d9
# Wrong filename - reported upstream via
3322d9
# http://rubyforge.org/tracker/?func=detail&aid=27330&group_id=1320&atid=5201
3322d9
mv test/data/users-guide/{E,e}xample.ejava
3322d9
3322d9
# test_untabify2(MainTest) test fails. It is not obvious how to make it run
3322d9
# with Psych, since Psych by design denies tabified YAML, where it was
3322d9
# acceptable for Syck (if I am not mistaken).
3322d9
# TODO: This could be ignored by --ignore-name= param if only it worked.
3322d9
# https://github.com/test-unit/test-unit/issues/92
3322d9
sed -i '/^  def test_untabify2/,/^  end$/ s/^/#/' test/test-main.rb
3322d9
3322d9
ruby -I.:lib -e "Dir.glob('./test/test-*.rb').each {|t| require t}" \
3322d9
 | grep '158 tests, 234 assertions, 3 failures, 0 errors, 0 pendings, 0 omissions'
3322d9
popd
3322d9
%{?scl:EOF}
3322d9
3322d9
%files
3322d9
%{_bindir}/erubis
3322d9
%doc %{gem_instdir}/CHANGES.txt
3322d9
%doc %{gem_instdir}/MIT-LICENSE
3322d9
%doc %{gem_instdir}/README.txt
3322d9
%dir %{gem_instdir}
3322d9
3322d9
# We install via gem
3322d9
%exclude %{gem_instdir}/setup.rb
3322d9
# Only needed for tests
3322d9
%exclude %{gem_instdir}/public_html
3322d9
3322d9
%{gem_instdir}/bin
3322d9
%{gem_libdir}
3322d9
%exclude %{gem_cache}
3322d9
%{gem_spec}
3322d9
3322d9
%files doc
3322d9
%{gem_instdir}/benchmark
3322d9
%{gem_instdir}/test
3322d9
%{gem_instdir}/examples
3322d9
%{gem_instdir}/contrib
3322d9
3322d9
# Prefer generated rdoc
3322d9
%exclude %{gem_instdir}/doc-api
3322d9
3322d9
%{gem_instdir}/doc
3322d9
%{gem_docdir}
3322d9
3322d9
%changelog
3322d9
* Thu Apr 07 2016 Pavel Valena <pvalena@redhat.com> - 2.7.0-15
3322d9
- Fix changelog entry
3322d9
3322d9
* Wed Apr 06 2016 Pavel Valena <pvalena@redhat.com> - 2.7.0-14
3322d9
- Make test failure fail the build
3322d9
- Allow 3 failing tests
3322d9
3322d9
* Wed Mar 02 2016 Pavel Valena <pvalena@redhat.com> - 2.7.0-13
3322d9
- Fix shebang path replacement
3322d9
3322d9
* Tue Feb 23 2016 Pavel Valena <pvalena@redhat.com> - 2.7.0-12
3322d9
- Enable tests
3322d9
3322d9
* Mon Feb 22 2016 Pavel Valena <pvalena@redhat.com> - 2.7.0-11
3322d9
- Rebuilt for rh-ror42
3322d9
3322d9
* Thu Jan 15 2015 Josef Stribny <jstribny@redhat.com> - 2.7.0-8
3322d9
- rebuilt for ror41
3322d9
3322d9
* Fri Mar 21 2014 Vít Ondruch <vondruch@redhat.com> - 2.7.0-7
3322d9
- Rebuid against new scl-utils to depend on -runtime package.
3322d9
  Resolves: rhbz#1069109
3322d9
3322d9
* Mon Feb 03 2014 Josef Stribny <jstribny@redhat.com> - 2.7.0-6
3322d9
- Fix license in -doc subpackage
3322d9
3322d9
* Thu Jun 13 2013 Josef Stribny <jstribny@redhat.com> - 2.7.0-5
3322d9
- Rebuild for https://fedoraproject.org/wiki/Features/Ruby_2.0.0
3322d9
3322d9
* Wed Jul 25 2012 Bohuslav Kabrda <bkabrda@redhat.com> - 2.7.0-4
3322d9
- Exclude cached gem, not libdir.
3322d9
3322d9
* Wed Jul 25 2012 Bohuslav Kabrda <bkabrda@redhat.com> - 2.7.0-3
3322d9
- Specfile cleanup
3322d9
3322d9
* Thu May 31 2012 Bohuslav Kabrda <bkabrda@redhat.com> - 2.7.0-2
3322d9
- Removed uneeded patch from specfile.
3322d9
3322d9
* Mon Apr 02 2012 Bohuslav Kabrda <bkabrda@redhat.com> - 2.7.0-1
3322d9
- Rebuilt for scl.
3322d9
- Updated to 2.7.0.
3322d9
3322d9
* Tue Jan 31 2012 Bohuslav Kabrda <bkabrda@redhat.com> - 2.6.6-3
3322d9
- Rebuilt for Ruby 1.9.3.
3322d9
3322d9
* Sat Jan 14 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.6.6-2
3322d9
- Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild
3322d9
3322d9
* Mon Feb 14 2011 Vít Ondruch <vondruch@redhat.com> - 2.6.6-1
3322d9
- Updated to the latest upstream (#670589).
3322d9
- Removed flawed require check.
3322d9
- Removed obsolete BuildRoot.
3322d9
- Removed obsolete cleanup.
3322d9
- Package setup and test execution reworked.
3322d9
- Removed bindir magick.
3322d9
3322d9
* Wed Feb 09 2011 Fedora Release Engineering <rel-eng@lists.fedoraproject.org>
3322d9
- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild
3322d9
3322d9
* Thu Oct 29 2009 Matthew Kent <mkent@magoazul.com> - 2.6.5-2
3322d9
- Move file rename to build stage (#530275).
3322d9
- Simplify %%check stage (#530275).
3322d9
- Remove disable of test_syntax2, fixed by new ruby build (#530275).
3322d9
3322d9
* Mon Oct 19 2009 Matthew Kent <mkent@magoazul.com> - 2.6.5-1
3322d9
- Initial package