resolves #4 upgrade package to Asciidoctor 0.1.4
This commit is contained in:
parent
91ccc3c4c7
commit
ceeaf60583
2
.gitignore
vendored
2
.gitignore
vendored
@ -1 +1 @@
|
|||||||
/asciidoctor-0.1.3.gem
|
/asciidoctor-0.1.4.gem
|
||||||
|
55
README.adoc
55
README.adoc
@ -1,9 +1,10 @@
|
|||||||
= rubygem-asciidoctor: Asciidoctor RPM package spec
|
= rubygem-asciidoctor: Asciidoctor RPM package spec
|
||||||
Dan Allen
|
Dan Allen
|
||||||
:idprefix:
|
:idprefix:
|
||||||
|
:idseparator: -
|
||||||
:gem_title: Asciidoctor
|
:gem_title: Asciidoctor
|
||||||
:gem_name: asciidoctor
|
:gem_name: asciidoctor
|
||||||
:gem_version: 0.1.3
|
:gem_version: 0.1.4
|
||||||
:gem_gem: {gem_name}-{gem_version}.gem
|
:gem_gem: {gem_name}-{gem_version}.gem
|
||||||
:gem_url: https://github.com/asciidoctor/asciidoctor
|
:gem_url: https://github.com/asciidoctor/asciidoctor
|
||||||
:rpm_name: rubygem-{gem_name}
|
:rpm_name: rubygem-{gem_name}
|
||||||
@ -11,9 +12,9 @@ Dan Allen
|
|||||||
:rpm_repo: git://github.com/asciidoctor/rubygem-asciidoctor-rpm.git
|
:rpm_repo: git://github.com/asciidoctor/rubygem-asciidoctor-rpm.git
|
||||||
|
|
||||||
This repository is the official host of the build materials to create the Fedora RPM package for the https://github.com/asciidoctor/asciidoctor[Asciidoctor] RubyGem.
|
This repository is the official host of the build materials to create the Fedora RPM package for the https://github.com/asciidoctor/asciidoctor[Asciidoctor] RubyGem.
|
||||||
The package is named +rubygem-asciidoctor+.
|
The RPM package is named +rubygem-asciidoctor+.
|
||||||
|
|
||||||
While this RPM spec was developed specifically for Fedora 17 and above, it may be useful for other RPM-based systems.
|
While this RPM spec was developed specifically for Fedora 18 and above, it may be useful for other RPM-based systems.
|
||||||
|
|
||||||
== Build the Asciidoctor RPM
|
== Build the Asciidoctor RPM
|
||||||
|
|
||||||
@ -51,7 +52,7 @@ You'll also need to create all the required folders:
|
|||||||
|
|
||||||
Next, grab the Asciidoctor gem (the sources) and put it into the +$HOME/rpmbuild/SOURCES+ directory:
|
Next, grab the Asciidoctor gem (the sources) and put it into the +$HOME/rpmbuild/SOURCES+ directory:
|
||||||
|
|
||||||
wget -O $HOME/rpmbuild/SOURCES/asciidoctor-0.1.3.gem http://rubygems.org/gems/asciidoctor-0.1.3.gem
|
wget -O $HOME/rpmbuild/SOURCES/asciidoctor-0.1.4.gem http://rubygems.org/gems/asciidoctor-0.1.4.gem
|
||||||
|
|
||||||
Finally, copy the +.patch+ files from this repository to the same directory:
|
Finally, copy the +.patch+ files from this repository to the same directory:
|
||||||
|
|
||||||
@ -72,7 +73,7 @@ If all goes well, both the binary and source RPMs will emerge in the +$HOME/rpmb
|
|||||||
There's nothing special about installing this RPM.
|
There's nothing special about installing this RPM.
|
||||||
I recommend using +yum+ because it will install any dependencies that the package requires (though you should already have them if you built the RPM).
|
I recommend using +yum+ because it will install any dependencies that the package requires (though you should already have them if you built the RPM).
|
||||||
|
|
||||||
yum localinstall $HOME/rpmbuild/RPMS/noarch/rubygem-asciidoctor-0.1.3.rpm
|
yum localinstall $HOME/rpmbuild/RPMS/noarch/rubygem-asciidoctor-0.1.4.rpm
|
||||||
|
|
||||||
Now, it's time to start using Asciidoctor!
|
Now, it's time to start using Asciidoctor!
|
||||||
|
|
||||||
@ -98,7 +99,7 @@ First, let's test using Asciidoctor as a Ruby library.
|
|||||||
|
|
||||||
require 'asciidoctor'
|
require 'asciidoctor'
|
||||||
content = "= My First Document\n\nRender me some **HTML**!"
|
content = "= My First Document\n\nRender me some **HTML**!"
|
||||||
puts Asciidoctor.render(content, :header_footer => true, :compact => true)
|
puts Asciidoctor.render content, :header_footer => true
|
||||||
|
|
||||||
. Save the file.
|
. Save the file.
|
||||||
. In a terminal, navigate to the directory where you saved +asciidoctor-test.rb+ and type the following command to execute the file with Ruby:
|
. In a terminal, navigate to the directory where you saved +asciidoctor-test.rb+ and type the following command to execute the file with Ruby:
|
||||||
@ -109,30 +110,32 @@ You should see this output in your terminal.
|
|||||||
|
|
||||||
<!DOCTYPE html>
|
<!DOCTYPE html>
|
||||||
<html lang="en">
|
<html lang="en">
|
||||||
<head>
|
<head>
|
||||||
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
|
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
|
||||||
<meta name="generator" content="Asciidoctor 0.1.3">
|
<meta name="generator" content="Asciidoctor 0.1.4">
|
||||||
<title>My First Document</title>
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||||
</head>
|
<title>My First Document</title>
|
||||||
<body class="article">
|
<link rel="stylesheet" href="./asciidoctor.css">
|
||||||
<div id="header">
|
</head>
|
||||||
<h1>My First Document</h1>
|
<body class="article">
|
||||||
</div>
|
<div id="header">
|
||||||
<div id="content">
|
<h1>My First Document</h1>
|
||||||
|
</div>
|
||||||
|
<div id="content">
|
||||||
<div id="preamble">
|
<div id="preamble">
|
||||||
<div class="sectionbody">
|
<div class="sectionbody">
|
||||||
<div class="paragraph">
|
<div class="paragraph">
|
||||||
<p>Render me some <strong>HTML</strong>!</p>
|
<p>Render me some <strong>HTML</strong>!</p>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div id="footer">
|
</div>
|
||||||
<div id="footer-text">
|
<div id="footer">
|
||||||
Last updated 2013-03-12 10:43:15 MDT
|
<div id="footer-text">
|
||||||
</div>
|
Last updated 2013-09-22 17:35:41 MDT
|
||||||
</div>
|
</div>
|
||||||
</body>
|
</div>
|
||||||
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
|
||||||
. You can render the output as HTML using:
|
. You can render the output as HTML using:
|
||||||
|
@ -1,16 +0,0 @@
|
|||||||
# 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.
|
|
||||||
diff --git a/test/test_helper.rb b/test/test_helper.rb
|
|
||||||
index 3b27218..964ff59 100644
|
|
||||||
--- a/test/test_helper.rb
|
|
||||||
+++ b/test/test_helper.rb
|
|
||||||
@@ -5,7 +5,7 @@ require 'test/unit'
|
|
||||||
require "#{File.expand_path(File.dirname(__FILE__))}/../lib/asciidoctor.rb"
|
|
||||||
|
|
||||||
require 'nokogiri'
|
|
||||||
-require 'pending'
|
|
||||||
+#require 'pending'
|
|
||||||
|
|
||||||
ENV['SUPPRESS_DEBUG'] ||= 'true'
|
|
||||||
|
|
@ -1,18 +1,14 @@
|
|||||||
%global gem_name asciidoctor
|
%global gem_name asciidoctor
|
||||||
%global mandir %{_mandir}/man1
|
%global mandir %{_mandir}/man1
|
||||||
|
|
||||||
Summary: AsciiDoc implementation in Ruby
|
Summary: A fast, open source AsciiDoc implementation in Ruby
|
||||||
Name: rubygem-%{gem_name}
|
Name: rubygem-%{gem_name}
|
||||||
Version: 0.1.3
|
Version: 0.1.4
|
||||||
Release: 2%{?dist}
|
Release: 1%{?dist}
|
||||||
Group: Development/Languages
|
Group: Development/Languages
|
||||||
License: MIT
|
License: MIT
|
||||||
URL: http://github.com/asciidoctor/asciidoctor
|
URL: http://github.com/asciidoctor/asciidoctor
|
||||||
Source0: http://rubygems.org/gems/%{gem_name}-%{version}.gem
|
Source0: http://rubygems.org/gems/%{gem_name}-%{version}.gem
|
||||||
# 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.
|
|
||||||
Patch0: asciidoctor-disable-use-of-pending.patch
|
|
||||||
%if 0%{?rhel} > 6 || 0%{?fedora} > 18
|
%if 0%{?rhel} > 6 || 0%{?fedora} > 18
|
||||||
Requires: ruby(release)
|
Requires: ruby(release)
|
||||||
BuildRequires: ruby(release)
|
BuildRequires: ruby(release)
|
||||||
@ -27,14 +23,18 @@ BuildRequires: rubygem(coderay)
|
|||||||
BuildRequires: rubygem(erubis)
|
BuildRequires: rubygem(erubis)
|
||||||
BuildRequires: rubygem(minitest)
|
BuildRequires: rubygem(minitest)
|
||||||
BuildRequires: rubygem(nokogiri)
|
BuildRequires: rubygem(nokogiri)
|
||||||
|
BuildRequires: rubygem(tilt)
|
||||||
|
BuildRequires: rubygem(haml)
|
||||||
|
BuildRequires: rubygem(slim)
|
||||||
BuildArch: noarch
|
BuildArch: noarch
|
||||||
Provides: rubygem(%{gem_name}) = %{version}
|
Provides: rubygem(%{gem_name}) = %{version}
|
||||||
|
|
||||||
%description
|
%description
|
||||||
An open source text processor and publishing toolchain written in Ruby for
|
A fast, open source text processor and publishing toolchain, written in Ruby,
|
||||||
converting AsciiDoc markup into HTML 5, DocBook 4.5 and custom formats. Export
|
for transforming AsciiDoc markup into HTML 5, DocBook 4.5, DocBook 5.0 and
|
||||||
to custom formats is performed by running the nodes of the parsed tree through
|
custom output formats. The transformation from AsciiDoc to custom output
|
||||||
a collection of Tilt-supported templates.
|
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
|
%package doc
|
||||||
Summary: Documentation for %{name}
|
Summary: Documentation for %{name}
|
||||||
@ -49,7 +49,6 @@ Documentation for %{name}
|
|||||||
gem unpack -V %{SOURCE0}
|
gem unpack -V %{SOURCE0}
|
||||||
%setup -q -D -T -n %{gem_name}-%{version}
|
%setup -q -D -T -n %{gem_name}-%{version}
|
||||||
gem spec %{SOURCE0} -l --ruby > %{gem_name}.gemspec
|
gem spec %{SOURCE0} -l --ruby > %{gem_name}.gemspec
|
||||||
%patch0 -p1
|
|
||||||
|
|
||||||
%build
|
%build
|
||||||
gem build %{gem_name}.gemspec
|
gem build %{gem_name}.gemspec
|
||||||
@ -85,6 +84,7 @@ cp -pa .%{gem_instdir}/compat/* \
|
|||||||
%exclude %{gem_instdir}/compat
|
%exclude %{gem_instdir}/compat
|
||||||
%exclude %{gem_instdir}/man
|
%exclude %{gem_instdir}/man
|
||||||
%exclude %{gem_instdir}/test
|
%exclude %{gem_instdir}/test
|
||||||
|
%{gem_instdir}/CHANGELOG.adoc
|
||||||
%{gem_instdir}/LICENSE
|
%{gem_instdir}/LICENSE
|
||||||
%{gem_instdir}/README.*
|
%{gem_instdir}/README.*
|
||||||
%{_bindir}/*
|
%{_bindir}/*
|
||||||
@ -98,9 +98,10 @@ cp -pa .%{gem_instdir}/compat/* \
|
|||||||
%doc %{gem_docdir}
|
%doc %{gem_docdir}
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Sun Sep 22 2013 Dan Allen <dan.j.allen@gmail.com> - 0.1.4-1
|
||||||
|
- Update to Asciidoctor 0.1.4
|
||||||
* Sun Aug 04 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.1.3-2
|
* Sun Aug 04 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.1.3-2
|
||||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild
|
||||||
|
|
||||||
* Sat Jun 08 2013 Dan Allen <dan.j.allen@gmail.com> - 0.1.3-1
|
* Sat Jun 08 2013 Dan Allen <dan.j.allen@gmail.com> - 0.1.3-1
|
||||||
- Update to Asciidoctor 0.1.3
|
- Update to Asciidoctor 0.1.3
|
||||||
* Fri Mar 01 2013 Dan Allen <dan.j.allen@gmail.com> - 0.1.1-1
|
* Fri Mar 01 2013 Dan Allen <dan.j.allen@gmail.com> - 0.1.1-1
|
||||||
|
2
sources
2
sources
@ -1 +1 @@
|
|||||||
e64350b7d08006984fa99be6cb3aa808 asciidoctor-0.1.3.gem
|
1ec84e6ad442791f1ef9300026927ba1 asciidoctor-0.1.4.gem
|
||||||
|
Binary file not shown.
BIN
srpms/rubygem-asciidoctor-0.1.4-1.fc19.src.rpm
Normal file
BIN
srpms/rubygem-asciidoctor-0.1.4-1.fc19.src.rpm
Normal file
Binary file not shown.
10
test-install
10
test-install
@ -6,10 +6,14 @@ require 'asciidoctor'
|
|||||||
|
|
||||||
source = <<EOS
|
source = <<EOS
|
||||||
= Asciidoctor
|
= Asciidoctor
|
||||||
Author Name
|
Author Name <author@example.com>
|
||||||
|
|
||||||
http://asciidoctor.org[Asciidoctor] is an _open source_ implementation of
|
http://asciidoctor.org[Asciidoctor] is an _open source_ implementation of
|
||||||
http://asciidoc.org[AsciiDoc] in [red]*Ruby*.
|
http://asciidoc.org[AsciiDoc] in [.red]*Ruby*.
|
||||||
|
|
||||||
|
== Sample section
|
||||||
|
|
||||||
|
Sample section content
|
||||||
EOS
|
EOS
|
||||||
|
|
||||||
puts Asciidoctor.render(source, :backend => :html5, :header_footer => true, :compact => true, :safe => :safe, :attributes => 'linkcss!')
|
puts Asciidoctor.render(source, :backend => :html5, :header_footer => true, :safe => :safe, :attributes => 'idprefix= idseparator=-')
|
||||||
|
Loading…
Reference in New Issue
Block a user