rubygem-asciidoctor/rubygem-asciidoctor.spec

105 lines
2.6 KiB
RPMSpec
Raw Normal View History

2012-12-19 11:03:43 +00:00
%global gem_name asciidoctor
%global mandir %{_mandir}/man1
2012-12-19 11:03:43 +00:00
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-03-01 15:24:19 +00:00
Version: 0.1.1
2012-12-19 11:03:43 +00:00
Release: 1%{?dist}
Group: Development/Languages
License: MIT
2013-01-31 00:23:10 +00:00
URL: http://github.com/asciidoctor/asciidoctor
2012-12-19 11:03:43 +00:00
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
# Patch1: works around nth-child selector bug in Nokogiri
Patch1: asciidoctor-fix-nth-child-selectors.patch
Requires: ruby(release)
2013-01-19 22:40:50 +00:00
Requires: ruby(rubygems)
BuildRequires: rubygems-devel
2013-03-01 17:52:37 +00:00
BuildRequires: ruby(rubygems)
2013-01-19 22:40:50 +00:00
BuildRequires: rubygem(coderay)
BuildRequires: rubygem(erubis)
BuildRequires: rubygem(htmlentities)
2012-12-19 11:03:43 +00:00
BuildRequires: rubygem(mocha)
BuildRequires: rubygem(minitest)
2012-12-19 11:03:43 +00:00
BuildRequires: rubygem(nokogiri)
# using patch to comment lines where pending is used
#BuildRequires: rubygem(pending)
BuildArch: noarch
Provides: rubygem(%{gem_name}) = %{version}
%description
A pure AsciiDoc implementation in Ruby for parsing AsciiDoc source files and
strings and then rendering them as HTML, DocBook or other formats using the
built-in ERB templates or a set of custom Tilt-supported template files.
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
gem unpack -V %{SOURCE0}
%setup -q -D -T -n %{gem_name}-%{version}
gem spec %{SOURCE0} -l --ruby > %{gem_name}.gemspec
%patch0 -p1
%patch1 -p1
2012-12-19 11:03:43 +00:00
%build
mkdir -p .%{gem_dir}
gem build %{gem_name}.gemspec
gem install -V \
--local \
--install-dir .%{gem_dir} \
--bindir .%{_bindir} \
--force \
--rdoc \
%{gem_name}-%{version}.gem
2012-12-19 11:03:43 +00:00
%check
LANG=en_US.utf8 testrb -Ilib test/*_test.rb
2012-12-19 11:03:43 +00:00
%install
mkdir -p %{buildroot}%{gem_dir}
cp -pa .%{gem_dir}/* \
%{buildroot}%{gem_dir}/
2013-01-20 06:09:21 +00:00
mkdir -p %{buildroot}%{_bindir}
cp -pa .%{_bindir}/* \
%{buildroot}%{_bindir}/
mkdir -p %{buildroot}%{mandir}
cp -pa .%{gem_instdir}/man/*.1 \
%{buildroot}%{mandir}/
2012-12-19 11:03:43 +00:00
%files
%dir %{gem_instdir}
%exclude %{gem_cache}
%exclude %{gem_instdir}/%{gem_name}.gemspec
%exclude %{gem_instdir}/Gemfile
%exclude %{gem_instdir}/Rakefile
%exclude %{gem_instdir}/test
%exclude %{gem_instdir}/man
%{gem_instdir}/LICENSE
%{gem_instdir}/README.*
%{_bindir}/*
%{gem_instdir}/bin
2012-12-19 11:03:43 +00:00
%{gem_libdir}
%{mandir}/*
2012-12-19 11:03:43 +00:00
%{gem_spec}
%files doc
%doc %{gem_docdir}
2012-12-19 11:03:43 +00:00
%changelog
2013-03-01 15:24:19 +00:00
* Fri Mar 01 2013 Dan Allen <dan.j.allen@gmail.com> - 0.1.1-1
2012-12-19 11:03:43 +00:00
- Initial package