[rubygem-linecache] F-17: rebuild against ruby19
Mamoru Tasaka
mtasaka at fedoraproject.org
Sun Feb 5 07:28:04 UTC 2012
commit 510eb9566e7c45ff031b7017f46ba27714e29bc0
Author: Mamoru Tasaka <tasaka1 at localhost.localdomain>
Date: Sun Feb 5 16:28:01 2012 +0900
F-17: rebuild against ruby19
rubygem-linecache.spec | 97 ++++++++++++++++++++++++++++--------------------
1 files changed, 57 insertions(+), 40 deletions(-)
---
diff --git a/rubygem-linecache.spec b/rubygem-linecache.spec
index d1210b2..34c0105 100644
--- a/rubygem-linecache.spec
+++ b/rubygem-linecache.spec
@@ -1,25 +1,28 @@
-%{!?ruby_sitearch: %global ruby_sitearch %(ruby -rrbconfig -e "puts Config::CONFIG['sitearchdir']")}
+%if 0%{?fedora} >= 17
+%global rubyabi 1.9.1
+%else
+%global rubyabi 1.8
+%global ruby_sitearch %(ruby -rrbconfig -e "puts Config::CONFIG['sitearchdir']")
+%endif
-%global gemdir %(ruby -rubygems -e 'puts Gem::dir' 2>/dev/null)
-%global gemname linecache
-%global geminstdir %{gemdir}/gems/%{gemname}-%{version}
+%global gem_name linecache
Summary: Caches (Ruby source) files
-Name: rubygem-%{gemname}
+Name: rubygem-%{gem_name}
Version: 0.43
-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
Patch0: rubygem-linecache-0.43-trace_nums.so.patch
-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)
BuildRequires: ruby-devel
-Provides: rubygem(%{gemname}) = %{version}
+Provides: rubygem(%{gem_name}) = %{version}
%description
Caches (Ruby source) files as might be used in a debugger
@@ -27,7 +30,7 @@ or a tool that works with sets of Ruby source files.
%prep
%setup -q -T -c
-mkdir -p ./%{gemdir}
+mkdir -p ./%{gem_dir}
%build
@@ -36,48 +39,53 @@ rm -rf %{buildroot}
export CONFIGURE_ARGS="--with-cflags='%{optflags}'"
gem install \
--local \
- --install-dir ./%{gemdir} \
+ --install-dir ./%{gem_dir} \
-V --force \
%{SOURCE0}
-mkdir -p %{buildroot}%{gemdir}
-cp -a ./%{gemdir}/* %{buildroot}%{gemdir}
+mkdir -p %{buildroot}%{gem_dir}
+cp -a ./%{gem_dir}/* %{buildroot}%{gem_dir}
+%if 0%{?fedora} >= 17
+mkdir -p %{buildroot}%{gem_extdir}/lib
+mv %{buildroot}%{gem_instdir}/lib/trace_nums.so %{buildroot}%{gem_extdir}/lib/
+%else
mkdir -p %{buildroot}/%{ruby_sitearch}
-mv %{buildroot}/%{geminstdir}/lib/trace_nums.so %{buildroot}/%{ruby_sitearch}
+mv %{buildroot}/%{gem_instdir}/lib/trace_nums.so %{buildroot}/%{ruby_sitearch}
+%endif
-pushd %{buildroot}/%{geminstdir}
+pushd %{buildroot}/%{gem_instdir}
patch -p0 < %{PATCH0}
popd
# Remove backup files
-find %{buildroot}/%{geminstdir} -type f -name "*~" -delete
+find %{buildroot}/%{gem_instdir} -type f -name "*~" -delete
# 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
-rm -rf %{buildroot}/%{geminstdir}/ext
-#rm -rf %{buildroot}/%{geminstdir}/lib
+rm -rf %{buildroot}/%{gem_instdir}/ext
+#rm -rf %{buildroot}/%{gem_instdir}/lib
%check
-pushd %{_builddir}/%{name}-%{version}/%{geminstdir}
+pushd ./%{gem_instdir}
rake test
popd
@@ -86,23 +94,32 @@ rm -rf %{buildroot}
%files
%defattr(-, root, root, -)
-%dir %{geminstdir}/
-%doc %{gemdir}/doc/%{gemname}-%{version}
-%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
+%dir %{gem_instdir}/
+%doc %{gem_docdir}/
+%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
+%{gemcache}
+%if %{fedora} >= 17
+%dir %{gem_extdir}
+%dir %{gem_extdir}/lib
+%{gem_extdir}/lib/*.so
+%else
%{ruby_sitearch}/*.so
-%{gemdir}/specifications/%{gemname}-%{version}.gemspec
+%endif
+%{gem_spec}
%changelog
+* Sun Feb 5 2012 Mamoru Tasaka <mtasaka at fedoraproject.org> - 0.43-6
+- F-17: rebuild against ruby19
+
* Sat Jan 14 2012 Fedora Release Engineering <rel-eng at lists.fedoraproject.org> - 0.43-5
- Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild
More information about the scm-commits
mailing list