Blame SPECS/rubygem-erubis.spec

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