diff --git a/.gitignore b/.gitignore index e69de29..4f6188e 100644 --- a/.gitignore +++ b/.gitignore @@ -0,0 +1,2 @@ +/progressbar-0.9.0.gem +/rubygem-progressbar-test-load-path-fix.patch diff --git a/rubygem-progressbar.spec b/rubygem-progressbar.spec new file mode 100644 index 0000000..4d01002 --- /dev/null +++ b/rubygem-progressbar.spec @@ -0,0 +1,87 @@ +%global gemdir %(ruby -rubygems -e 'puts Gem::dir' 2>/dev/null) +%global gemname progressbar +%global geminstdir %{gemdir}/gems/%{gemname}-%{version} +%global rubyabi 1.8 + +Summary: Ruby text progress bar generator library +Name: rubygem-%{gemname} +Version: 0.9.0 +Release: 2%{?dist} +Group: Development/Languages +License: GPLv2 or Ruby +URL: http://github.com/peleteiro/progressbar +Source0: http://gems.rubyforge.org/gems/%{gemname}-%{version}.gem +Patch0: %{name}-test-load-path-fix.patch +Requires: ruby(abi) = %{rubyabi} +Requires: rubygems +BuildRequires: rubygems +BuildArch: noarch +Provides: rubygem(%{gemname}) = %{version} + +%description +ProgressBar is a text progress bar library for Ruby. It can indicate +progress with percentage, a progress bar, and estimated remaining time. + +%package doc +Summary: Documentation for %{name} +Group: Documentation +Requires:%{name} = %{version}-%{release} + +%description doc +Documentation for %{name} + +%prep +%setup -q -c -T +mkdir -p ./%{gemdir} +gem install \ + --local \ + --install-dir ./%{gemdir} \ + -V --force --rdoc \ + %{SOURCE0} +pushd .%{geminstdir} +%patch0 +popd + +%build + +%install +rm -rf %{buildroot} +mkdir -p %{buildroot}%{gemdir} +cp -a ./%{gemdir}/* %{buildroot}%{gemdir} +iconv --from=EUC-JP --to=UTF-8 %{buildroot}%{geminstdir}/README.ja.rd > %{buildroot}%{geminstdir}/README.ja.rd.utf8 && \ +touch -r %{buildroot}%{geminstdir}/README.ja.rd %{buildroot}%{geminstdir}/README.ja.rd.utf8 && \ +mv -f %{buildroot}%{geminstdir}/README.ja.rd.utf8 %{buildroot}%{geminstdir}/README.ja.rd + +%check +pushd %{buildroot}/%{geminstdir}/test +ruby test.rb +popd + +%clean +rm -rf %{buildroot} + +%files +%defattr(-, root, root, -) +%dir %{geminstdir} +%{geminstdir}/lib +%doc %{geminstdir}/ChangeLog +%doc %{geminstdir}/LICENSE +%doc %{geminstdir}/README.en.rd +%doc %{geminstdir}/README.ja.rd +%{gemdir}/cache/%{gemname}-%{version}.gem +%{gemdir}/specifications/%{gemname}-%{version}.gemspec + +%files doc +%defattr(-, root, root, -) +%{gemdir}/doc/%{gemname}-%{version} +%{geminstdir}/test + +%changelog +* Fri Oct 29 2010 Michal Fojtik - 0.9.0-2 +- Fixed encoding on README.ja.rd +- Changed way how patch is applied +- Removed unneeded bindir macro +- License changed to Ruby + +* Wed Oct 13 2010 Michal Fojtik - 0.9.0-1 +- Initial package diff --git a/sources b/sources index e69de29..2e6e94a 100644 --- a/sources +++ b/sources @@ -0,0 +1,2 @@ +edcd2732e4bdd9c3e2940f82ab99e834 progressbar-0.9.0.gem +66cf3c6f81e29f8ad750ee33ee5ec5b7 rubygem-progressbar-test-load-path-fix.patch