Rebuild against ruby 1.9

This commit is contained in:
Mamoru Tasaka 2012-01-22 08:14:59 +09:00
parent da759fc1cc
commit 9b43325570

View File

@ -1,20 +1,22 @@
%global ruby_sitelib %(ruby -rrbconfig -e "puts Config::CONFIG['sitelibdir']")
%global gemdir %(ruby -rubygems -e 'puts Gem::dir' 2>/dev/null)
%global gemdir %{gem_dir}
%global gemname diff-lcs
%global geminstdir %{gemdir}/gems/%{gemname}-%{version}
%global gem_name %{gemname}
%global geminstdir %{gem_instdir}
%global rubyabi 1.9.1
Summary: Provide a list of changes between two sequenced collections
Name: rubygem-%{gemname}
Version: 1.1.2
Release: 6%{?dist}
Release: 7%{?dist}
Group: Development/Languages
License: GPLv2+ or Ruby or Artistic
URL: http://rubyforge.org/projects/ruwiki/
Source0: http://gems.rubyforge.org/gems/%{gemname}-%{version}.gem
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
Requires: ruby(abi) = 1.8
Requires: ruby(abi) = %{rubyabi}
Requires: rubygems
BuildRequires: rubygems
BuildRequires: rubygems-devel
BuildRequires: ruby(abi) = %{rubyabi}
BuildArch: noarch
Provides: rubygem(%{gemname}) = %{version}
@ -25,19 +27,32 @@ two sequenced enumerable containers. The implementation is based on Mario I.
Wolczko's Smalltalk version (1.2, 1993) and Ned Konz's Perl version
(Algorithm::Diff).
%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
mkdir -p .%{gemdir}
gem install --local --install-dir .%{gemdir} \
-V \
--force --rdoc %{SOURCE0}
%build
%install
rm -rf $RPM_BUILD_ROOT
mkdir -p $RPM_BUILD_ROOT%{gemdir}
gem install --local --install-dir $RPM_BUILD_ROOT%{gemdir} \
--force --rdoc %{SOURCE0}
mkdir -p $RPM_BUILD_ROOT/%{_bindir}
cp -a .%{gemdir}/* $RPM_BUILD_ROOT%{gemdir}
mv $RPM_BUILD_ROOT%{gemdir}/bin/* $RPM_BUILD_ROOT/%{_bindir}
rmdir $RPM_BUILD_ROOT%{gemdir}/bin
find $RPM_BUILD_ROOT%{geminstdir}/bin -type f |xargs chmod a+x
@ -52,29 +67,31 @@ do
mv chopped $F
done
%clean
rm -rf $RPM_BUILD_ROOT
%check
pushd .%{geminstdir}
ruby -Ilib tests/*.rb
%files
%defattr(-,root,root,-)
%{_bindir}/ldiff
%{_bindir}/htmldiff
%dir %{geminstdir}
%{geminstdir}/Rakefile
%{geminstdir}/bin
%{geminstdir}/lib
%doc %{geminstdir}/tests
%doc %{gemdir}/doc/%{gemname}-%{version}
%doc %{geminstdir}/README
%doc %{geminstdir}/ChangeLog
%doc %{geminstdir}/Install
%{geminstdir}/[A-Z]*
%exclude %{geminstdir}/Rakefile
%{gemdir}/cache/%{gemname}-%{version}.gem
%{gemdir}/specifications/%{gemname}-%{version}.gemspec
%files doc
%{geminstdir}/Rakefile
%{geminstdir}/tests/
%{gemdir}/doc/%{gemname}-%{version}
%changelog
* Sun Jan 22 2012 Mamoru Tasaka <mtasaka@fedoraproject.org> - 1.1.2-7
- Rebuild against ruby 1.9
* Sat Jan 14 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.1.2-6
- Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild