Blame rubygem-linecache19.spec

TASAKA Mamoru c42dd8b
%global	gem_name	linecache19
TASAKA Mamoru c42dd8b
%global	rubyabi		1.9.1
TASAKA Mamoru c42dd8b
TASAKA Mamoru c42dd8b
%global	repoid		75414
TASAKA Mamoru c42dd8b
TASAKA Mamoru 3977def
%global	ruby_majorver	2.0
TASAKA Mamoru 3977def
%global	ruby_fullver	2.0.0-p0
TASAKA Mamoru c42dd8b
TASAKA Mamoru c42dd8b
Summary:	Read file with caching
TASAKA Mamoru c42dd8b
Name:		rubygem-%{gem_name}
TASAKA Mamoru c42dd8b
Version:	0.5.13
71239c8
Release:	8%{?dist}
TASAKA Mamoru c42dd8b
TASAKA Mamoru c42dd8b
Group:		Development/Languages
TASAKA Mamoru c42dd8b
# README file
TASAKA Mamoru c42dd8b
License:	GPLv2
TASAKA Mamoru c42dd8b
URL:		http://rubyforge.org/projects/ruby-debug19
TASAKA Mamoru c42dd8b
# 0.5.12 on rubygems site doesn't work with ruby 1.9
TASAKA Mamoru c42dd8b
#Source0:	http://rubygems.org/gems/%%{gem_name}-%%{version}.gem
TASAKA Mamoru c42dd8b
Source0:	http://rubyforge.org/frs/download.php/%{repoid}/%{gem_name}-%{version}.gem
TASAKA Mamoru c42dd8b
# linecache uses headers in ruby tarball which are not installed
TASAKA Mamoru c42dd8b
# by default...
TASAKA Mamoru c42dd8b
Source1:	ftp://ftp.ruby-lang.org/pub/ruby/%{ruby_majorver}/ruby-%{ruby_fullver}.tar.gz
TASAKA Mamoru c42dd8b
Patch0:		rubygem-linecache19-0.5.12-dont_use_ruby_core_source.patch
TASAKA Mamoru c42dd8b
Patch1:		rubygem-linecache19-0.5.12-system-path.patch
TASAKA Mamoru c42dd8b
TASAKA Mamoru 3977def
Requires:	ruby(release)
TASAKA Mamoru c42dd8b
Requires:	ruby(rubygems)
TASAKA Mamoru c42dd8b
# Kill below
TASAKA Mamoru c42dd8b
#BuildRequires:	rubygem(ruby_core_source) >= 0.1.4
TASAKA Mamoru 3977def
BuildRequires:	ruby(release)
TASAKA Mamoru c42dd8b
BuildRequires:	rubygems-devel 
TASAKA Mamoru c42dd8b
BuildRequires:	ruby-devel
TASAKA Mamoru c42dd8b
BuildRequires:	rubygem(minitest)
TASAKA Mamoru c42dd8b
Provides:	rubygem(%{gem_name}) = %{version}-%{release}
TASAKA Mamoru c42dd8b
# Obsolete this, not providing
TASAKA Mamoru c42dd8b
Obsoletes:	rubygem-linecache < 0.44
TASAKA Mamoru c42dd8b
TASAKA Mamoru c42dd8b
%description
TASAKA Mamoru c42dd8b
The LineCache module allows one to get any line from any file, caching
TASAKA Mamoru c42dd8b
the lines and file information on first access to the file. Although
TASAKA Mamoru c42dd8b
the file may be any file, the common use is when the file is a Ruby
TASAKA Mamoru c42dd8b
script since parsing of the file is done to figure out where the
TASAKA Mamoru c42dd8b
statement boundaries are.
TASAKA Mamoru c42dd8b
TASAKA Mamoru c42dd8b
The routines here may be is useful when a small random sets of lines
TASAKA Mamoru c42dd8b
are read from a single file, in particular in a debugger to show
TASAKA Mamoru c42dd8b
source lines.
TASAKA Mamoru c42dd8b
TASAKA Mamoru c42dd8b
TASAKA Mamoru c42dd8b
%package	doc
TASAKA Mamoru c42dd8b
Summary:	Documentation for %{name}
TASAKA Mamoru c42dd8b
Group:		Documentation
TASAKA Mamoru c42dd8b
Requires:	%{name} = %{version}-%{release}
TASAKA Mamoru c42dd8b
TASAKA Mamoru c42dd8b
%description doc
TASAKA Mamoru c42dd8b
Documentation for %{name}
TASAKA Mamoru c42dd8b
TASAKA Mamoru c42dd8b
%prep
TASAKA Mamoru c42dd8b
%setup -q -c -T -a 1
TASAKA Mamoru c42dd8b
TASAKA Mamoru c42dd8b
# Gem repack
TASAKA Mamoru c42dd8b
TOPDIR=$(pwd)
TASAKA Mamoru c42dd8b
mkdir tmpunpackdir
TASAKA Mamoru c42dd8b
pushd tmpunpackdir
TASAKA Mamoru c42dd8b
TASAKA Mamoru c42dd8b
gem unpack %{SOURCE0}
TASAKA Mamoru c42dd8b
cd %{gem_name}-%{version}
TASAKA Mamoru c42dd8b
TASAKA Mamoru c42dd8b
# permission
TASAKA Mamoru c42dd8b
find . -type f -print0 | xargs --null chmod 0644
TASAKA Mamoru c42dd8b
TASAKA Mamoru c42dd8b
# shebang
TASAKA Mamoru c42dd8b
find ./lib -name \*.rb -print0 | \
TASAKA Mamoru c42dd8b
	xargs --null sed -i -e '\@^#!%{_bindir}@d'
