Blame SPECS/rubygem-tilt.spec

c66f1c
%{?scl:%scl_package rubygem-%{gem_name}}
c66f1c
%{!?scl:%global pkg_name %{name}}
c66f1c
c66f1c
# Fallback to rh-nodejs4 rh-nodejs4-scldevel is probably not available in
c66f1c
# the buildroot.
c66f1c
%{?scl:%{!?scl_nodejs:%global scl_nodejs rh-nodejs4}}
c66f1c
%{?scl:%{!?scl_prefix_nodejs:%global scl_prefix_nodejs %{scl_nodejs}-}}
c66f1c
c66f1c
%global gem_name tilt
c66f1c
c66f1c
# When we are bootstrapping, we drop some dependencies, and/or build time tests.
c66f1c
# Set this to 0 after we've bootstrapped.
c66f1c
%{!?_with_bootstrap: %global bootstrap 0}
c66f1c
c66f1c
Name: %{?scl_prefix}rubygem-%{gem_name}
c66f1c
Version: 2.0.5
c66f1c
Release: 1%{?dist}
c66f1c
Summary: Generic interface to multiple Ruby template engines
c66f1c
Group: Development/Languages
c66f1c
License: MIT
c66f1c
URL: http://github.com/rtomayko/%{gem_name}
c66f1c
Source0: https://rubygems.org/gems/%{gem_name}-%{version}.gem
c66f1c
c66f1c
BuildRequires: %{?scl_prefix_ruby}ruby(release)
c66f1c
BuildRequires: %{?scl_prefix_ruby}rubygems-devel
c66f1c
BuildRequires: %{?scl_prefix_ruby}ruby
c66f1c
BuildRequires: %{?scl_prefix_ruby}rubygem(minitest)
c66f1c
BuildRequires: %{?scl_prefix}rubygem(nokogiri)
c66f1c
BuildRequires: %{?scl_prefix}rubygem(erubis)
c66f1c
BuildRequires: %{?scl_prefix}rubygem(builder)
c66f1c
BuildRequires: %{?scl_prefix}rubygem(coffee-script)
c66f1c
BuildRequires: %{?scl_prefix}rubygem(sass)
c66f1c
c66f1c
# Optional (template engines)
c66f1c
#BuildRequires: %{?scl_prefix}rubygem(creole)
c66f1c
#BuildRequires: %{?scl_prefix}rubygem(maruku)
c66f1c
#BuildRequires: %{?scl_prefix}rubygem(RedCloth)
c66f1c
#BuildRequires: %{?scl_prefix}rubygem(redcarpet)
c66f1c
#BuildRequires: %{?scl_prefix}rubygem(wikicloth)
c66f1c
#BuildRequires: %{?scl_prefix}rubygem(kramdown)
c66f1c
#BuildRequires: %{?scl_prefix}rubygem(rdiscount)
c66f1c
#BuildRequires: %{?scl_prefix}rubygem(liquid)
c66f1c
c66f1c
# Asciidoctor fails: AsciidoctorTemplateTest#test_preparing_and_evaluating_docbook_templates_on_render
c66f1c
# BuildRequires: %{?scl_prefix}rubygem(asciidoctor)
c66f1c
c66f1c
# Markaby test fails. It is probably due to rather old version found in Fedora.
c66f1c
# https://github.com/rtomayko/tilt/issues/96
c66f1c
# BuildRequires: %{?scl_prefix}rubygem(markaby)
c66f1c
c66f1c
%if ! 0%{?bootstrap}
c66f1c
#BuildRequires: %{?scl_prefix}rubygem(haml)
c66f1c
%endif
c66f1c
c66f1c
BuildRequires: %{?scl_prefix_nodejs}nodejs
c66f1c
c66f1c
BuildArch:     noarch
c66f1c
Requires:      %{?scl_prefix}%{pkg_name} = %{version}-%{release}
c66f1c
Provides:      %{?scl_prefix}rubygem(%{gem_name}) = %{version}
c66f1c
c66f1c
# Explicitly require runtime subpackage, as long as older scl-utils do not generate it
c66f1c
%{?scl:Requires: %{?scl_prefix}runtime}
c66f1c
c66f1c
%description
c66f1c
Generic interface to multiple Ruby template engines.
c66f1c
c66f1c
%package doc
c66f1c
Summary: Documentation for %{pkg_name}
c66f1c
Group: Documentation
c66f1c
Requires: %{?scl_prefix}%{pkg_name} = %{version}-%{release}
c66f1c
BuildArch: noarch
c66f1c
c66f1c
%description doc
c66f1c
Documentation for %{pkg_name}.
c66f1c
c66f1c
%prep
c66f1c
%setup -n %{pkg_name}-%{version} -q -c -T
c66f1c
%{?scl:scl enable %{scl} - << \EOF}
c66f1c
%gem_install -n %{SOURCE0}
c66f1c
%{?scl:EOF}
c66f1c
c66f1c
%build
c66f1c
c66f1c
%install
c66f1c
mkdir -p %{buildroot}%{gem_dir}
c66f1c
cp -a .%{gem_dir}/* \
c66f1c
        %{buildroot}%{gem_dir}/
c66f1c
c66f1c
mkdir -p %{buildroot}%{_bindir}
c66f1c
cp -a .%{_bindir}/* \
c66f1c
        %{buildroot}%{_bindir}/
c66f1c
c66f1c
find %{buildroot}%{gem_instdir}/bin -type f | xargs chmod a+x
c66f1c
c66f1c
%check
c66f1c
%if 0%{bootstrap} < 1
c66f1c
pushd .%{gem_instdir}
c66f1c
# Get rid of Bundler.
c66f1c
sed -i '/[Bb]undler/ s/^/#/' test/test_helper.rb
c66f1c
c66f1c
%{?scl:scl enable %{scl} %{scl_nodejs} - << \EOF}
c66f1c
LANG=en_US.utf8 ruby -Ilib:test -e 'Dir.glob "./test/**/*_test.rb", &method(:require)'
c66f1c
%{?scl:EOF}
c66f1c
popd
c66f1c
%endif
c66f1c
c66f1c
%files
c66f1c
%dir %{gem_instdir}
c66f1c
%{_bindir}/%{gem_name}
c66f1c
%{gem_instdir}/COPYING
c66f1c
%exclude %{gem_instdir}/%{gem_name}.gemspec
c66f1c
%exclude %{gem_instdir}/.*
c66f1c
%exclude %{gem_instdir}/Gemfile
c66f1c
%{gem_instdir}/bin
c66f1c
%{gem_libdir}
c66f1c
%doc %{gem_instdir}/README.md
c66f1c
%exclude %{gem_cache}
c66f1c
%{gem_spec}
c66f1c
c66f1c
%files doc
c66f1c
%doc %{gem_docdir}
c66f1c
%doc %{gem_instdir}/CHANGELOG.md
c66f1c
%doc %{gem_instdir}/HACKING
c66f1c
%{gem_instdir}/Rakefile
c66f1c
%doc %{gem_instdir}/docs
c66f1c
# Man pages are generated from the ronn format pages with ronn on Fedora.
c66f1c
# However we directly use the ronn format man pages on SCL,
c66f1c
# because we do not ship ronn on SCL.
c66f1c
%doc %{gem_instdir}/man
c66f1c
%{gem_instdir}/test
c66f1c
c66f1c
%changelog
c66f1c
* Wed Nov 02 2016 Jun Aruga <jaruga@redhat.com> - 2.0.5-1
c66f1c
- Update to 2.0.5
c66f1c
c66f1c
* Thu Feb 25 2016 Pavel Valena <pvalena@redhat.com> - 2.0.1-3
c66f1c
- Update to 2.0.1
c66f1c
c66f1c
* Fri Jan 16 2015 Josef Stribny <jstribny@redhat.com> - 1.4.1-1
c66f1c
- Update to 1.4.1
c66f1c
c66f1c
* Fri Mar 21 2014 Vít Ondruch <vondruch@redhat.com> - 1.3.3-13
c66f1c
- Rebuid against new scl-utils to depend on -runtime package.
c66f1c
  Resolves: rhbz#1069109
