rubygem-mustache/rubygem-mustache.spec
cherry530 5214d727cb upgrade 1.1.1
Signed-off-by: cherry530 <xuping33@huawei.com>
(cherry picked from commit f5f54b15076f85a6d3a159a50d0f0272bafde681)
2022-03-23 17:20:43 +08:00

81 lines
2.2 KiB
RPMSpec

%global gem_name mustache
Name: rubygem-mustache
Version: 1.1.1
Release: 1
Summary: A framework-agnostic way to render logic-free views
License: MIT
URL: https://github.com/mustache/mustache
Source0: https://rubygems.org/gems/mustache-%{version}.gem
Patch0: rubygem-mustache-1.1.1-Fix-test-race-condition.patch
BuildRequires: ruby(release) rubygems-devel ruby rubygem(minitest)
BuildArch: noarch
%description
Inspired by ctemplate and et, Mustache is a framework-agnostic way to render logic-free views.
As ctemplates says, "It emphasizes separating logic from presentation: it is impossible to embed
application logic in this template language."
%package help
Summary: Help documentation for rubygem-mustache
Requires: rubygem-mustache = %{version}-%{release}
Provides: rubygem-mustache-doc = %{version}-%{release}
Obsoletes: rubygem-mustache-doc < %{version}-%{release}
BuildArch: noarch
%description help
Documentation for rubygem-mustache.
%prep
%setup -q -n %{gem_name}-%{version}
%patch0 -p1
%build
gem build ../%{gem_name}-%{version}.gemspec
%gem_install
%install
install -d %{buildroot}%{gem_dir}
cp -a .%{gem_dir}/* %{buildroot}%{gem_dir}/
install -d %{buildroot}%{_bindir}
cp -a .%{_bindir}/* %{buildroot}%{_bindir}/
find %{buildroot}%{gem_instdir}/bin -type f | xargs chmod a+x
install -d %{buildroot}%{_mandir}/man5
cp -a .%{gem_instdir}/man/mustache.5 %{buildroot}%{_mandir}/man5
install -d %{buildroot}%{_mandir}/man1
cp -a .%{gem_instdir}/man/mustache.1 %{buildroot}%{_mandir}/man1
cp -a .%{gem_instdir}/man/*.html .
%check
cd .%{gem_instdir}
sed -i '/simplecov/,/^end$/ s/^/#/' test/helper.rb
%files
%dir %{gem_instdir}
%{_bindir}/mustache
%doc %{gem_instdir}/LICENSE
%{gem_instdir}/bin
%{gem_libdir}
%exclude %{gem_instdir}/man
%exclude %{gem_cache}
%{gem_spec}
%files help
%doc *.html
%doc %{_mandir}/man1/*
%doc %{_mandir}/man5/*
%doc %{gem_docdir}
%doc %{gem_instdir}/README.md
%{gem_instdir}/{Rakefile,test}
%changelog
* Sun Jan 30 2022 xu_ping <xuping33@huawei.com> - 1.1.1-1
- Upgrade 1.1.1
* Sat Jan 22 2022 liyanan <liyanan32@huawei.com> - 1.0.2-8
- Fix build error
* Sat Mar 14 2020 Ling Yang <lingyang2@huawei.com> - 1.0.2-7
- Package Init