Sophie

Sophie

distrib > Fedora > 13 > i386 > media > updates-src > by-pkgid > 2fdd29cd47dca4a935c8f67664029308 > files > 1

rubygem-term-ansicolor-1.0.5-1.fc13.src.rpm

%global ruby_sitelib %(ruby -rrbconfig -e "puts Config::CONFIG['sitelibdir']")
%global gemdir %(ruby -rubygems -e 'puts Gem::dir' 2>/dev/null)
%global gemname term-ansicolor
%global geminstdir %{gemdir}/gems/%{gemname}-%{version}

Summary:        Ruby library that colors strings using ANSI escape sequences
Name:           rubygem-%{gemname}
Version:        1.0.5
Release:        1%{?dist}
Group:          Development/Languages
License:        GPLv2
URL:            http://term-ansicolor.rubyforge.org
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
Small Ruby library that colors strings using ANSI escape sequences.


%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}

# 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
mv -f %{buildroot}%{gemdir}/bin %{buildroot}%{_prefix} 
find $RPM_BUILD_ROOT%{geminstdir}/bin -type f |xargs chmod a+x


%clean
rm -rf $RPM_BUILD_ROOT


%files
%defattr(-,root,root,-)
%dir %{geminstdir}
%{_bindir}/cdiff
%{_bindir}/decolor
%doc %{geminstdir}/CHANGES
%doc %{geminstdir}/VERSION
%doc %{geminstdir}/COPYING
%doc %{geminstdir}/README
%doc %{geminstdir}/examples
%{geminstdir}/Rakefile
%{geminstdir}/*.rb
%{geminstdir}/lib/
%{geminstdir}/bin/
%{geminstdir}/tests/
%doc %{gemdir}/doc/%{gemname}-%{version}
%{gemdir}/cache/%{gemname}-%{version}.gem
%{gemdir}/specifications/%{gemname}-%{version}.gemspec


%changelog
* Wed Jun 30 2010 Michal Fojtik <mfojtik@redhat.com> - 1.0.5-1
- Version bump

* Sun Jul 26 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.0.3-4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild

* Fri Jun 26 2009 Lubomir Rintel (Good Data) <lubo.rintel@gooddata.com> - 1.0.3-3
- Get rid of duplicate files (thanks to Mamoru Tasaka)

* Mon Jun 08 2009 Lubomir Rintel (Good Data) <lubo.rintel@gooddata.com> - 1.0.3-2
- Fix up documentation list
- Use geminstdir macro where appropriate
- Do not move examples around
- Depend on ruby(abi)
- Replace defines with globals

* Fri Jun 05 2009 Lubomir Rintel (Good Data) <lubo.rintel@gooddata.com> - 1.0.3-1
- Package generated by gem2rpm
- Strip useless shebangs
- Move examples into documentation
- Fix up License