c66f1c
c66f1c
* Thu Nov 28 2013 Josef Stribny <jstribny@redhat.com> - 1.3.3-12
c66f1c
- Get rid of patch leftovers
c66f1c
c66f1c
* Thu Jun 13 2013 Josef Stribny <jstribny@redhat.com> - 1.3.3-11
c66f1c
- Rebuild for https://fedoraproject.org/wiki/Features/Ruby_2.0.0
c66f1c
- Patch for RDoc 4.0
c66f1c
c66f1c
* Wed Jun 12 2013 Josef Stribny <jstribny@redhat.com> - 1.3.3-10
c66f1c
- Remove RDoc patch
c66f1c
  - Resolves: rhbz#969099
c66f1c
c66f1c
* Thu Apr 25 2013 Vít Ondruch <vondruch@redhat.com> - 1.3.3-9
c66f1c
- Fix unowned directory (rhbz#912046, rhbz#956236).
c66f1c
c66f1c
* Tue Jul 31 2012 Bohuslav Kabrda <bkabrda@redhat.com> - 1.3.3-8
c66f1c
- Exclude the cached gem.
c66f1c
c66f1c
* Thu Jul 26 2012 Bohuslav Kabrda <bkabrda@redhat.com> - 1.3.3-7
c66f1c
- Specfile cleanup
c66f1c
c66f1c
* Thu May 31 2012 Bohuslav Kabrda <bkabrda@redhat.com> - 1.3.3-6
c66f1c
- Fix the rdoc test patch to apply cleanly.
c66f1c
c66f1c
* Thu Apr 26 2012 Bohuslav Kabrda <bkabrda@redhat.com> - 1.3.3-5
c66f1c
- Fix the rdoc template tests.
c66f1c
c66f1c
* Mon Apr 02 2012 Bohuslav Kabrda <bkabrda@redhat.com> - 1.3.3-4
c66f1c
- Rebuilt for scl.
c66f1c
c66f1c
* Fri Feb 03 2012 Bohuslav Kabrda <bkabrda@redhat.com> - 1.3.3-3
c66f1c
- Allowed running the tests.
c66f1c
c66f1c
* Tue Jan 24 2012 Bohuslav Kabrda <bkabrda@redhat.com> - 1.3.3-2
c66f1c
- Rebuilt for Ruby 1.9.3.
c66f1c
- Introduced %%bootstrap macro to deal with dependency loop for BuildRequires.
c66f1c
c66f1c
* Mon Jan 16 2012 Bohuslav Kabrda <bkabrda@redhat.com> - 1.3.3-1
c66f1c
- Updated to tilt 1.3.3.
c66f1c
- Removed patch that fixed BZ #715713, as it is a part of this version.
c66f1c
- Excluded unnecessary files.
c66f1c
c66f1c
* Sat Jan 14 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.3.2-2
c66f1c
- Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild
c66f1c
c66f1c
* Wed Jul 20 2011 Vít Ondruch <vondruch@redhat.com> - 1.3.2-1
c66f1c
- Updated to the tilt 1.3.2.
c66f1c
- Test suite for erubis, haml, builder and RedCloth template engines enabled.
c66f1c
c66f1c
* Fri Jun 24 2011 Vít Ondruch <vondruch@redhat.com> - 1.2.2-3
c66f1c
- Fixes FTBFS (rhbz#715713).
c66f1c
c66f1c
* Thu Feb 10 2011 Vít Ondruch <vondruch@redhat.com> - 1.2.2-2
c66f1c
- Test moved to doc subpackage
c66f1c
- %{gem_name} macro used whenever possible.
c66f1c
c66f1c
* Mon Feb 07 2011 Vít Ondruch <vondruch@redhat.com> - 1.2.2-1
c66f1c
- Initial package
c66f1c