2012-12-19 11:03:43 +00:00
|
|
|
%global gem_name asciidoctor
|
|
|
|
%global rubyabi 1.9.1
|
|
|
|
|
2013-01-19 22:40:50 +00:00
|
|
|
Summary: AsciiDoc implementation in Ruby
|
2012-12-19 11:03:43 +00:00
|
|
|
Name: rubygem-%{gem_name}
|
2013-01-19 22:40:50 +00:00
|
|
|
Version: 0.0.9
|
2012-12-19 11:03:43 +00:00
|
|
|
Release: 1%{?dist}
|
|
|
|
Group: Development/Languages
|
|
|
|
License: MIT
|
|
|
|
URL: http://github.com/erebor/asciidoctor
|
|
|
|
Source0: http://rubygems.org/gems/%{gem_name}-%{version}.gem
|
2013-01-19 22:53:29 +00:00
|
|
|
# Patch0: disables use of pending statement in the test suite The required gem,
|
|
|
|
# pending, is not packaged in Fedora and since the statement is merely a task
|
|
|
|
# note, it's safe to disable it's usage for the purpose of packaging.
|
2013-01-19 22:40:50 +00:00
|
|
|
Patch0: asciidoctor-disable-use-of-pending.patch
|
2012-12-19 11:03:43 +00:00
|
|
|
Requires: ruby(abi) = %{rubyabi}
|
2013-01-19 22:40:50 +00:00
|
|
|
Requires: ruby(rubygems)
|
|
|
|
Requires: ruby
|
2012-12-19 11:03:43 +00:00
|
|
|
BuildRequires: ruby(abi) = %{rubyabi}
|
2013-01-19 22:40:50 +00:00
|
|
|
BuildRequires: rubygems-devel
|
|
|
|
BuildRequires: ruby
|
|
|
|
BuildRequires: rubygem(coderay)
|
|
|
|
BuildRequires: rubygem(erubis)
|
|
|
|
BuildRequires: rubygem(htmlentities)
|
2012-12-19 11:03:43 +00:00
|
|
|
BuildRequires: rubygem(mocha)
|
|
|
|
BuildRequires: rubygem(nokogiri)
|
|
|
|
# using patch to comment lines where pending is used
|
|
|
|
#BuildRequires: rubygem(pending)
|
|
|
|
BuildArch: noarch
|
|
|
|
Provides: rubygem(%{gem_name}) = %{version}
|
|
|
|
|
|
|
|
%description
|
2013-01-19 22:40:50 +00:00
|
|
|
A pure AsciiDoc implementation in Ruby that can parse AsciiDoc files or strings
|
|
|
|
and render them as HTML, DocBook and other output formats using Tilt-supported
|
|
|
|
templates.
|
2012-12-19 11:03:43 +00:00
|
|
|
|
|
|
|
%package doc
|
|
|
|
Summary: Documentation for %{name}
|
|
|
|
Group: Documentation
|
|
|
|
Requires: %{name} = %{version}-%{release}
|
|
|
|
BuildArch: noarch
|
|
|
|
|
|
|
|
%description doc
|
|
|
|
Documentation for %{name}
|
|
|
|
|
|
|
|
%prep
|
2012-12-20 02:26:47 +00:00
|
|
|
gem unpack -V %{SOURCE0}
|
|
|
|
%setup -q -D -T -n %{gem_name}-%{version}
|
|
|
|
%patch0 -p1
|
2012-12-19 11:03:43 +00:00
|
|
|
|
|
|
|
%build
|
2012-12-20 02:26:47 +00:00
|
|
|
rdoc -o rdoc --charset=UTF-8
|
2012-12-19 11:03:43 +00:00
|
|
|
|
|
|
|
%check
|
2012-12-20 02:26:47 +00:00
|
|
|
LANG=en_US.utf8 testrb2 -Ilib test
|
2012-12-19 11:03:43 +00:00
|
|
|
|
|
|
|
%install
|
2012-12-20 02:26:47 +00:00
|
|
|
mkdir -p %{buildroot}%{gem_instdir}
|
|
|
|
cp -a lib \
|
|
|
|
%{buildroot}%{gem_instdir}/
|
2012-12-19 11:03:43 +00:00
|
|
|
|
2012-12-20 02:26:47 +00:00
|
|
|
cp -a {LICENSE,README.asciidoc} \
|
|
|
|
%{buildroot}%{gem_instdir}/
|
2012-12-19 11:03:43 +00:00
|
|
|
|
2012-12-20 02:26:47 +00:00
|
|
|
# Reenable when binary actually functions
|
|
|
|
#mkdir -p %{buildroot}%{_bindir}
|
|
|
|
#cp -a bin/* \
|
|
|
|
# %{buildroot}%{_bindir}/
|
|
|
|
#find %{buildroot}/usr/bin -type f | xargs chmod a+x
|
2012-12-19 11:03:43 +00:00
|
|
|
|
2012-12-20 02:26:47 +00:00
|
|
|
#mkdir -p %{buildroot}%{gem_spec}/..
|
|
|
|
mkdir -p %{buildroot}%{gem_dir}/specifications
|
|
|
|
cp -a *.gemspec %{buildroot}%{gem_spec}
|
|
|
|
|
|
|
|
#mkdir -p %{buildroot}%{gem_cache}/..
|
|
|
|
mkdir -p %{buildroot}%{gem_dir}/cache
|
|
|
|
cp -a %{SOURCE0} %{buildroot}%{gem_cache}
|
|
|
|
|
|
|
|
mkdir -p %{buildroot}%{gem_docdir}/rdoc
|
|
|
|
cp -a rdoc/* \
|
|
|
|
%{buildroot}%{gem_docdir}/rdoc
|
2012-12-19 11:03:43 +00:00
|
|
|
|
|
|
|
%files
|
|
|
|
%dir %{gem_instdir}
|
2013-01-19 22:53:29 +00:00
|
|
|
%exclude %{gem_cache}
|
2012-12-20 02:26:47 +00:00
|
|
|
%{gem_instdir}/LICENSE
|
|
|
|
%{gem_instdir}/README.asciidoc
|
2012-12-19 11:03:43 +00:00
|
|
|
%{gem_libdir}
|
|
|
|
%{gem_spec}
|
2012-12-20 02:26:47 +00:00
|
|
|
# Reenable when binary actually functions
|
|
|
|
#%{_bindir}/asciidoctor
|
|
|
|
#%{gem_instdir}/bin
|
2012-12-19 11:03:43 +00:00
|
|
|
|
|
|
|
%files doc
|
2012-12-20 02:26:47 +00:00
|
|
|
%doc %{gem_docdir}
|
2012-12-19 11:03:43 +00:00
|
|
|
|
|
|
|
%changelog
|
2013-01-19 22:40:50 +00:00
|
|
|
* Wed Jan 20 2013 Dan Allen <dan.j.allen@gmail.com> - 0.0.9-1
|
2012-12-19 11:03:43 +00:00
|
|
|
- Initial package
|