95 lines
3.0 KiB
RPMSpec
95 lines
3.0 KiB
RPMSpec
%global ruby_sitelib %(ruby -rrbconfig -e "puts Config::CONFIG['sitelibdir']")
|
|
%global gemdir %(ruby -rubygems -e 'puts Gem::dir' 2>/dev/null)
|
|
%global gemname diff-lcs
|
|
%global geminstdir %{gemdir}/gems/%{gemname}-%{version}
|
|
|
|
Summary: Provide a list of changes between two sequenced collections
|
|
Name: rubygem-%{gemname}
|
|
Version: 1.1.2
|
|
Release: 5%{?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: rubygems
|
|
BuildRequires: rubygems
|
|
BuildArch: noarch
|
|
Provides: rubygem(%{gemname}) = %{version}
|
|
|
|
%description
|
|
Diff::LCS is a port of Algorithm::Diff that uses the McIlroy-Hunt longest
|
|
common subsequence (LCS) algorithm to compute intelligent differences between
|
|
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).
|
|
|
|
|
|
%prep
|
|
|
|
|
|
%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}
|
|
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
|
|
|
|
# We strip bad shebangs (/usr/bin/env) instead of fixing them
|
|
# since these files are not executable anyways
|
|
find $RPM_BUILD_ROOT%{gemdir} \( -name '*.rb' -o -name 'Rakefile' \) \
|
|
-exec grep -q '^#!' '{}' \; -print |while read F
|
|
do
|
|
awk '/^#!/ {if (FNR == 1) next;} {print}' $F >chopped
|
|
touch -r $F chopped
|
|
mv chopped $F
|
|
done
|
|
|
|
|
|
%clean
|
|
rm -rf $RPM_BUILD_ROOT
|
|
|
|
|
|
%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
|
|
%{gemdir}/cache/%{gemname}-%{version}.gem
|
|
%{gemdir}/specifications/%{gemname}-%{version}.gemspec
|
|
|
|
|
|
%changelog
|
|
* Wed Feb 09 2011 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.1.2-5
|
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild
|
|
|
|
* Sun Jul 26 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.1.2-4
|
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild
|
|
|
|
* Fri Jun 26 2009 Lubomir Rintel (Good Data) <lubo.rintel@gooddata.com> - 1.1.2-3
|
|
- Get rid of duplicate files (thanks to Mamoru Tasaka)
|
|
|
|
* Mon Jun 08 2009 Lubomir Rintel (Good Data) <lubo.rintel@gooddata.com> - 1.1.2-2
|
|
- Depend on ruby(abi)
|
|
- Replace defines with globals
|
|
|
|
* Fri Jun 05 2009 Lubomir Rintel (Good Data) <lubo.rintel@gooddata.com> - 1.1.2-1
|
|
- Package generated by gem2rpm
|
|
- Strip useless shebangs
|
|
- Fix up License
|