Blame SPECS/rubygem-loofah.spec

f25c96
%{?scl:%scl_package rubygem-%{gem_name}}
f25c96
%{!?scl:%global pkg_name %{name}}
f25c96
f25c96
%global gem_name loofah
f25c96
f25c96
Name: %{?scl_prefix}rubygem-%{gem_name}
f25c96
Version: 2.0.3
f25c96
Release: 3%{?dist}
f25c96
Summary: Manipulate and transform HTML/XML documents and fragments
f25c96
Group: Development/Languages
f25c96
License: MIT
f25c96
URL: https://github.com/flavorjones/loofah
f25c96
Source0: https://rubygems.org/gems/%{gem_name}-%{version}.gem
f25c96
Patch0001: 0001-Updating-test-to-support-libxml-2.9.3-behavior.patch
f25c96
f25c96
Requires: %{?scl_prefix_ruby}ruby(release)
f25c96
Requires: %{?scl_prefix_ruby}ruby(rubygems)
f25c96
Requires: %{?scl_prefix}rubygem(nokogiri) >= 1.6.6.2
f25c96
BuildRequires: %{?scl_prefix_ruby}ruby(release)
f25c96
BuildRequires: %{?scl_prefix_ruby}rubygems-devel
f25c96
BuildRequires: %{?scl_prefix}rubygem(nokogiri) >= 1.6.6.2
f25c96
BuildRequires: %{?scl_prefix_ruby}rubygem(minitest)
f25c96
BuildRequires: %{?scl_prefix}rubygem(rr)
f25c96
BuildArch: noarch
f25c96
Provides: %{?scl_prefix}rubygem(%{gem_name}) = %{version}
f25c96
f25c96
%description
f25c96
Loofah is a general library for manipulating and transforming HTML/XML
f25c96
documents and fragments. It's built on top of Nokogiri and libxml2, so
f25c96
it's fast and has a nice API.
f25c96
Loofah excels at HTML sanitization (XSS prevention). It includes some
f25c96
nice HTML sanitizers, which are based on HTML5lib's whitelist, so it
f25c96
most likely won't make your codes less secure.
f25c96
f25c96
%package doc
f25c96
Summary: Documentation for %{pkg_name}
f25c96
Group: Documentation
f25c96
Requires: %{?scl_prefix}%{pkg_name} = %{version}-%{release}
f25c96
BuildArch: noarch
f25c96
f25c96
%description doc
f25c96
Documentation for %{pkg_name}
f25c96
f25c96
%prep
f25c96
%{?scl:scl enable %{scl} - << \EOF}
f25c96
gem unpack %{SOURCE0}
f25c96
%{?scl:EOF}
f25c96
f25c96
%autosetup -p 1 -D -T -n  %{gem_name}-%{version}
f25c96
f25c96
%{?scl:scl enable %{scl} - << \EOF}
f25c96
gem spec %{SOURCE0} -l --ruby > %{gem_name}.gemspec
f25c96
%{?scl:EOF}
f25c96
f25c96
# Remove developer-only files.
f25c96
for f in .gemtest Gemfile Rakefile; do
f25c96
  rm $f
f25c96
  sed -i "s|\"$f\",*||g" %{gem_name}.gemspec
f25c96
done
f25c96
f25c96
%build
f25c96
%{?scl:scl enable %{scl} - << \EOF}
f25c96
gem build %{gem_name}.gemspec
f25c96
%gem_install
f25c96
%{?scl:EOF}
f25c96
f25c96
f25c96
%install
f25c96
mkdir -p %{buildroot}%{gem_dir}
f25c96
cp -a  .%{gem_dir}/* \
f25c96
        %{buildroot}%{gem_dir}/
f25c96
f25c96
%check
f25c96
pushd .%{gem_instdir}
f25c96
%{?scl:scl enable %{scl} - << \EOF}
f25c96
  ruby -I"lib:test" -e \
f25c96
    'Dir.glob "./test/**/test_*.rb", &method(:require)'
f25c96
%{?scl:EOF}
f25c96
popd
f25c96
f25c96
%files
f25c96
%dir %{gem_instdir}
f25c96
%license %{gem_instdir}/MIT-LICENSE.txt
f25c96
%doc %{gem_instdir}/README.rdoc
f25c96
%{gem_libdir}
f25c96
%exclude %{gem_cache}
f25c96
%{gem_spec}
f25c96
f25c96
%files doc
f25c96
%doc %{gem_docdir}
f25c96
%doc %{gem_instdir}/Manifest.txt
f25c96
%doc %{gem_instdir}/CHANGELOG.rdoc
f25c96
%exclude %{gem_instdir}/benchmark
f25c96
%exclude %{gem_instdir}/test
f25c96
f25c96
%changelog
f25c96
* Mon Feb 22 2016 Pavel Valena <pvalena@redhat.com> - 2.0.3-3
f25c96
- Add scl macros
f25c96
f25c96
* Thu Feb 04 2016 Fedora Release Engineering <releng@fedoraproject.org> - 2.0.3-2
f25c96
- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild
f25c96
f25c96
* Mon Jan 11 2016 Ken Dreyer <ktdreyer@ktdreyer.com> - 2.0.3-1
f25c96
- Update to loofah 2.0.3 (rhbz#1256165)
f25c96
- Use %%autosetup macro
f25c96
- Drop macros for Fedora 20 (it is now EOL)
f25c96
- Drop unneeded %%license definition
f25c96
f25c96
* Thu Jun 18 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.0.2-2
f25c96
- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild
f25c96
f25c96
* Mon May 25 2015 Ken Dreyer <ktdreyer@ktdreyer.com> - 2.0.2-1
f25c96
- Update to loofah 2.0.2 (rhbz#1218819)
f25c96
- Drop patch to skip failing test (it works now, with Nokogiri 1.6.6.2)
f25c96
- Drop Fedora 19 support
f25c96
- Use %%license macro
f25c96
f25c96
* Thu Sep 11 2014 Ken Dreyer <ktdreyer@ktdreyer.com> - 2.0.1-1
f25c96
- Update to loofah 2.0.1 (RHBZ #1132898)
f25c96
- Drop upstreamed RR patch
f25c96
f25c96
* Sun Jun 08 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.0.0-2
f25c96
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild
f25c96
f25c96
* Mon May 12 2014 Ken Dreyer <ktdreyer@ktdreyer.com> - 2.0.0-1
f25c96
- Update to loofah 2.0.0 (RHBZ #1096760)
f25c96
- Adjustments for https://fedoraproject.org/wiki/Changes/Ruby_2.1
f25c96
f25c96
* Sat Dec 28 2013 Ken Dreyer <ktdreyer@ktdreyer.com> - 1.2.1-1
f25c96
- Initial package