rubygem-mustache/rubygem-mustache.spec

120 lines
3.3 KiB
RPMSpec

%global gemname mustache
%global gemdir %(ruby -rubygems -e 'puts Gem::dir' 2>/dev/null)
%global geminstdir %{gemdir}/gems/%{gemname}-%{version}
%global rubyabi 1.8
Summary: Framework-agnostic way to render logic-free views
Name: rubygem-%{gemname}
Version: 0.99.4
Release: 2%{?dist}
Group: Development/Languages
License: MIT
URL: http://github.com/defunkt/mustache
Source0: http://rubygems.org/downloads/%{gemname}-%{version}.gem
Requires: ruby(abi) = %{rubyabi}
Requires: ruby(rubygems)
Requires: ruby
BuildRequires: ruby(abi) = %{rubyabi}
BuildRequires: ruby(rubygems)
BuildRequires: ruby
BuildArch: noarch
Provides: rubygem(%{gemname}) = %{version}
%description
Think of Mustache as a replacement for your views.
Instead of views consisting of ERB or HAML with random helpers
and arbitrary logic, your views are broken into two parts:
a Ruby class and an HTML template.
%package doc
Summary: Documentation for %{name}
Group: Documentation
Requires:%{name} = %{version}-%{release}
%description doc
Documentation for %{name}
%prep
%setup -q -c -T
mkdir -p .%{gemdir}
gem install --local --install-dir .%{gemdir} \
--bindir .%{_bindir} \
--force %{SOURCE0}
%build
%install
mkdir -p %{buildroot}%{gemdir}
cp -a .%{gemdir}/* \
%{buildroot}%{gemdir}/
mkdir -p %{buildroot}%{_bindir}
cp -a .%{_bindir}/* \
%{buildroot}%{_bindir}/
find %{buildroot}%{geminstdir}/bin -type f | xargs chmod a+x
# Install man pages
mkdir -p %{buildroot}%{_mandir}/man5
cp -a .%{geminstdir}/man/mustache.5 %{buildroot}%{_mandir}/man5
mkdir -p %{buildroot}%{_mandir}/man1
cp -a .%{geminstdir}/man/mustache.1 %{buildroot}%{_mandir}/man1
# Install documentation
cp -a .%{geminstdir}/man/*.html .
%check
pushd %{buildroot}/%{geminstdir}
testrb -Ilib test/*_test.rb
popd
%files
%dir %{geminstdir}
%doc *.html
%{geminstdir}/lib
%{geminstdir}/bin
%{_bindir}/mustache
%doc %{geminstdir}/README.md
%doc %{geminstdir}/LICENSE
%{gemdir}/cache/%{gemname}-%{version}.gem
%exclude %{gemdir}/specifications/%{gemname}-%{version}.gemspec
%exclude %{geminstdir}/man
%doc %{_mandir}/man1/*
%doc %{_mandir}/man5/*
%files doc
%{geminstdir}/Rakefile
%doc %{gemdir}/doc/%{gemname}-%{version}
%{geminstdir}/test
%changelog
* Sat Jan 14 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.99.4-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild
* Wed Jul 27 2011 Vít Ondruch <vondruch@redhat.com> - 0.99.4-1
- Update to Mustache 0.99.4
- Dropped optional Sinatra dependency.
- Removed deprecated %%clean section.
- Added man pages.
* Wed Feb 09 2011 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.11.2-5
- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild
* Wed Nov 10 2010 Jozef Zigmund <jzigmund@redhat.com> - 0.11.2-4
- Corrected ruby(abi) require
* Mon Nov 8 2010 Jozef Zigmund <jzigmund@redhat.com> - 0.11.2-3
- Added README.md, LICENSE with macro doc
- Replaced macro {gemdir}/gems/{gemname}-{version}/ by macro dir {geminstdir}
- Added lib, bin to macro {geminstdir}
- Added subpackage doc with folders: man, test and doc
* Mon Oct 18 2010 Jozef Zigmund <jzigmund@redhat.com> - 0.11.2-2
- Repair URL Source0
- Remove "Mustache is a" from Summary
- Add Require: rubygem(sinatra)
* Mon Oct 18 2010 Jozef Zigmund <jzigmund@redhat.com> - 0.11.2-1
- Initial package