2020-08-28 14:52:01 +08:00
|
|
|
%global gem_name haml
|
|
|
|
|
Name: rubygem-%{gem_name}
|
2022-03-04 10:35:40 +08:00
|
|
|
Version: 5.2.2
|
2020-08-28 16:13:27 +08:00
|
|
|
Release: 1
|
2020-08-28 14:52:01 +08:00
|
|
|
Summary: An elegant, structured (X)HTML/XML templating engine
|
|
|
|
|
License: MIT and WTFPL
|
|
|
|
|
URL: http://haml.info/
|
|
|
|
|
Source0: https://rubygems.org/gems/%{gem_name}-%{version}.gem
|
2022-03-04 10:35:40 +08:00
|
|
|
# git clone --no-checkout https://github.com/haml/haml.git
|
|
|
|
|
# git -C haml archive -v -o haml-5.2.2-tests.txz v5.2.2 test/
|
|
|
|
|
Source1: %{gem_name}-%{version}-tests.txz
|
2020-08-28 14:52:01 +08:00
|
|
|
BuildRequires: ruby(release) rubygems-devel ruby rubygem(activemodel) rubygem(minitest)
|
|
|
|
|
BuildRequires: rubygem(railties) rubygem(temple) rubygem(tilt)
|
|
|
|
|
BuildArch: noarch
|
|
|
|
|
%description
|
|
|
|
|
Haml (HTML Abstraction Markup Language) is a layer on top of HTML or XML
|
|
|
|
|
that's designed to express the structure documents in a non-repetitive,
|
|
|
|
|
elegant, easy way by using indentation rather than closing
|
|
|
|
|
tags and allowing Ruby to be embedded with ease.
|
|
|
|
|
It was originally envisioned as a plugin for Ruby on Rails, but it can
|
|
|
|
|
function as a stand-alone templating engine.
|
|
|
|
|
|
|
|
|
|
%package doc
|
|
|
|
|
Summary: Documentation for %{name}
|
|
|
|
|
Requires: %{name} = %{version}-%{release}
|
|
|
|
|
BuildArch: noarch
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
%description doc
|
|
|
|
|
Documentation for %{name}.
|
|
|
|
|
|
|
|
|
|
%prep
|
|
|
|
|
%setup -q -n %{gem_name}-%{version} -b 1
|
|
|
|
|
|
|
|
|
|
%build
|
|
|
|
|
gem build ../%{gem_name}-%{version}.gemspec
|
|
|
|
|
%gem_install
|
|
|
|
|
|
|
|
|
|
%install
|
|
|
|
|
mkdir -p %{buildroot}%{gem_dir}
|
|
|
|
|
cp -a .%{gem_dir}/* \
|
|
|
|
|
%{buildroot}%{gem_dir}/
|
|
|
|
|
mkdir -p %{buildroot}%{_bindir}
|
|
|
|
|
cp -a .%{_bindir}/* \
|
|
|
|
|
%{buildroot}%{_bindir}/
|
|
|
|
|
find %{buildroot}%{gem_instdir}/bin -type f | xargs chmod a+x
|
|
|
|
|
|
|
|
|
|
%check
|
|
|
|
|
pushd .%{gem_instdir}
|
2022-03-04 10:35:40 +08:00
|
|
|
ln -s %{_builddir}/test .
|
2020-08-28 14:52:01 +08:00
|
|
|
sed -i '/[bB]undler/ s/^/#/' test/test_helper.rb
|
2022-03-04 10:35:40 +08:00
|
|
|
sed -i '/[Ss]imple[Cc]ov/ s/^/#/g' test/test_helper.rb
|
|
|
|
|
mv test/template_test.rb{,.disable}
|
|
|
|
|
|
2020-08-28 14:52:01 +08:00
|
|
|
ruby -Ilib:test -e '(Dir.glob("./test/*_test.rb") - %w[./test/options_test.rb]).each {|f| require f }'
|
|
|
|
|
ruby -Ilib:test -e 'require "./test/options_test.rb"'
|
|
|
|
|
popd
|
|
|
|
|
|
|
|
|
|
%files
|
|
|
|
|
%dir %{gem_instdir}
|
|
|
|
|
%{_bindir}/haml
|
|
|
|
|
%exclude %{gem_instdir}/.*
|
|
|
|
|
%license %{gem_instdir}/MIT-LICENSE
|
|
|
|
|
%{gem_instdir}/bin
|
|
|
|
|
%{gem_libdir}
|
|
|
|
|
%exclude %{gem_libdir}/haml/.gitattributes
|
|
|
|
|
%exclude %{gem_cache}
|
|
|
|
|
%{gem_spec}
|
|
|
|
|
|
|
|
|
|
%files doc
|
|
|
|
|
%doc %{gem_docdir}
|
|
|
|
|
%doc %{gem_instdir}/CHANGELOG.md
|
|
|
|
|
%doc %{gem_instdir}/FAQ.md
|
|
|
|
|
%{gem_instdir}/Gemfile
|
|
|
|
|
%doc %{gem_instdir}/README.md
|
|
|
|
|
%doc %{gem_instdir}/REFERENCE.md
|
|
|
|
|
%{gem_instdir}/Rakefile
|
|
|
|
|
%doc %{gem_instdir}/TODO
|
|
|
|
|
%{gem_instdir}/benchmark.rb
|
|
|
|
|
%{gem_instdir}/haml.gemspec
|
|
|
|
|
%{gem_instdir}/yard
|
|
|
|
|
%exclude %{gem_instdir}/yard/default/.gitignore
|
|
|
|
|
|
|
|
|
|
%changelog
|
2022-03-04 10:35:40 +08:00
|
|
|
* Fri Mar 04 2022 wangkai <wangkai385@huawei.com> - 5.2.2-1
|
|
|
|
|
- Update to haml 5.2.2
|
|
|
|
|
|
2020-08-28 14:52:01 +08:00
|
|
|
* Fri Aug 21 2020 tuShenmei <tushenmei@huawei.com> - 5.0.4-1
|
|
|
|
|
- package init
|