%global rubyabi 1.8 %global repoid 73082 %global majorver 0.10.5 %global preminorver .rc1 # Upstream SCM: using SVN # SVN path: svn://rubyforge.org/var/svn/ruby-debug/trunk # tar czf %%gemname-%%majorver%%preminorver.tar.gz trunk/ %global using_svn 0 %if 0%{?using_svn} > 0 %global svnver svn952_trunk %global preminorver %(echo %svnver | sed -e 's|_trunk||') %endif %global gemdir %(ruby -rubygems -e 'puts Gem::dir' 2>/dev/null) %global gemname ruby-debug-base %global geminstdir %{gemdir}/gems/%{gemname}-%{majorver}%{?preminorver} %global ruby_sitearch %(ruby -rrbconfig -e "puts Config::CONFIG['sitearchdir']") %global mainrel 1 Summary: Core component for fast Ruby debugger Name: rubygem-%{gemname} Version: %{majorver} Release: %{?preminorver:0.}%{mainrel}%{?preminorver:.%(echo %preminorver | sed -e 's|^\.[\.]*||')}%{?dist} Group: Development/Languages License: BSD URL: http://rubyforge.org/projects/ruby-debug/ %if 0%{?using_svn} Source0: %{gemname}-%{majorver}%{?svnver}.tar.gz %else Source0: http://rubygems.org/gems/%{gemname}-%{majorver}%{?preminorver}.gem %endif # Some files are missing... pulling them from ruby-debug 0.10.5rc1 Source1: rubygem-%{gemname}-%{majorver}%{?preminorver}-missingfiles.tar.gz Requires: ruby(abi) = %{rubyabi} Requires: rubygem(linecache) BuildRequires: ruby(abi) = %{rubyabi} BuildRequires: ruby-devel BuildRequires: rubygems # %%check BuildRequires: rubygem(linecache) BuildRequires: rubygem(rake) Provides: rubygem(%{gemname}) = %{version}-%{release} %description ruby-debug is a fast implementation of the standard Ruby debugger debug.rb. It is implemented by utilizing a new Ruby C API hook. The core component provides support that front-ends can build on. It provides breakpoint handling, bindings for stack frames among other things. %package doc Summary: Documentation for %{name} Group: Documentation Requires: %{name} = %{version}-%{release} %description doc This package contains documentation for %{name}. %prep %setup -q -c -T %if 0 # As currently using tar.gz based on svn, create gem manually tar xzf %{SOURCE0} pushd trunk # Fix version (until formal gem or tarball is released by upstream) sed -i.ver \ -e '/DEBUG_VERSION/s|"%{majorver}.*"|"%{majorver}%{?preminorver}"|' \ ext/ruby_debug.c rake gem popd %endif mkdir -p .%{gemdir} export CONFIGURE_ARGS="--with-cflags='%{optflags}'" gem install \ --local \ --install-dir .%{gemdir} \ --force \ --rdoc \ -V \ %if 1 %{SOURCE0} %else */pkg/ruby-debug-base-%{majorver}%{?preminorver}.gem %endif # Install missing files ( cd .%{geminstdir} gzip -dc %{SOURCE1} | tar xf - cat > test/helper.rb <<EOF require 'test/unit' require 'ruby-debug-base' EOF ) # rpmlint issue # Oh, the following breaks test/base/load.rb, fixing it also chmod 0644 .%{gemdir}/cache/*.gem find .%{geminstdir} \( -name \*.rb -or -name Rakefile \) -not -perm -0700 | \ xargs sed -i -e '\@^#![ \t]*%{_bindir}@d' sed -i -e "s|'gcd.rb', 4|'gcd.rb', 3|" .%{geminstdir}/test/base/load.rb # ??? %_fixperms . %build %install mkdir -p %{buildroot}%{gemdir} cp -a .%{gemdir}/* \ %{buildroot}%{gemdir}/ # Arch files treatment mkdir -p %{buildroot}%{ruby_sitearch} mv %{buildroot}%{geminstdir}/lib/ruby_debug.so \ %{buildroot}%{ruby_sitearch}/ rm -rf %{buildroot}%{geminstdir}/ext/ rm -f %{buildroot}%{geminstdir}/lib/ruby_debug.so %check pushd .%{geminstdir} for f in test/base/*rb do ruby -rubygems -Ilib:ext:test $f done popd %files %defattr(-,root,root,-) %dir %{geminstdir} %doc %{geminstdir}/[A-Z]* %exclude %{geminstdir}/Rakefile %{gemdir}/cache/%{gemname}-%{majorver}%{?preminorver}.gem %{gemdir}/specifications/%{gemname}-%{majorver}%{?preminorver}.gemspec %{geminstdir}/lib/ %{ruby_sitearch}/ruby_debug.so %files doc %defattr(-,root,root,-) %{gemdir}/doc/%{gemname}-%{majorver}%{?preminorver} %{geminstdir}/Rakefile %{geminstdir}/test/ %changelog * Wed Nov 9 2011 Mamoru Tasaka <mtasaka@fedoraproject.org> - 0.10.5-0.1.rc1 - 0.10.5 rc1 * Mon Feb 14 2011 Mamoru Tasaka <mtasaka@ioa.s.u-tokyo.ac.jp> - 0.10.4-2 - F-15 mass rebuild * Fri Oct 29 2010 Mamoru Tasaka <mtasaka@ioa.s.u-tokyo.ac.jp> - 0.10.4-1 - 0.10.4 * Fri Oct 22 2010 Mamoru Tasaka <mtasaka@ioa.s.u-tokyo.ac.jp> - 0.10.4-0.5.rc2 - 0.10.4 rc3 * Mon Oct 18 2010 Mamoru Tasaka <mtasaka@ioa.s.u-tokyo.ac.jp> - 0.10.4-0.4.rc2 - 0.10.4 rc2 * Tue Oct 05 2010 jkeating - 0.10.4-0.3.svn952.1 - Rebuilt for gcc bug 634757 * Tue Sep 21 2010 Mamoru Tasaka <mtasaka@ioa.s.u-tokyo.ac.jp> - 0.10.4-0.3.svn952_trunk - Try using latest svn * Mon Sep 06 2010 Mamoru Tasaka <mtasaka@ioa.s.u-tokyo.ac.jp> - 0.10.4-0.1.rc1 - 0.10.4 rc1 - Using rubyforge.org hosted gem for now * Mon Sep 06 2010 Mamoru Tasaka <mtasaka@ioa.s.u-tokyo.ac.jp> - 0.10.3-1 - Initial package