Compare commits
1 commit
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
a1be6ee779 |
2 changed files with 80 additions and 18 deletions
|
|
@ -13,13 +13,16 @@ License: MIT and (GPLv2 or Ruby)
|
||||||
URL: http://yardoc.org
|
URL: http://yardoc.org
|
||||||
|
|
||||||
Source0: http://gemcutter.org/downloads/%{gemname}-%{version}.gem
|
Source0: http://gemcutter.org/downloads/%{gemname}-%{version}.gem
|
||||||
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
|
|
||||||
|
# fix for https://github.com/lsegal/yard/issues/272
|
||||||
|
# https://github.com/postmodern/yard/commit/f4075ea5ddb3bb85bb79408e4128c877c166a69e
|
||||||
|
Patch0: yard-rubygems-17-support.patch
|
||||||
Requires: rubygems
|
Requires: rubygems
|
||||||
Requires: ruby(abi) = %{rubyabi}
|
Requires: ruby(abi) = %{rubyabi}
|
||||||
BuildRequires: rubygems
|
BuildRequires: rubygems
|
||||||
BuildRequires(check): rubygem(rake)
|
BuildRequires: rubygem(rake)
|
||||||
BuildRequires(check): rubygem(rspec)
|
BuildRequires: rubygem(rspec)
|
||||||
BuildRequires(check): rubygem(RedCloth)
|
BuildRequires: rubygem(RedCloth)
|
||||||
BuildArch: noarch
|
BuildArch: noarch
|
||||||
Provides: rubygem(%{gemname}) = %{version}
|
Provides: rubygem(%{gemname}) = %{version}
|
||||||
|
|
||||||
|
|
@ -32,30 +35,33 @@ custom Ruby constructs such as custom class level definitions.
|
||||||
|
|
||||||
%prep
|
%prep
|
||||||
%setup -q -T -c
|
%setup -q -T -c
|
||||||
|
%{__mkdir_p} .%{gemdir}
|
||||||
|
# FIXME rdoc generation doesn't work w/
|
||||||
|
# the yard/rdoc version on F15
|
||||||
|
gem install --local --install-dir .%{gemdir} \
|
||||||
|
--force -V --no-rdoc --no-ri %{SOURCE0}
|
||||||
|
|
||||||
|
pushd .%{geminstdir}
|
||||||
|
%patch0
|
||||||
|
popd
|
||||||
|
|
||||||
|
|
||||||
%build
|
%build
|
||||||
|
|
||||||
%install
|
%install
|
||||||
rm -rf %{buildroot}
|
|
||||||
mkdir -p %{buildroot}%{gemdir}
|
mkdir -p %{buildroot}%{gemdir}
|
||||||
mkdir -p %{buildroot}/%{_bindir}
|
mv .%{gemdir}/* %{buildroot}%{gemdir}
|
||||||
|
|
||||||
gem install --local --install-dir ./%{gemdir} \
|
mkdir -p %{buildroot}/%{_bindir}
|
||||||
--force --rdoc %{SOURCE0}
|
|
||||||
cp -a ./%{gemdir}/* %{buildroot}/%{gemdir}/.
|
|
||||||
mv %{buildroot}%{gemdir}/bin/* %{buildroot}/%{_bindir}
|
mv %{buildroot}%{gemdir}/bin/* %{buildroot}/%{_bindir}
|
||||||
rmdir %{buildroot}%{gemdir}/bin
|
rmdir %{buildroot}%{gemdir}/bin
|
||||||
find %{buildroot}%{geminstdir}/bin -type f | xargs chmod a+x
|
find %{buildroot}%{geminstdir}/bin -type f | xargs chmod a+x
|
||||||
|
|
||||||
%clean
|
|
||||||
rm -rf %{buildroot}
|
|
||||||
|
|
||||||
%check
|
%check
|
||||||
pushd .%{geminstdir}
|
pushd %{buildroot}%{geminstdir}
|
||||||
rake spec || :
|
rake spec
|
||||||
|
|
||||||
%files
|
%files
|
||||||
%defattr(-, root, root, -)
|
|
||||||
%{_bindir}/yardoc
|
%{_bindir}/yardoc
|
||||||
%{_bindir}/yri
|
%{_bindir}/yri
|
||||||
%{_bindir}/yard-graph
|
%{_bindir}/yard-graph
|
||||||
|
|
@ -64,6 +70,7 @@ rake spec || :
|
||||||
%{geminstdir}/lib
|
%{geminstdir}/lib
|
||||||
%{geminstdir}/templates
|
%{geminstdir}/templates
|
||||||
%{geminstdir}/.yardopts
|
%{geminstdir}/.yardopts
|
||||||
|
%{geminstdir}/.yardoc
|
||||||
|
|
||||||
%{gemdir}/cache/%{gemname}-%{version}.gem
|
%{gemdir}/cache/%{gemname}-%{version}.gem
|
||||||
%{gemdir}/specifications/%{gemname}-%{version}.gemspec
|
%{gemdir}/specifications/%{gemname}-%{version}.gemspec
|
||||||
|
|
@ -75,12 +82,12 @@ rake spec || :
|
||||||
%doc %{geminstdir}/benchmarks
|
%doc %{geminstdir}/benchmarks
|
||||||
%doc %{geminstdir}/spec
|
%doc %{geminstdir}/spec
|
||||||
%doc %{geminstdir}/docs
|
%doc %{geminstdir}/docs
|
||||||
%doc %{gemdir}/doc/%{gemname}-%{version}
|
|
||||||
|
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
* Wed Feb 09 2011 Fedora Release Engineering <rel-eng@lists.fedoraproject.org>
|
* Mon Jul 25 2011 Mo Morsi <mmorsi@redhat.com> - 0.5.3-4
|
||||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild
|
- integrated fix for upstream issue 272
|
||||||
|
- temp disabled rdoc generation as that is not working on F15
|
||||||
|
|
||||||
* Mon Feb 22 2010 Mohammed Morsi <mmorsi@redhat.com> - 0.5.3-3
|
* Mon Feb 22 2010 Mohammed Morsi <mmorsi@redhat.com> - 0.5.3-3
|
||||||
- fixed dependencies/package issues according to guidelines
|
- fixed dependencies/package issues according to guidelines
|
||||||
|
|
|
||||||
55
yard-rubygems-17-support.patch
Normal file
55
yard-rubygems-17-support.patch
Normal file
|
|
@ -0,0 +1,55 @@
|
||||||
|
--- Rakefile.orig 2011-07-25 15:55:31.332414239 -0400
|
||||||
|
+++ Rakefile 2011-07-25 15:57:04.953215913 -0400
|
||||||
|
@@ -1,4 +1,5 @@
|
||||||
|
require File.dirname(__FILE__) + '/lib/yard'
|
||||||
|
+require File.dirname(__FILE__) + '/lib/rubygems_plugin'
|
||||||
|
|
||||||
|
WINDOWS = (RUBY_PLATFORM =~ /win32|cygwin/ ? true : false) rescue false
|
||||||
|
SUDO = WINDOWS ? '' : 'sudo'
|
||||||
|
--- lib/rubygems_plugin.rb.orig 2011-08-01 13:23:11.000000000 -0400
|
||||||
|
+++ lib/rubygems_plugin.rb 2011-08-01 13:26:09.000000000 -0400
|
||||||
|
@@ -1,13 +1,10 @@
|
||||||
|
require 'rubygems/specification'
|
||||||
|
+require 'rubygems/user_interaction'
|
||||||
|
require 'rubygems/doc_manager'
|
||||||
|
|
||||||
|
class Gem::Specification
|
||||||
|
- # has_rdoc should not be ignored!
|
||||||
|
- overwrite_accessor(:has_rdoc) { @has_rdoc }
|
||||||
|
- overwrite_accessor(:has_rdoc=) {|v| @has_rdoc = v }
|
||||||
|
-
|
||||||
|
def has_yardoc=(value)
|
||||||
|
- @has_rdoc = 'yard'
|
||||||
|
+ @has_rdoc = value ? 'yard' : false
|
||||||
|
end
|
||||||
|
|
||||||
|
def has_yardoc
|
||||||
|
@@ -20,6 +17,28 @@ class Gem::Specification
|
||||||
|
end
|
||||||
|
|
||||||
|
alias has_yardoc? has_yardoc
|
||||||
|
+
|
||||||
|
+ # has_rdoc should not be ignored!
|
||||||
|
+ if respond_to?(:overwrite_accessor)
|
||||||
|
+ overwrite_accessor(:has_rdoc) { @has_rdoc }
|
||||||
|
+ overwrite_accessor(:has_rdoc=) {|v| @has_rdoc = v }
|
||||||
|
+ else
|
||||||
|
+ attr_accessor :has_rdoc
|
||||||
|
+ end
|
||||||
|
+
|
||||||
|
+ if defined?(Gem::VERSION) && Gem::VERSION =~ /^1\.7\./
|
||||||
|
+ def _dump_with_rdoc(limit)
|
||||||
|
+ dmp = _dump_without_rdoc(limit)
|
||||||
|
+ dmp[15] = @has_rdoc
|
||||||
|
+ dmp
|
||||||
|
+ end
|
||||||
|
+ alias _dump_without_rdoc _dump
|
||||||
|
+ alias _dump _dump_with_rdoc
|
||||||
|
+
|
||||||
|
+ @@default_value[:has_rdoc] = true if defined?(@@default_value)
|
||||||
|
+ @@attributes << 'has_rdoc' if defined?(@@attributes)
|
||||||
|
+ @@non_nil_attributes << 'has_rdoc' if defined?(@@non_nil_attributes)
|
||||||
|
+ end
|
||||||
|
end
|
||||||
|
|
||||||
|
unless defined? Gem::DocManager.load_yardoc
|
||||||
Loading…
Add table
Add a link
Reference in a new issue