[3845] | 1 | %global ruby_sitelib %(ruby -rrbconfig -e "puts Config::CONFIG['sitelibdir']") |
---|
| 2 | %global gemdir %(ruby -rubygems -e 'puts Gem::dir' 2>/dev/null) |
---|
| 3 | %global gemname rake |
---|
| 4 | %global geminstdir %{gemdir}/gems/%{gemname}-%{version} |
---|
| 5 | |
---|
| 6 | %global rubyabi 1.8 |
---|
| 7 | |
---|
| 8 | Summary: Ruby based make-like utility |
---|
| 9 | Summary(ja): Ruby ベースの make のようなユーティリティ |
---|
| 10 | Name: rubygem-%{gemname} |
---|
| 11 | |
---|
| 12 | Version: 0.8.7 |
---|
| 13 | Release: 1%{?_dist_release} |
---|
| 14 | Group: Development/Languages |
---|
| 15 | License: MIT |
---|
| 16 | URL: http://rake.rubyforge.org |
---|
| 17 | Source0: http://gems.rubyforge.org/gems/%{gemname}-%{version}.gem |
---|
| 18 | |
---|
| 19 | Requires: ruby |
---|
| 20 | BuildRequires: rubygems |
---|
| 21 | BuildRequires: ruby |
---|
| 22 | BuildArch: noarch |
---|
| 23 | |
---|
| 24 | %description |
---|
| 25 | Rake is a Make-like program implemented in Ruby. Tasks and dependencies are |
---|
| 26 | specified in standard Ruby syntax. |
---|
| 27 | |
---|
| 28 | %package doc |
---|
| 29 | Summary: Documentation for %{name} |
---|
| 30 | Group: Documentation |
---|
| 31 | # Directory ownership issue |
---|
| 32 | Requires: %{name} = %{version}-%{release} |
---|
| 33 | |
---|
| 34 | %description doc |
---|
| 35 | This package contains documentation for %{name}. |
---|
| 36 | |
---|
| 37 | |
---|
| 38 | %prep |
---|
| 39 | %setup -q -c -T |
---|
| 40 | |
---|
| 41 | %build |
---|
| 42 | mkdir -p .%{gemdir} |
---|
| 43 | gem install -V \ |
---|
| 44 | --local \ |
---|
| 45 | --install-dir $(pwd)/%{gemdir} \ |
---|
| 46 | --force \ |
---|
| 47 | --rdoc \ |
---|
| 48 | %{SOURCE0} |
---|
| 49 | |
---|
| 50 | %install |
---|
| 51 | mkdir -p %{buildroot}%{gemdir} |
---|
| 52 | cp -a .%{gemdir}/* %{buildroot}%{gemdir} |
---|
| 53 | mkdir -p %{buildroot}%{_bindir} |
---|
| 54 | ln -sf %{gemdir}/bin/rake %{buildroot}/%{_bindir}/rake |
---|
| 55 | |
---|
| 56 | # rpmlint issue |
---|
| 57 | find %{buildroot}%{geminstdir}/{lib,test} -type f | \ |
---|
| 58 | xargs sed -i -e '\@^#!/usr.*ruby@d' |
---|
| 59 | find %{buildroot}%{geminstdir}/{doc,lib,test} -type f | xargs chmod 0644 |
---|
| 60 | |
---|
| 61 | %files |
---|
| 62 | %defattr(-,root,root,-) |
---|
| 63 | %{_bindir}/rake |
---|
| 64 | %dir %{geminstdir} |
---|
| 65 | %doc %{geminstdir}/MIT-LICENSE |
---|
| 66 | %doc %{geminstdir}/TODO |
---|
| 67 | %doc %{geminstdir}/CHANGES |
---|
| 68 | %{gemdir}/bin |
---|
| 69 | %{geminstdir}/bin |
---|
| 70 | %{geminstdir}/lib |
---|
| 71 | %{gemdir}/cache/%{gemname}-%{version}.gem |
---|
| 72 | %{gemdir}/specifications/%{gemname}-%{version}.gemspec |
---|
| 73 | |
---|
| 74 | %files doc |
---|
| 75 | %defattr(-,root,root,-) |
---|
| 76 | %{geminstdir}/Rakefile |
---|
| 77 | %{geminstdir}/install.rb |
---|
| 78 | %{geminstdir}/doc |
---|
| 79 | %{geminstdir}/test/ |
---|
| 80 | %{gemdir}/doc/%{gemname}-%{version}/ |
---|
| 81 | |
---|
| 82 | |
---|
| 83 | %changelog |
---|
| 84 | * Thu May 12 2011 Daisuke SUZUKI <daisuke@linux.or.jp> 0.8.7-1 |
---|
| 85 | - initial build for Vine Linux |
---|