2020-08-21 10:30:00 +08:00
|
|
|
%global gem_name tilt
|
|
|
|
|
%{?_with_bootstrap: %global bootstrap 1}
|
|
|
|
|
Name: rubygem-%{gem_name}
|
|
|
|
|
Version: 2.0.8
|
2021-02-08 15:58:59 +08:00
|
|
|
Release: 3
|
2020-08-21 10:30:00 +08:00
|
|
|
Summary: Generic interface to multiple Ruby template engines
|
|
|
|
|
License: MIT
|
|
|
|
|
URL: http://github.com/rtomayko/tilt
|
|
|
|
|
Source0: https://rubygems.org/gems/tilt-%{version}.gem
|
|
|
|
|
BuildRequires: ruby(release) rubygems-devel ruby nodejs-devel rubygem(creole)
|
|
|
|
|
BuildRequires: rubygem(minitest) rubygem(nokogiri) rubygem(erubis) rubygem(builder)
|
|
|
|
|
BuildRequires: rubygem(maruku) rubygem(RedCloth) rubygem(redcarpet) rubygem(coffee-script)
|
|
|
|
|
BuildRequires: rubygem(wikicloth) rubygem(kramdown) rubygem(rdiscount) rubygem(liquid)
|
|
|
|
|
BuildRequires: rubygem(sass) rubygem(asciidoctor) rubygem(prawn) rubygem(pdf-reader)
|
|
|
|
|
%if ! 0%{?bootstrap}
|
|
|
|
|
BuildRequires: rubygem(haml)
|
|
|
|
|
%endif
|
2021-02-08 15:58:59 +08:00
|
|
|
BuildRequires: rubygem-ronn-ng
|
2020-08-21 10:30:00 +08:00
|
|
|
BuildArch: noarch
|
|
|
|
|
%description
|
|
|
|
|
Generic interface to multiple Ruby template engines.
|
|
|
|
|
|
2020-08-24 15:45:04 +08:00
|
|
|
%package help
|
2020-08-21 10:30:00 +08:00
|
|
|
Summary: Documentation for %{name}
|
|
|
|
|
Requires: %{name} = %{version}-%{release}
|
|
|
|
|
BuildArch: noarch
|
2020-08-24 15:45:04 +08:00
|
|
|
Provides: %{name}-doc = %{version}-%{release}
|
|
|
|
|
Obsoletes: %{name}-doc < %{version}-%{release}
|
|
|
|
|
%description help
|
2020-08-21 10:30:00 +08:00
|
|
|
Documentation for %{name}.
|
|
|
|
|
|
|
|
|
|
%prep
|
|
|
|
|
%setup -q -c -T
|
|
|
|
|
%gem_install -n %{SOURCE0}
|
|
|
|
|
sed -i -e 's|/usr/bin/env ruby|/usr/bin/ruby|' .%{gem_instdir}/bin/tilt
|
|
|
|
|
|
|
|
|
|
%build
|
|
|
|
|
|
|
|
|
|
%install
|
|
|
|
|
mkdir -p %{buildroot}%{gem_dir}
|
|
|
|
|
cp -a .%{gem_dir}/* \
|
|
|
|
|
%{buildroot}%{gem_dir}/
|
|
|
|
|
mkdir -p %{buildroot}%{_bindir}
|
|
|
|
|
cp -a .%{_bindir}/* \
|
|
|
|
|
%{buildroot}%{_bindir}/
|
|
|
|
|
pushd %{buildroot}%{gem_instdir}
|
|
|
|
|
ronn --manual="Tilt Manual" --organization="Tilt %{version}" -r man/*.ronn
|
|
|
|
|
mkdir -p %{buildroot}%{_mandir}/man1
|
|
|
|
|
mv man/*.1 %{buildroot}%{_mandir}/man1
|
|
|
|
|
popd
|
|
|
|
|
find %{buildroot}%{gem_instdir}/bin -type f | xargs chmod a+x
|
|
|
|
|
|
|
|
|
|
%check
|
|
|
|
|
%if ! 0%{?bootstrap}
|
|
|
|
|
pushd .%{gem_instdir}
|
|
|
|
|
sed -i '/[Bb]undler/ s/^/#/' test/test_helper.rb
|
2020-12-29 15:24:37 +08:00
|
|
|
#DocBook 4.5 has been removed since AsciiDoctor 2.0.0.
|
|
|
|
|
#htps://github.com/asciidoctor/asciidoctor/issues/3005
|
|
|
|
|
sed -i '/docbook 4.5/a\ skip' test/tilt_asciidoctor_test.rb
|
2020-08-21 10:30:00 +08:00
|
|
|
LANG=C.UTF-8 ruby -Ilib:test -e 'Dir.glob "./test/**/*_test.rb", &method(:require)'
|
|
|
|
|
popd
|
|
|
|
|
%endif
|
|
|
|
|
|
|
|
|
|
%files
|
|
|
|
|
%dir %{gem_instdir}
|
|
|
|
|
%{_bindir}/%{gem_name}
|
|
|
|
|
%license %{gem_instdir}/COPYING
|
|
|
|
|
%exclude %{gem_instdir}/%{gem_name}.gemspec
|
|
|
|
|
%exclude %{gem_instdir}/.*
|
|
|
|
|
%exclude %{gem_instdir}/Gemfile
|
|
|
|
|
%{gem_instdir}/bin
|
|
|
|
|
%{gem_libdir}
|
|
|
|
|
%doc %{gem_instdir}/README.md
|
|
|
|
|
%exclude %{gem_instdir}/man
|
|
|
|
|
%exclude %{gem_cache}
|
|
|
|
|
%{gem_spec}
|
|
|
|
|
%doc %{_mandir}/man1/*
|
|
|
|
|
|
2020-08-24 15:45:04 +08:00
|
|
|
%files help
|
2020-08-21 10:30:00 +08:00
|
|
|
%doc %{gem_docdir}
|
|
|
|
|
%doc %{gem_instdir}/CHANGELOG.md
|
|
|
|
|
%doc %{gem_instdir}/HACKING
|
|
|
|
|
%{gem_instdir}/Rakefile
|
|
|
|
|
%doc %{gem_instdir}/docs
|
|
|
|
|
%{gem_instdir}/test
|
|
|
|
|
|
|
|
|
|
%changelog
|
2021-02-08 15:58:59 +08:00
|
|
|
* Sun Feb 07 2020 huanghaitao <huanghaitao8@huawei.com> - 2.0.8-3
|
|
|
|
|
- Swith rubygem-ronn-ng to drop rubygem-ronn
|
|
|
|
|
|
2020-12-29 15:24:37 +08:00
|
|
|
* Tue Dec 29 2020 Ge Wang <wangge20@huawei.com> - 2.0.8-2
|
|
|
|
|
- Fix compile failure due to updated AsciiDoctor
|
|
|
|
|
|
2020-08-24 15:45:04 +08:00
|
|
|
* Mon Aug 24 2020 liyanan <liyanan32@huawei.com> - 2.0.8-1
|
|
|
|
|
- package init
|