Preparetion for test suite execution during build.

f38
Vít Ondruch 14 years ago
parent 93201a2ae8
commit 3d5a6184f8

@ -2,6 +2,8 @@
%global gemname i18n %global gemname i18n
%global geminstdir %{gemdir}/gems/%{gemname}-%{version} %global geminstdir %{gemdir}/gems/%{gemname}-%{version}
%global enable_check 0
Summary: New wave Internationalization support for Ruby Summary: New wave Internationalization support for Ruby
Name: rubygem-%{gemname} Name: rubygem-%{gemname}
Version: 0.5.0 Version: 0.5.0
@ -12,7 +14,13 @@ URL: http://github.com/svenfuchs/i18n
Source0: http://rubygems.org/gems/%{gemname}-%{version}.gem Source0: http://rubygems.org/gems/%{gemname}-%{version}.gem
Requires: rubygems Requires: rubygems
Requires: ruby(abi) = 1.8 Requires: ruby(abi) = 1.8
BuildRequires: ruby(abi) = 1.8
BuildRequires: rubygems BuildRequires: rubygems
%if %{enable_check} > 0
BuildRequires: rubygem(mocha)
# test_declarative is not available in Fedora yet.
BuildRequires: rubygem(test_declarative)
%endif
BuildArch: noarch BuildArch: noarch
Provides: rubygem(%{gemname}) = %{version} Provides: rubygem(%{gemname}) = %{version}
@ -29,16 +37,31 @@ Requires:%{name} = %{version}-%{release}
Documentation for %{name} Documentation for %{name}
%prep %prep
%setup -q -c -T
mkdir -p .%{gemdir}
gem install --local --install-dir .%{gemdir} \
--force --rdoc %{SOURCE0}
%build %build
%install %install
mkdir -p %{buildroot}%{gemdir} mkdir -p %{buildroot}%{gemdir}
gem install --local --install-dir %{buildroot}%{gemdir} \ cp -a .%{gemdir}/* \
--force --rdoc %{SOURCE0} %{buildroot}%{gemdir}/
chmod -x %{buildroot}%{geminstdir}/MIT-LICENSE chmod -x %{buildroot}%{geminstdir}/MIT-LICENSE
chmod -x %{buildroot}%{geminstdir}/lib/i18n.rb chmod -x %{buildroot}%{geminstdir}/lib/i18n.rb
%if %{enable_check} > 0
%check
pushd .%{geminstdir}
# Bundler just complicates everything in our case, remove it.
sed -i -e "s|require 'bundler/setup'||" test/test_helper.rb
RUBYOPT="rubygems I%{buildroot}%{geminstdir}/lib" testrb test/all.rb
popd
%endif
%files %files
%defattr(-, root, root, -) %defattr(-, root, root, -)
@ -62,6 +85,7 @@ chmod -x %{buildroot}%{geminstdir}/lib/i18n.rb
- Update to i18n 0.5.0. - Update to i18n 0.5.0.
- Documentation moved into subpackage. - Documentation moved into subpackage.
- Removed unnecessary cleanup. - Removed unnecessary cleanup.
- Preparetion for test suite execution during build.
* Wed Feb 09 2011 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.4.2-3 * Wed Feb 09 2011 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.4.2-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild - Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild

Loading…
Cancel
Save