Blob Blame Raw
%global gem_name asciidoctor
%global mandir %{_mandir}/man1

Summary: A fast, open source AsciiDoc implementation in Ruby
Name: rubygem-%{gem_name}
Version: 0.1.4
Release: 1%{?dist}
Group: Development/Languages
License: MIT
# Patch0: disable the test for including content from a URI
# since it does not work when the network is unavailable
Patch0: asciidoctor-remove-include-uri-test.patch 
%if 0%{?rhel} > 6 || 0%{?fedora} > 18
Requires: ruby(release)
BuildRequires: ruby(release)
Requires: ruby(abi) = 1.9.1
BuildRequires: ruby(abi) = 1.9.1
Requires: ruby(rubygems)
BuildRequires: rubygems-devel
BuildRequires: ruby(rubygems)
BuildRequires: rubygem(coderay)
BuildRequires: rubygem(erubis)
BuildRequires: rubygem(minitest)
BuildRequires: rubygem(nokogiri)
BuildRequires: rubygem(tilt)
BuildRequires: rubygem(haml)
BuildRequires: rubygem(slim)
BuildArch: noarch
Provides: rubygem(%{gem_name}) = %{version}

A fast, open source text processor and publishing toolchain, written in Ruby,
for transforming AsciiDoc markup into HTML 5, DocBook 4.5, DocBook 5.0 and
custom output formats. The transformation from AsciiDoc to custom output
formats is performed by running the nodes in the parsed document tree through a
collection of templates written in a template language supported by Tilt.

%package doc
Summary: Documentation for %{name}
Group: Documentation
Requires: %{name} = %{version}-%{release}
BuildArch: noarch

%description doc
Documentation for %{name}

gem unpack -V %{SOURCE0}
%setup -q -D -T -n %{gem_name}-%{version}
gem spec %{SOURCE0} -l --ruby > %{gem_name}.gemspec
%patch0 -p1

gem build %{gem_name}.gemspec

LANG=en_US.utf8 testrb -Ilib test/*_test.rb

mkdir -p %{buildroot}%{gem_dir}
cp -pa .%{gem_dir}/* \

mkdir -p %{buildroot}%{_bindir}
cp -pa .%{_bindir}/* \

mkdir -p %{buildroot}%{mandir}
cp -pa .%{gem_instdir}/man/*.1 \

mkdir -p %{buildroot}%{_sysconfdir}/%{gem_name}
cp -pa .%{gem_instdir}/compat/* \

%dir %{gem_instdir}
%exclude %{gem_cache}
%exclude %{gem_instdir}/%{gem_name}.gemspec
%exclude %{gem_instdir}/Gemfile
%exclude %{gem_instdir}/Guardfile
%exclude %{gem_instdir}/Rakefile
%exclude %{gem_instdir}/compat
%exclude %{gem_instdir}/man
%exclude %{gem_instdir}/test

%files doc
%doc %{gem_docdir}

* Sun Sep 22 2013 Dan Allen <> - 0.1.4-1
- Update to Asciidoctor 0.1.4
* Sun Aug 04 2013 Fedora Release Engineering <> - 0.1.3-2
- Rebuilt for
* Sat Jun 08 2013 Dan Allen <> - 0.1.3-1
- Update to Asciidoctor 0.1.3
* Fri Mar 01 2013 Dan Allen <> - 0.1.1-1
- Initial package