You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
rubygem-delorean/rubygem-delorean.spec

84 lines
2.0 KiB

%global gemname delorean
%global gemdir %(ruby -rubygems -e 'puts Gem::dir' 2>/dev/null)
%global geminstdir %{gemdir}/gems/%{gemname}-%{version}
Summary: Delorean lets you travel in time with Ruby by mocking Time.now
Name: rubygem-%{gemname}
Version: 1.2.0
Release: 3%{?dist}
Group: Development/Languages
License: MIT
URL: https://github.com/bebanjo/delorean
Source0: http://rubygems.org/gems/%{gemname}-%{version}.gem
# to get specs:
# git clone https://github.com/bebanjo/delorean.git && cd delorean
# git checkout v1.2.0
# tar -czf rubygem-delorean-spec.tgz spec/
Source1: %{name}-spec.tgz
Requires: ruby(abi) = 1.8
Requires: ruby(rubygems)
Requires: rubygem(chronic)
BuildRequires: ruby(rubygems)
# for specs:
BuildRequires: rubygem(rspec-core)
BuildRequires: rubygem(activesupport)
BuildRequires: rubygem(chronic)
BuildArch: noarch
Provides: rubygem(%{gemname}) = %{version}
%description
Delorean lets you travel in time with Ruby by mocking Time.now.
%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} \
--force --rdoc %{SOURCE0}
pushd .%{geminstdir}
tar xzf %{SOURCE1}
popd
%build
%install
rm -rf %{buildroot}
mkdir -p %{buildroot}%{gemdir}
cp -a .%{gemdir}/* %{buildroot}%{gemdir}/
%check
pushd .%{geminstdir}
rspec spec
popd
%files
%dir %{geminstdir}
%exclude %{gemdir}/cache/%{gemname}-%{version}.gem
%{geminstdir}/lib
%{gemdir}/specifications/%{gemname}-%{version}.gemspec
%doc %{geminstdir}/MIT-LICENSE
%files doc
%doc %{gemdir}/doc/%{gemname}-%{version}
%doc %{geminstdir}/README.md
%{geminstdir}/spec
%changelog
* Sat Jan 14 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.2.0-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild
* Tue Jan 03 2012 Bohuslav Kabrda <bkabrda@redhat.com> - 1.2.0-2
- Fixed the specfile permissions.
- Added tests.
* Mon Jan 02 2012 Bohuslav Kabrda <bkabrda@redhat.com> - 1.2.0-1
- Initial package.