From 1a4fb8ff4e627058d78361707530741d748434fb Mon Sep 17 00:00:00 2001 From: TASAKA Mamoru Date: Oct 25 2012 05:21:52 +0000 Subject: Initial import --- diff --git a/.gitignore b/.gitignore index e69de29..7e7d519 100644 --- a/.gitignore +++ b/.gitignore @@ -0,0 +1,2 @@ +/ruby-debug-base19-0.11.26.gem +/ruby-1.9.3-p286.tar.gz diff --git a/rubygem-ruby-debug-base19.spec b/rubygem-ruby-debug-base19.spec new file mode 100644 index 0000000..592fa6e --- /dev/null +++ b/rubygem-ruby-debug-base19.spec @@ -0,0 +1,153 @@ +%global gem_name ruby-debug-base19 +%global rubyabi 1.9.1 + +%global repoid 75415 + +%global ruby_majorver 1.9 +%global ruby_fullver 1.9.3-p286 + +Summary: Fast Ruby debugger - core component +Name: rubygem-%{gem_name} +Version: 0.11.26 +Release: 3%{?dist} + +Group: Development/Languages +# LICENSE +License: BSD +URL: http://rubyforge.org/projects/ruby-debug19/ +# 0.11.25 on rubygems site doesn't work with ruby 1.9 +#Source0: http://rubygems.org/gems/%%{gem_name}-%%{version}.gem +Source0: http://rubyforge.org/frs/download.php/%{repoid}/%{gem_name}-%{version}.gem +# ruby-debug-base uses headers in ruby tarball which are not installed +# by default... +Source1: ftp://ftp.ruby-lang.org/pub/ruby/%{ruby_majorver}/ruby-%{ruby_fullver}.tar.gz +Patch0: rubygem-ruby-debug-base19-0.11.26-dont_use_ruby_core_source.patch +# Kill gcc warning for -Wsequence-point +Patch1: rubygem-ruby-debug-base19-0.11.26-gcc47-undefined-behavior.patch + +Requires: ruby(abi) = %{rubyabi} +Requires: ruby(rubygems) +Requires: rubygem(linecache19) >= 0.5.13 +BuildRequires: ruby(abi) = %{rubyabi} +BuildRequires: rubygems-devel +BuildRequires: ruby-devel +# %%check +BuildRequires: rubygem(linecache19) +BuildRequires: rubygem(minitest) +Provides: rubygem(%{gem_name}) = %{version}-%{release} +# Obsolete this, not providing +Obsoletes: rubygem-ruby-debug-base <= 0.10.5 + +%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} +BuildArch: noarch +# Obsolete this, not providing +Obsoletes: rubygem-ruby-debug-base-doc <= 0.10.5 + +%description doc +Documentation for %{name} + +%prep +%setup -q -c -T -a 1 + +# Gem repack +TOPDIR=$(pwd) +mkdir tmpunpackdir +pushd tmpunpackdir + +gem unpack %{SOURCE0} +cd %{gem_name}-%{version} + +# permission +find . -type f -print0 | xargs --null chmod 0644 + +# shebang +find ./lib -name \*.rb -print0 | \ + xargs --null sed -i -e '\@^#!%{_bindir}@d' + +# Kill ruby_core_source dependency - this is +# just to download ruby tarball +gem specification -l --ruby %{SOURCE0} | \ + sed -e '\@columnize@d' -e '\@ruby_core_source@d' \ + > %{gem_name}.gemspec + +# Patch +%patch0 -p1 +%patch1 -p1 + +gem build %{gem_name}.gemspec +mv %{gem_name}-%{version}.gem $TOPDIR + +popd +rm -rf tmpunpackdir + +# Kill unneeeded ruby files +mkdir ruby_headers +# So the actual files needed are header files and +# inc file under +# ruby-%%ruby_fullver directory only +cp -p ruby-%{ruby_fullver}/{*.h,*.inc} ruby_headers/ +rm -rf ruby-%{ruby_fullver}/ + +%build +mkdir -p .%{gem_dir} + +export CONFIGURE_ARGS="--with-cflags=\"%{optflags} -I$(pwd)/ruby_headers\"" +gem install \ + --local \ + --install-dir .%{gem_dir} \ + -V \ + --force \ + %{gem_name}-%{version}.gem + +%install +mkdir -p %{buildroot}%{gem_dir} +cp -a .%{gem_dir}/* \ + %{buildroot}%{gem_dir}/ + +mkdir -p %{buildroot}%{gem_extdir}/lib +mv \ + %{buildroot}%{gem_instdir}/lib/ruby_debug.so \ + %{buildroot}%{gem_extdir}/lib/ + +# Remove the binary extension sources and build leftovers. +rm -rf %{buildroot}%{gem_instdir}/ext + +%check +pushd .%{gem_instdir} +testrb -Ilib test/base/*.rb +popd + +%files +%dir %{gem_instdir} +%doc %{gem_instdir}/[A-Z]* +%exclude %{gem_instdir}/Rakefile +%{gem_libdir} +%dir %{gem_extdir} +%dir %{gem_extdir}/lib +%{gem_extdir}/lib/ruby_debug.so +%exclude %{gem_cache} +%{gem_spec} + +%files doc +%{gem_docdir}/ +%exclude %{gem_instdir}/test/ + +%changelog +* Thu Oct 25 2012 Mamoru Tasaka - 0.11.26-3 +- Use latest ruby source + +* Fri Sep 14 2012 Mamoru Tasaka - 0.11.26-2 +- A bit clean up + +* Thu May 3 2012 Mamoru Tasaka - 0.11.26-1 +- Initial package diff --git a/sources b/sources index e69de29..6c5335c 100644 --- a/sources +++ b/sources @@ -0,0 +1,2 @@ +99796da4f5b5714b0d2b1753da6b97e3 ruby-debug-base19-0.11.26.gem +e2469b55c2a3d0d643097d47fe4984bb ruby-1.9.3-p286.tar.gz