8b6b5d
%global gem_name asciidoctor
c04947
%global mandir %{_mandir}/man1
8b6b5d
aa6ac2
%define pre %nil
cbd79b
ceeaf6
Summary: A fast, open source AsciiDoc implementation in Ruby
8b6b5d
Name: rubygem-%{gem_name}
bb913a
Version: 1.5.1
aa6ac2
Release: 1%{?dist}
8b6b5d
Group: Development/Languages
8b6b5d
License: MIT
cbd79b
URL: https://github.com/asciidoctor/asciidoctor
cbd79b
Source0: https://rubygems.org/gems/%{gem_name}-%{version}%{pre}.gem
cbd79b
%if 0%{?fc19} || 0%{?fc20} || 0%{?el7}
94e044
Requires: ruby(release)
558b60
BuildRequires: ruby(release)
558b60
%endif
cbd79b
%if 0%{?el6}
5ac83d
Requires: ruby(rubygems)
cbd79b
Requires: ruby(abi) = 1.8
cbd79b
BuildRequires: ruby(abi) = 1.8
cbd79b
%endif
5ac83d
BuildRequires: rubygems-devel
3ea83d
BuildRequires: ruby(rubygems)
5ac83d
BuildRequires: rubygem(coderay)
5ac83d
BuildRequires: rubygem(erubis)
cbd79b
BuildRequires: rubygem(minitest)
8b6b5d
BuildRequires: rubygem(nokogiri)
ceeaf6
BuildRequires: rubygem(tilt)
ceeaf6
BuildRequires: rubygem(haml)
ceeaf6
BuildRequires: rubygem(slim)
8b6b5d
BuildArch: noarch
ffc7e9
Provides: asciidoctor = %{version}
cbd79b
%if 0%{?fc19} || 0%{?fc20} || 0%{?el6} || 0%{?el7}
8b6b5d
Provides: rubygem(%{gem_name}) = %{version}
cbd79b
%endif
cbd79b
cbd79b
%if %{?pre:1}
cbd79b
%global gem_instdir %{gem_dir}/gems/%{gem_name}-%{version}%{pre}
cbd79b
%global gem_cache   %{gem_dir}/cache/%{gem_name}-%{version}%{pre}.gem
cbd79b
%global gem_spec    %{gem_dir}/specifications/%{gem_name}-%{version}%{pre}.gemspec
cbd79b
%global gem_docdir  %{gem_dir}/doc/%{gem_name}-%{version}%{pre}
cbd79b
%endif
8b6b5d
8b6b5d
%description
ceeaf6
A fast, open source text processor and publishing toolchain, written in Ruby,
ceeaf6
for transforming AsciiDoc markup into HTML 5, DocBook 4.5, DocBook 5.0 and
ceeaf6
custom output formats. The transformation from AsciiDoc to custom output
ceeaf6
formats is performed by running the nodes in the parsed document tree through a
ceeaf6
collection of templates written in a template language supported by Tilt.
8b6b5d
8b6b5d
%package doc
8b6b5d
Summary: Documentation for %{name}
8b6b5d
Group: Documentation
8b6b5d
Requires: %{name} = %{version}-%{release}
8b6b5d
BuildArch: noarch
8b6b5d
8b6b5d
%description doc
8b6b5d
Documentation for %{name}
8b6b5d
8b6b5d
%prep
721716
gem unpack -V %{SOURCE0}
cbd79b
%setup -q -D -T -n %{gem_name}-%{version}%{pre}
8d3ce3
gem spec %{SOURCE0} -l --ruby > %{gem_name}.gemspec
cbd79b
cbd79b
# Fix shebang (avoid Requires: /usr/bin/env)
cbd79b
sed -i -e 's|#!/usr/bin/env ruby|#!/usr/bin/ruby|' \
cbd79b
  bin/%{gem_name} bin/%{gem_name}-safe
