%global gem_name linecache19 %global rubyabi 1.9.1 %global repoid 75414 %global ruby_majorver 2.0 %global ruby_fullver 2.0.0-p0 Summary: Read file with caching Name: rubygem-%{gem_name} Version: 0.5.13 Release: 7%{?dist} Group: Development/Languages # README file License: GPLv2 URL: http://rubyforge.org/projects/ruby-debug19 # 0.5.12 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 # linecache 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-linecache19-0.5.12-dont_use_ruby_core_source.patch Patch1: rubygem-linecache19-0.5.12-system-path.patch Requires: ruby(release) Requires: ruby(rubygems) # Kill below #BuildRequires: rubygem(ruby_core_source) >= 0.1.4 BuildRequires: ruby(release) BuildRequires: rubygems-devel BuildRequires: ruby-devel BuildRequires: rubygem(minitest) Provides: rubygem(%{gem_name}) = %{version}-%{release} # Obsolete this, not providing Obsoletes: rubygem-linecache < 0.44 %description The LineCache module allows one to get any line from any file, caching the lines and file information on first access to the file. Although the file may be any file, the common use is when the file is a Ruby script since parsing of the file is done to figure out where the statement boundaries are. The routines here may be is useful when a small random sets of lines are read from a single file, in particular in a debugger to show source lines. %package doc Summary: Documentation for %{name} Group: Documentation Requires: %{name} = %{version}-%{release} %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 '\@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 under # ruby-%%ruby_fullver directory only cp -p ruby-%{ruby_fullver}/*.h ruby_headers/ rm -rf ruby-%{ruby_fullver}/ %build export CONFIGURE_ARGS="--with-cflags=\"%{optflags} -I$(pwd)/ruby_headers\"" %gem_install %install mkdir -p %{buildroot}%{gem_dir} cp -a .%{gem_dir}/* \ %{buildroot}%{gem_dir}/ mkdir -p %{buildroot}%{gem_extdir_mri}/lib mv \ %{buildroot}%{gem_instdir}/lib/trace_nums19.so \ %{buildroot}%{gem_extdir_mri}/lib/ rm -rf %{buildroot}%{gem_instdir}/ext %check pushd .%{gem_instdir} testrb -Ilib test/test-*.rb popd %files %dir %{gem_instdir} %doc %{gem_instdir}/[A-Z]* %exclude %{gem_instdir}/Rakefile %{gem_libdir} %dir %{gem_extdir_mri} %dir %{gem_extdir_mri}/lib %{gem_extdir_mri}/lib/trace_nums19.so %exclude %{gem_cache} %{gem_spec} %files doc %{gem_docdir}/ %exclude %{gem_instdir}/test/ %changelog * Sun Jun 08 2014 Fedora Release Engineering - 0.5.13-7 - Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild * Sun Aug 04 2013 Fedora Release Engineering - 0.5.13-6 - Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild * Thu Mar 28 2013 Mamoru TASAKA - 0.5.13-5 - Use %%gem_install * Thu Mar 28 2013 Mamoru TASAKA - 0.5.13-4 - F-19: rebuild for ruby 2.0.0 * Thu Feb 14 2013 Fedora Release Engineering - 0.5.13-3 - Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild * Sat Jul 21 2012 Fedora Release Engineering - 0.5.13-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild * Mon Jun 11 2012 Mamoru Tasaka - 0.5.13-2 - Incorporate review requests' comments * Thu May 3 2012 Mamoru Tasaka - 0.5.13-1 - Renamed to rubygem-linecache19 * Sat Jan 14 2012 Fedora Release Engineering - 0.43-5 - Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild * Wed Feb 09 2011 Fedora Release Engineering - 0.43-4 - Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild * Mon Dec 14 2009 Jeroen van Meeuwen - 0.43-3 - Fix %%define vs. %%global * Sat Nov 14 2009 Jeroen van Meeuwen - 0.43-2 - Review * Wed Oct 14 2009 Jeroen van Meeuwen - 0.43-1 - First package