This commit is contained in:
Mamoru Tasaka 2013-01-02 14:56:12 +09:00
parent 72e3c35b9d
commit 2058a4be08
3 changed files with 41 additions and 28 deletions

1
.gitignore vendored
View File

@ -4,3 +4,4 @@
/rspec-expectations-2.6.0.gem /rspec-expectations-2.6.0.gem
/rspec-expectations-2.8.0.gem /rspec-expectations-2.8.0.gem
/rspec-expectations-2.11.3.gem /rspec-expectations-2.11.3.gem
/rspec-expectations-2.12.1.gem

View File

@ -1,14 +1,11 @@
%global gemdir %{gem_dir} %global majorver 2.12.1
%global majorver 2.11.3
#%%global preminorver .rc6 #%%global preminorver .rc6
%global rpmminorver .%(echo %preminorver | sed -e 's|^\\.\\.*||') %global rpmminorver .%(echo %preminorver | sed -e 's|^\\.\\.*||')
%global fullver %{majorver}%{?preminorver} %global fullver %{majorver}%{?preminorver}
%global fedorarel 1 %global fedorarel 1
%global gemname rspec-expectations %global gem_name rspec-expectations
%global gem_name %gemname
%global geminstdir %{gem_instdir}
%global rubyabi 1.9.1 %global rubyabi 1.9.1
@ -19,14 +16,14 @@
%{!?need_bootstrap: %global need_bootstrap %{need_bootstrap_set}} %{!?need_bootstrap: %global need_bootstrap %{need_bootstrap_set}}
Summary: Rspec-2 expectations (should and matchers) Summary: Rspec-2 expectations (should and matchers)
Name: rubygem-%{gemname} Name: rubygem-%{gem_name}
Version: %{majorver} Version: %{majorver}
Release: %{?preminorver:0.}%{fedorarel}%{?preminorver:%{rpmminorver}}%{?dist} Release: %{?preminorver:0.}%{fedorarel}%{?preminorver:%{rpmminorver}}%{?dist}
Group: Development/Languages Group: Development/Languages
License: MIT License: MIT
URL: http://github.com/rspec/rspec-expectations URL: http://github.com/rspec/rspec-expectations
Source0: http://rubygems.org/gems/%{gemname}-%{fullver}.gem Source0: http://rubygems.org/gems/%{gem_name}-%{fullver}.gem
BuildRequires: ruby(abi) = %{rubyabi} BuildRequires: ruby(abi) = %{rubyabi}
BuildRequires: rubygems-devel BuildRequires: rubygems-devel
@ -36,7 +33,7 @@ BuildRequires: rubygem(minitest)
%endif %endif
Requires: ruby(abi) = %{rubyabi} Requires: ruby(abi) = %{rubyabi}
Requires: rubygem(diff-lcs) Requires: rubygem(diff-lcs)
Provides: rubygem(%{gemname}) = %{version}-%{release} Provides: rubygem(%{gem_name}) = %{version}-%{release}
BuildArch: noarch BuildArch: noarch
%description %description
@ -55,52 +52,67 @@ This package contains documentation for %{name}.
%prep %prep
%setup -q -c -T %setup -q -c -T
mkdir -p .%{gemdir} TOPDIR=$(pwd)
mkdir tmpunpackdir
pushd tmpunpackdir
gem unpack %{SOURCE0}
cd %{gem_name}-%{version}
gem specification -l --ruby %{SOURCE0} > %{gem_name}.gemspec
gem build %{gem_name}.gemspec
mv %{gem_name}-%{version}.gem $TOPDIR
popd
rm -rf tmpunpackdir
%build
mkdir -p .%{gem_dir}
gem install \ gem install \
-V \ -V \
--local \ --local \
--install-dir .%{gemdir} \ --install-dir .%{gem_dir} \
--force \ --force \
--rdoc \ --rdoc \
%{SOURCE0} %{gem_name}-%{version}.gem
chmod 0644 .%{gemdir}/cache/%{gemname}-%{fullver}.gem #chmod 0644 ./%{gem_cache}
%build
%install %install
mkdir -p %{buildroot}%{gemdir} mkdir -p %{buildroot}%{gem_dir}
cp -a .%{gemdir}/* %{buildroot}%{gemdir}/ cp -a .%{gem_dir}/* %{buildroot}%{gem_dir}/
# cleanups # cleanups
rm -f %{buildroot}%{geminstdir}/{.document,.gitignore,.travis.yml,.yardopts} rm -f %{buildroot}%{gem_instdir}/{.document,.gitignore,.travis.yml,.yardopts}
%if 0%{?need_bootstrap} < 1 %if 0%{?need_bootstrap} < 1
%check %check
pushd .%{geminstdir} pushd .%{gem_instdir}
ruby -rubygems -Ilib/ -S rspec spec/ ruby -rubygems -Ilib/ -S rspec spec/
popd popd
%endif %endif
%files %files
%defattr(-,root,root,-) %defattr(-,root,root,-)
%dir %{geminstdir} %dir %{gem_instdir}
%doc %{geminstdir}/License.txt %doc %{gem_instdir}/License.txt
%doc %{geminstdir}/*.md %doc %{gem_instdir}/*.md
%{geminstdir}/lib/ %{gem_instdir}/lib/
%{gemdir}/cache/%{gemname}-%{fullver}.gem %exclude %{gem_cache}
%{gemdir}/specifications/%{gemname}-%{fullver}.gemspec %{gem_spec}
%files doc %files doc
%defattr(-,root,root,-) %defattr(-,root,root,-)
%{gemdir}/doc/%{gemname}-%{fullver} %{gem_docdir}
%{geminstdir}/features/ %{gem_instdir}/features/
%{geminstdir}/spec/ %exclude %{gem_instdir}/spec/
%changelog %changelog
* Wed Jan 2 2013 Mamoru TASAKA <mtasaka@fedoraproject.org> - 2.12.1-1
- 2.12.1
* Thu Oct 11 2012 Mamoru Tasaka <mtasaka@fedoraproject.org> - 2.11.3-1 * Thu Oct 11 2012 Mamoru Tasaka <mtasaka@fedoraproject.org> - 2.11.3-1
- 2.11.3 - 2.11.3

View File

@ -1 +1 @@
6e9bf578efaf8018ed136e570ec4a0f5 rspec-expectations-2.11.3.gem e318b42e00a559a7348c0021383b1554 rspec-expectations-2.12.1.gem