cbd79b
cbd79b
# Clean up development-only file
cbd79b
rm Rakefile
cbd79b
sed -i "s|\"Rakefile\",||g" %{gem_name}.gemspec
8b6b5d
8b6b5d
%build
8d3ce3
gem build %{gem_name}.gemspec
cbd79b
%gem_install -n %{gem_name}-%{version}%{pre}.gem
8b6b5d
8b6b5d
%check
cbd79b
LANG=en_US.utf8 ruby -I"lib:test" test/*_test.rb
8b6b5d
8b6b5d
%install
c04947
mkdir -p %{buildroot}%{gem_dir}
c04947
cp -pa .%{gem_dir}/* \
c04947
        %{buildroot}%{gem_dir}/
721716
4464fc
mkdir -p %{buildroot}%{_bindir}
c04947
cp -pa .%{_bindir}/* \
c04947
        %{buildroot}%{_bindir}/
c04947
c04947
mkdir -p %{buildroot}%{mandir}
c04947
cp -pa .%{gem_instdir}/man/*.1 \
c04947
        %{buildroot}%{mandir}/
8b6b5d
Dan Allen 987075
mkdir -p %{buildroot}%{_sysconfdir}/%{gem_name}
Dan Allen 987075
cp -pa .%{gem_instdir}/compat/* \
Dan Allen 987075
        %{buildroot}%{_sysconfdir}/%{gem_name}/
Dan Allen 987075
8b6b5d
%files
8b6b5d
%dir %{gem_instdir}
c04947
%exclude %{gem_cache}
aa6ac2
%exclude %{gem_instdir}/benchmark
Dan Allen 987075
%exclude %{gem_instdir}/compat
c04947
%exclude %{gem_instdir}/man
Dan Allen 987075
%exclude %{gem_instdir}/test
cbd79b
%exclude %{gem_instdir}/features
cbd79b
%doc %{gem_instdir}/CHANGELOG.adoc
aa6ac2
%doc %{gem_instdir}/LICENSE.adoc
cbd79b
%doc %{gem_instdir}/README.*
cbd79b
%{gem_instdir}/data
c04947
%{_bindir}/*
c04947
%{gem_instdir}/bin
8b6b5d
%{gem_libdir}
c04947
%{mandir}/*
Dan Allen 987075
%{_sysconfdir}/%{gem_name}/*
8b6b5d
%{gem_spec}
8b6b5d
8b6b5d
%files doc
721716
%doc %{gem_docdir}
8b6b5d
8b6b5d
%changelog
bb913a
* Fri Sep 19 2014 Ken Dreyer <ktdreyer@ktdreyer.com> - 1.5.1-1
bb913a
- Update to Asciidoctor 1.5.1
bb913a
aa6ac2
* Tue Sep 09 2014 Ken Dreyer <ktdreyer@ktdreyer.com> - 1.5.0-1
79e247
- Update to Asciidoctor 1.5.0 final
aa6ac2
ffc7e9
* Fri Jun 06 2014 Ken Dreyer <ktdreyer@ktdreyer.com> - 1.5.0-0.4.preview.7
ffc7e9
- Add %%{version} number to Provides: asciidoctor
ffc7e9
11883b
* Fri Jun 06 2014 Ken Dreyer <ktdreyer@ktdreyer.com> - 1.5.0-0.3.preview.7
11883b
- Provide: asciidoctor
11883b
  https://github.com/asciidoctor/rubygem-asciidoctor-rpm/issues/5
11883b
5dbaa5
* Tue May 20 2014 Ken Dreyer <ktdreyer@ktdreyer.com> - 1.5.0-0.2.preview.7
5dbaa5
- Update to Asciidoctor 0.1.5.preview.7
5dbaa5
- Drop unused patch
5dbaa5
cbd79b
* Thu May 15 2014 Ken Dreyer <ktdreyer@ktdreyer.com> - 1.5.0-0.1.preview.6
cbd79b
- Update to Asciidoctor 0.1.5.preview.6
cbd79b
- Use HTTPS URLs
cbd79b
- Support Minitest 5
cbd79b
- Adjustments for https://fedoraproject.org/wiki/Changes/Ruby_2.1
cbd79b
- Mark CHANGELOG, LICENSE, READMEs as %%doc
cbd79b
- Remove Rakefile in %%prep
cbd79b
- Remove Requires: /usr/bin/env
cbd79b
ceeaf6
* Sun Sep 22 2013 Dan Allen <dan.j.allen@gmail.com> - 0.1.4-1
ceeaf6
- Update to Asciidoctor 0.1.4
bfa997
91ccc3
* Sun Aug 04 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.1.3-2
91ccc3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild
bfa997
Dan Allen 987075
* Sat Jun 08 2013 Dan Allen <dan.j.allen@gmail.com> - 0.1.3-1
Dan Allen 987075
- Update to Asciidoctor 0.1.3
bfa997
39eeeb
* Fri Mar 01 2013 Dan Allen <dan.j.allen@gmail.com> - 0.1.1-1
8b6b5d
- Initial package