TASAKA Mamoru c42dd8b
TASAKA Mamoru c42dd8b
# Kill ruby_core_source dependency - this is
TASAKA Mamoru c42dd8b
# just to download ruby tarball
TASAKA Mamoru c42dd8b
gem specification  -l --ruby %{SOURCE0} | \
TASAKA Mamoru c42dd8b
	sed -e '\@ruby_core_source@d' > %{gem_name}.gemspec
TASAKA Mamoru c42dd8b
TASAKA Mamoru c42dd8b
# Patch
TASAKA Mamoru c42dd8b
%patch0 -p1
TASAKA Mamoru c42dd8b
%patch1 -p1
TASAKA Mamoru c42dd8b
TASAKA Mamoru c42dd8b
gem build %{gem_name}.gemspec
TASAKA Mamoru c42dd8b
mv %{gem_name}-%{version}.gem $TOPDIR
TASAKA Mamoru c42dd8b
TASAKA Mamoru c42dd8b
popd
TASAKA Mamoru c42dd8b
rm -rf tmpunpackdir
TASAKA Mamoru c42dd8b
TASAKA Mamoru c42dd8b
# Kill unneeeded ruby files
TASAKA Mamoru c42dd8b
mkdir ruby_headers
TASAKA Mamoru c42dd8b
# So the actual files needed are header files under
TASAKA Mamoru c42dd8b
# ruby-%%ruby_fullver directory only
TASAKA Mamoru c42dd8b
cp -p ruby-%{ruby_fullver}/*.h ruby_headers/
TASAKA Mamoru c42dd8b
rm -rf ruby-%{ruby_fullver}/
TASAKA Mamoru c42dd8b
TASAKA Mamoru c42dd8b
%build
TASAKA Mamoru c42dd8b
export CONFIGURE_ARGS="--with-cflags=\"%{optflags} -I$(pwd)/ruby_headers\""
TASAKA Mamoru ca618b5
%gem_install
TASAKA Mamoru c42dd8b
TASAKA Mamoru c42dd8b
%install
TASAKA Mamoru c42dd8b
mkdir -p %{buildroot}%{gem_dir}
TASAKA Mamoru c42dd8b
cp -a .%{gem_dir}/* \
TASAKA Mamoru c42dd8b
	%{buildroot}%{gem_dir}/
TASAKA Mamoru c42dd8b
TASAKA Mamoru 3977def
mkdir -p %{buildroot}%{gem_extdir_mri}/lib
TASAKA Mamoru c42dd8b
mv \
TASAKA Mamoru c42dd8b
	%{buildroot}%{gem_instdir}/lib/trace_nums19.so \
TASAKA Mamoru 3977def
	%{buildroot}%{gem_extdir_mri}/lib/
TASAKA Mamoru c42dd8b
TASAKA Mamoru c42dd8b
rm -rf %{buildroot}%{gem_instdir}/ext
TASAKA Mamoru c42dd8b
TASAKA Mamoru c42dd8b
%check
TASAKA Mamoru c42dd8b
pushd .%{gem_instdir}
TASAKA Mamoru f960535
testrb -Ilib test/test-*.rb
TASAKA Mamoru c42dd8b
popd
TASAKA Mamoru c42dd8b
TASAKA Mamoru c42dd8b
%files
TASAKA Mamoru c42dd8b
%dir	%{gem_instdir}
TASAKA Mamoru c42dd8b
%doc	%{gem_instdir}/[A-Z]*
TASAKA Mamoru c42dd8b
%exclude	%{gem_instdir}/Rakefile
TASAKA Mamoru c42dd8b
%{gem_libdir}
TASAKA Mamoru 3977def
%dir	%{gem_extdir_mri}
TASAKA Mamoru 3977def
%dir	%{gem_extdir_mri}/lib
TASAKA Mamoru 3977def
%{gem_extdir_mri}/lib/trace_nums19.so
TASAKA Mamoru c42dd8b
%exclude	%{gem_cache}
TASAKA Mamoru c42dd8b
%{gem_spec}
TASAKA Mamoru c42dd8b
TASAKA Mamoru c42dd8b
%files doc
TASAKA Mamoru c42dd8b
%{gem_docdir}/
TASAKA Mamoru c42dd8b
%exclude	%{gem_instdir}/test/
TASAKA Mamoru c42dd8b
TASAKA Mamoru c42dd8b
%changelog
71239c8
* Mon Aug 18 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.5.13-8
71239c8
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_22_Mass_Rebuild
71239c8
a3cacff
* Sun Jun 08 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.5.13-7
a3cacff
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild
a3cacff
48dc462
* Sun Aug 04 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.5.13-6
48dc462
- Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild
48dc462
TASAKA Mamoru ca618b5
* Thu Mar 28 2013 Mamoru TASAKA <mtasaka@fedoraproject.org> - 0.5.13-5
TASAKA Mamoru ca618b5
- Use %%gem_install
TASAKA Mamoru ca618b5
TASAKA Mamoru 3977def
* Thu Mar 28 2013 Mamoru TASAKA <mtasaka@fedoraproject.org> - 0.5.13-4
TASAKA Mamoru 3977def
- F-19: rebuild for ruby 2.0.0
TASAKA Mamoru 3977def
eb8a48f
* Thu Feb 14 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.5.13-3
eb8a48f
- Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild
eb8a48f
478cc0f
* Sat Jul 21 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.5.13-2
478cc0f
- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild
478cc0f
TASAKA Mamoru c42dd8b
* Mon Jun 11 2012 Mamoru Tasaka <mtasaka@fedoraproject.org> - 0.5.13-2
TASAKA Mamoru c42dd8b
- Incorporate review requests' comments
TASAKA Mamoru c42dd8b
TASAKA Mamoru c42dd8b
* Thu May  3 2012 Mamoru Tasaka <mtasaka@fedoraproject.org> - 0.5.13-1
TASAKA Mamoru c42dd8b
- Renamed to rubygem-linecache19
TASAKA Mamoru c42dd8b
TASAKA Mamoru c42dd8b
* Sat Jan 14 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.43-5
TASAKA Mamoru c42dd8b
- Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild
TASAKA Mamoru c42dd8b
TASAKA Mamoru c42dd8b
* Wed Feb 09 2011 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.43-4
TASAKA Mamoru c42dd8b
- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild
TASAKA Mamoru c42dd8b
TASAKA Mamoru c42dd8b
* Mon Dec 14 2009 Jeroen van Meeuwen <j.van.meeuwen@ogd.nl> - 0.43-3
TASAKA Mamoru c42dd8b
- Fix %%define vs. %%global
TASAKA Mamoru c42dd8b
TASAKA Mamoru c42dd8b
* Sat Nov 14 2009 Jeroen van Meeuwen <j.van.meeuwen@ogd.nl> - 0.43-2
TASAKA Mamoru c42dd8b
- Review
TASAKA Mamoru c42dd8b
TASAKA Mamoru c42dd8b
* Wed Oct 14 2009 Jeroen van Meeuwen <j.van.meeuwen@ogd.nl> - 0.43-1
TASAKA Mamoru c42dd8b
- First package