[rubygem-columnize] F-17: rebuild against ruby19
Mamoru Tasaka
mtasaka at fedoraproject.org
Sun Feb 5 07:34:57 UTC 2012
commit 6c8f7e785dffdf4ec30ed1a951705da779a64aa4
Author: Mamoru Tasaka <tasaka1 at localhost.localdomain>
Date: Sun Feb 5 16:34:55 2012 +0900
F-17: rebuild against ruby19
rubygem-columnize.spec | 73 ++++++++++++++++++++++++++---------------------
1 files changed, 40 insertions(+), 33 deletions(-)
---
diff --git a/rubygem-columnize.spec b/rubygem-columnize.spec
index 8c6a4d8..b47a342 100644
--- a/rubygem-columnize.spec
+++ b/rubygem-columnize.spec
@@ -1,22 +1,26 @@
-%global gemdir %(ruby -rubygems -e 'puts Gem::dir' 2>/dev/null)
-%global gemname columnize
-%global geminstdir %{gemdir}/gems/%{gemname}-%{version}
+%if 0%{?fedora} >= 17
+%global rubyabi 1.9.1
+%else
+%global rubyabi 1.8
+%endif
+%global gem_name columnize
Summary: Sorts an array in column order
-Name: rubygem-%{gemname}
+Name: rubygem-%{gem_name}
Version: 0.3.1
-Release: 5%{?dist}
+Release: 6%{?dist}
Group: Development/Languages
License: GPLv2
URL: http://rubyforge.org/projects/rocky-hacks/
-Source0: http://gems.rubyforge.org/gems/%{gemname}-%{version}.gem
+Source0: http://gems.rubyforge.org/gems/%{gem_name}-%{version}.gem
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
-Requires: ruby(abi) = 1.8
+Requires: ruby(abi) = %{rubyabi}
Requires: rubygems
-BuildRequires: rubygems
+BuildRequires: ruby(abi) = %{rubyabi}
+BuildRequires: rubygems-devel
BuildRequires: rubygem(rake)
BuildArch: noarch
-Provides: rubygem(%{gemname}) = %{version}
+Provides: rubygem(%{gem_name}) = %{version}
%description
Sorts an array in column order
@@ -27,38 +31,38 @@ Sorts an array in column order
%install
rm -rf %{buildroot}
-mkdir -p %{buildroot}%{gemdir}
-gem install --local --install-dir %{buildroot}%{gemdir} \
+mkdir -p %{buildroot}%{gem_dir}
+gem install --local --install-dir %{buildroot}%{gem_dir} \
--force --rdoc %{SOURCE0}
# Remove backup files
-find %{buildroot}/%{geminstdir} -type f -name "*~" -delete
+find %{buildroot}/%{gem_instdir} -type f -name "*~" -delete
# Fix shebangs
-find %{buildroot}/%{geminstdir} -type f -exec sed -r -e 's"^#!(.*)/usr/bin/env ruby"#!/usr/bin/ruby"' {} \;
+find %{buildroot}/%{gem_instdir} -type f -exec sed -r -e 's"^#!(.*)/usr/bin/env ruby"#!/usr/bin/ruby"' {} \;
# 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
done
# 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
done
# 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 %{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 {} \;
# Remove these hidden files
-rm -rf %{buildroot}/%{geminstdir}/.project
-rm -rf %{buildroot}/%{geminstdir}/.loadpath
+rm -rf %{buildroot}/%{gem_instdir}/.project
+rm -rf %{buildroot}/%{gem_instdir}/.loadpath
%check
-pushd %{buildroot}/%{geminstdir}
+pushd %{buildroot}/%{gem_instdir}
rake test
popd
@@ -67,22 +71,25 @@ rm -rf %{buildroot}
%files
%defattr(-, root, root, -)
-%doc %{gemdir}/doc/%{gemname}-%{version}
-%dir %{geminstdir}
-%doc %{geminstdir}/AUTHORS
-%doc %{geminstdir}/COPYING
-%doc %{geminstdir}/ChangeLog
-%doc %{geminstdir}/NEWS
-%doc %{geminstdir}/README
-%doc %{geminstdir}/Rakefile
-%doc %{geminstdir}/VERSION
-%{geminstdir}/lib/
-%{geminstdir}/test/
-%{gemdir}/cache/%{gemname}-%{version}.gem
-%{gemdir}/specifications/%{gemname}-%{version}.gemspec
+%doc %{gem_docdir}/
+%dir %{gem_instdir}
+%doc %{gem_instdir}/AUTHORS
+%doc %{gem_instdir}/COPYING
+%doc %{gem_instdir}/ChangeLog
+%doc %{gem_instdir}/NEWS
+%doc %{gem_instdir}/README
+%doc %{gem_instdir}/Rakefile
+%doc %{gem_instdir}/VERSION
+%{gem_libdir}/
+%{gem_instdir}/test/
+%{gem_cache}
+%{gem_spec}
%changelog
+* Sun Feb 5 2012 Mamoru Tasaka <mtasaka at fedoraproject.org> - 0.3.1-6
+- F-17: rebuild against ruby19
+
* Sat Jan 14 2012 Fedora Release Engineering <rel-eng at lists.fedoraproject.org> - 0.3.1-5
- Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild
More information about the scm-commits
mailing list