Rebuilt for Ruby 1.9.3.

epel9
Bohuslav Kabrda 13 years ago
parent 6361e41017
commit 4b2cac6b6b

@ -1,28 +1,26 @@
%define gemdir %(ruby -rubygems -e 'puts Gem::dir' 2>/dev/null) %define gem_name rack
%define gemname rack
%define geminstdir %{gemdir}/gems/%{gemname}-%{version}
Name: rubygem-%{gemname} Name: rubygem-%{gem_name}
Summary: Common API for connecting web frameworks, web servers and layers of software Summary: Common API for connecting web frameworks, web servers and layers of software
# Introduce Epoch (related to bug 552972) # Introduce Epoch (related to bug 552972)
Epoch: 1 Epoch: 1
Version: 1.4.0 Version: 1.4.0
Release: 1%{?dist} Release: 2%{?dist}
Group: Development/Languages Group: Development/Languages
License: MIT License: MIT
URL: http://rubyforge.org/projects/%{gemname}/ URL: http://rubyforge.org/projects/%{gem_name}/
Source0: http://gems.rubyforge.org/gems/%{gemname}-%{version}.gem Source0: http://gems.rubyforge.org/gems/%{gem_name}-%{version}.gem
# These patches fix the test failuers with Ruby 1.8.7-p357 and are already # These patches fix the test failuers with Ruby 1.8.7-p357 and are already
# proposed upstream: https://github.com/rack/rack/pull/298 # proposed upstream: https://github.com/rack/rack/pull/298
Patch0: rubygem-rack-test-object-which-responds-to-each.patch Patch0: rubygem-rack-test-object-which-responds-to-each.patch
Patch1: rubygem-rack-tests-now-accept-different-query-orders.patch Patch1: rubygem-rack-tests-now-accept-different-query-orders.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
Requires: rubygems Requires: ruby(rubygems)
Requires: ruby(abi) = 1.8 Requires: ruby(abi) = 1.9.1
BuildRequires: rubygems BuildRequires: rubygems-devel
BuildRequires: rubygem(bacon) BuildRequires: rubygem(bacon)
BuildArch: noarch BuildArch: noarch
Provides: rubygem(%{gemname}) = %{version} Provides: rubygem(%{gem_name}) = %{version}
%description %description
Rack provides a common API for connecting web frameworks, Rack provides a common API for connecting web frameworks,
@ -30,11 +28,11 @@ web servers and layers of software in between
%prep %prep
%setup -q -c -T %setup -q -c -T
mkdir -p .%{gemdir} mkdir -p .%{gem_dir}
gem install --local --install-dir .%{gemdir} \ gem install --local --install-dir .%{gem_dir} \
--force %{SOURCE0} --force %{SOURCE0}
pushd .%{geminstdir} pushd .%{gem_instdir}
%patch0 -p1 %patch0 -p1
%patch1 -p1 %patch1 -p1
popd popd
@ -43,65 +41,68 @@ popd
%install %install
rm -rf %{buildroot} rm -rf %{buildroot}
mkdir -p %{buildroot}%{gemdir} mkdir -p %{buildroot}%{gem_dir}
cp -a .%{gemdir}/* \ cp -a .%{gem_dir}/* \
%{buildroot}%{gemdir}/ %{buildroot}%{gem_dir}/
# Remove backup files # Remove backup files
find %{buildroot}/%{geminstdir} -type f -name "*~" -delete find %{buildroot}/%{gem_instdir} -type f -name "*~" -delete
# Delete zero-length files # Delete zero-length files
find %{buildroot}/%{geminstdir} -type f -size 0c -exec rm -rvf {} \; find %{buildroot}/%{gem_instdir} -type f -size 0c -exec rm -rvf {} \;
# Fix anything executable that does not have a shebang # Fix anything executable that does not have a shebang
for file in `find %{buildroot}/%{geminstdir} -type f -perm /a+x`; do for file in `find %{buildroot}/%{gem_instdir} -type f -perm /a+x`; do
[ -z "`head -n 1 $file | grep \"^#!/\"`" ] && chmod -v 644 $file [ -z "`head -n 1 $file | grep \"^#!/\"`" ] && chmod -v 644 $file
done done
# Find files with a shebang that do not have executable permissions # Find files with a shebang that do not have executable permissions
for file in `find %{buildroot}/%{geminstdir} -type f ! -perm /a+x -name "*.rb"`; do for file in `find %{buildroot}/%{gem_instdir} -type f ! -perm /a+x -name "*.rb"`; do
[ ! -z "`head -n 1 $file | grep \"^#!/\"`" ] && chmod -v 755 $file [ ! -z "`head -n 1 $file | grep \"^#!/\"`" ] && chmod -v 755 $file
done done
# Find files that have non-standard-executable-perm # Find files that have non-standard-executable-perm
find %{buildroot}/%{geminstdir} -type f -perm /g+wx -exec chmod -v g-w {} \; find %{buildroot}/%{gem_instdir} -type f -perm /g+wx -exec chmod -v g-w {} \;
# Find files that are not readable # Find files that are not readable
find %{buildroot}/%{geminstdir} -type f ! -perm /go+r -exec chmod -v go+r {} \; find %{buildroot}/%{gem_instdir} -type f ! -perm /go+r -exec chmod -v go+r {} \;
# Move %%{gemdir}/bin/rackup to %%{_bindir} # Move %%{gem_dir}/bin/rackup to %%{_bindir}
mkdir -p %{buildroot}/%{_bindir} mkdir -p %{buildroot}/%{_bindir}
mv %{buildroot}/%{gemdir}/bin/rackup %{buildroot}/%{_bindir} mv %{buildroot}/%{gem_dir}/bin/rackup %{buildroot}/%{_bindir}
rm -rf %{buildroot}/%{gemdir}/bin/ rm -rf %{buildroot}/%{gem_dir}/bin/
%clean %clean
rm -rf %{buildroot} rm -rf %{buildroot}
%check %check
pushd %{buildroot}%{geminstdir} pushd %{buildroot}%{gem_instdir}
bacon --automatic --quiet bacon --automatic --quiet
popd popd
%files %files
%defattr(-, root, root, -) %defattr(-, root, root, -)
%dir %{geminstdir} %dir %{gem_instdir}
%doc %{gemdir}/doc/%{gemname}-%{version} %doc %{gem_docdir}
%doc %{geminstdir}/COPYING %doc %{gem_instdir}/COPYING
%doc %{geminstdir}/Rakefile %doc %{gem_instdir}/Rakefile
%doc %{geminstdir}/README.rdoc %doc %{gem_instdir}/README.rdoc
%doc %{geminstdir}/KNOWN-ISSUES %doc %{gem_instdir}/KNOWN-ISSUES
%doc %{geminstdir}/SPEC %doc %{gem_instdir}/SPEC
%doc %{geminstdir}/example %doc %{gem_instdir}/example
%doc %{geminstdir}/test %doc %{gem_instdir}/test
%doc %{geminstdir}/contrib %doc %{gem_instdir}/contrib
%{geminstdir}/%{gemname}.gemspec %{gem_instdir}/%{gem_name}.gemspec
%{geminstdir}/lib %{gem_libdir}
%{geminstdir}/bin %{gem_instdir}/bin
%{_bindir}/rackup %{_bindir}/rackup
%{gemdir}/cache/%{gemname}-%{version}.gem %{gem_cache}
%{gemdir}/specifications/%{gemname}-%{version}.gemspec %{gem_spec}
%changelog %changelog
* Tue Jan 24 2012 Bohuslav Kabrda <bkabrda@redhat.com> - 1:1.4.0-2
- Rebuilt for Ruby 1.9.3.
* Thu Jan 05 2012 Bohuslav Kabrda <bkabrda@redhat.com> - 1:1.4.0-1 * Thu Jan 05 2012 Bohuslav Kabrda <bkabrda@redhat.com> - 1:1.4.0-1
- Update to Rack 1.4. - Update to Rack 1.4.
- Moved gem install to %%prep to be able to apply patches. - Moved gem install to %%prep to be able to apply patches.
@ -139,7 +140,7 @@ popd
* Sun Nov 09 2008 Jeroen van Meeuwen <j.van.meeuwen@ogd.nl> - 0.4.0-2 * Sun Nov 09 2008 Jeroen van Meeuwen <j.van.meeuwen@ogd.nl> - 0.4.0-2
- Remove unused macro (#470694) - Remove unused macro (#470694)
- Add ruby(abi) = 1.8 as required by package guidelines (#470694) - Add ruby(abi) = 1.8 as required by package guidelines (#470694)
- Move %%{gemdir}/bin/rackup to %%{_bindir} (#470694) - Move %%{gem_dir}/bin/rackup to %%{_bindir} (#470694)
* Sat Nov 08 2008 Jeroen van Meeuwen <j.van.meeuwen@ogd.nl> - 0.4.0-1 * Sat Nov 08 2008 Jeroen van Meeuwen <j.van.meeuwen@ogd.nl> - 0.4.0-1
- Initial package - Initial package

Loading…
Cancel
Save