102 lines
2.7 KiB
RPMSpec
102 lines
2.7 KiB
RPMSpec
%define gemdir %(ruby -rubygems -e 'puts Gem::dir' 2>/dev/null)
|
|
%define gemname yard
|
|
%define geminstdir %{gemdir}/gems/%{gemname}-%{version}
|
|
|
|
%define rubyabi 1.8
|
|
|
|
Name: rubygem-%{gemname}
|
|
Summary: Documentation tool for consistent and usable documentation in Ruby
|
|
Version: 0.5.3
|
|
Release: 4%{?dist}
|
|
Group: Development/Languages
|
|
License: MIT and (GPLv2 or Ruby)
|
|
URL: http://yardoc.org
|
|
|
|
Source0: http://gemcutter.org/downloads/%{gemname}-%{version}.gem
|
|
|
|
# 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: ruby(abi) = %{rubyabi}
|
|
BuildRequires: rubygems
|
|
BuildRequires: rubygem(rake)
|
|
BuildRequires: rubygem(rspec)
|
|
BuildRequires: rubygem(RedCloth)
|
|
BuildArch: noarch
|
|
Provides: rubygem(%{gemname}) = %{version}
|
|
|
|
%description
|
|
YARD is a documentation generation tool for the Ruby programming language.
|
|
It enables the user to generate consistent, usable documentation that can be
|
|
exported to a number of formats very easily, and also supports extending for
|
|
custom Ruby constructs such as custom class level definitions.
|
|
|
|
|
|
%prep
|
|
%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
|
|
|
|
%install
|
|
mkdir -p %{buildroot}%{gemdir}
|
|
mv .%{gemdir}/* %{buildroot}%{gemdir}
|
|
|
|
mkdir -p %{buildroot}/%{_bindir}
|
|
mv %{buildroot}%{gemdir}/bin/* %{buildroot}/%{_bindir}
|
|
rmdir %{buildroot}%{gemdir}/bin
|
|
find %{buildroot}%{geminstdir}/bin -type f | xargs chmod a+x
|
|
|
|
%check
|
|
pushd %{buildroot}%{geminstdir}
|
|
rake spec
|
|
|
|
%files
|
|
%{_bindir}/yardoc
|
|
%{_bindir}/yri
|
|
%{_bindir}/yard-graph
|
|
%dir %{geminstdir}
|
|
%{geminstdir}/bin
|
|
%{geminstdir}/lib
|
|
%{geminstdir}/templates
|
|
%{geminstdir}/.yardopts
|
|
%{geminstdir}/.yardoc
|
|
|
|
%{gemdir}/cache/%{gemname}-%{version}.gem
|
|
%{gemdir}/specifications/%{gemname}-%{version}.gemspec
|
|
|
|
%doc %{geminstdir}/LICENSE
|
|
%doc %{geminstdir}/README.md
|
|
%doc %{geminstdir}/Rakefile
|
|
%doc %{geminstdir}/ChangeLog
|
|
%doc %{geminstdir}/benchmarks
|
|
%doc %{geminstdir}/spec
|
|
%doc %{geminstdir}/docs
|
|
|
|
|
|
%changelog
|
|
* Mon Jul 25 2011 Mo Morsi <mmorsi@redhat.com> - 0.5.3-4
|
|
- 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
|
|
- fixed dependencies/package issues according to guidelines
|
|
|
|
* Mon Feb 08 2010 Mohammed Morsi <mmorsi@redhat.com> - 0.5.3-2
|
|
- cleaned up macros, other package guideline compliance fixes
|
|
- corrected license, added MIT
|
|
- include all files and docs, added check/test section
|
|
|
|
* Mon Feb 08 2010 Mohammed Morsi <mmorsi@redhat.com> - 0.5.3-1
|
|
- Initial package
|
|
|