source: rtems-source-builder/source-builder/sb/asciidoc/INSTALL.txt @ 0464153

4.104.114.95
Last change on this file since 0464153 was 0464153, checked in by Chris Johns <chrisj@…>, on 03/03/13 at 04:58:11

Change asciidoc to the 8.6.4 release package because Windows was broken.

  • Property mode set to 100644
File size: 7.5 KB
Line 
1AsciiDoc Installation
2=====================
3
4NOTE: The current version of AsciiDoc requires *Python 2.4 or newer*
5to run.  If you don't already have an up-to-date version of Python
6installed it can be downloaded from the official Python website
7http://www.python.org/.
8
9
10Prerequisites
11-------------
12See the link:README.html[README] page.
13
14
15Installing from the Mercurial repository
16----------------------------------------
17The AsciiDoc http://www.selenic.com/mercurial/[Mercurial] repository
18is hosted by http://code.google.com/[Google Code].
19To browse the repository go to
20http://code.google.com/p/asciidoc/source/browse/.
21You can install AsciiDoc from the repository if you don't have an up to
22date packaged version or want to get the latest version from the trunk:
23
24- Make sure you have http://www.selenic.com/mercurial/[Mercurial]
25  installed, you can check with:
26
27  $ hg --version
28
29- Go to the directory you want to install AsciiDoc into and download
30  the repository.  This example gets the {revnumber} tagged release:
31
32[subs="attributes"]
33  $ cd ~/bin
34  $ hg clone -r {revnumber} https://asciidoc.googlecode.com/hg/ asciidoc-{revnumber}
35
36You now have two choices: you can run asciidoc locally from your
37repository or you can use 'autoconf(1)' and 'make(1)' to perform a
38system-wide install.
39
40Running asciidoc from your local copy
41~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
42Create a symlink to the AsciiDoc script in a search `PATH` directory
43so it's easy to execute `asciidoc` from the command-line, for example:
44
45[subs="attributes"]
46  $ ln -s ~/bin/asciidoc-{revnumber}/asciidoc.py ~/bin/asciidoc
47  $ ln -s ~/bin/asciidoc-{revnumber}/a2x.py ~/bin/a2x
48
49Use the Mercurial `pull` command to update your local AsciiDoc repository.
50
51Installing asciidoc for all users
52~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
53Create `configure` using 'autoconf(1)'; use `configure` to create the
54`Makefile`; run 'make(1)'; build the man pages; install:
55
56---------------------------------------------
57$ autoconf
58$ ./configure
59$ make
60$ sudo make install
61---------------------------------------------
62
63To uninstall:
64
65---------------------------------------------
66$ sudo make uninstall
67---------------------------------------------
68
69
70[[X1]]
71Distribution tarball installation
72---------------------------------
73The distribution source tarballs can be downloaded from the
74SourceForge http://sourceforge.net/projects/asciidoc/.
75
76NOTE: Unless you are <<X3,installing on Microsoft Windows>> you should
77use the tarball and not the zip file to install the the distribution
78(the tarball contains symlinks).
79
80If your flavor or UNIX or Linux does not have a packaged AsciiDoc
81distribution or if you prefer to install the latest AsciiDoc version
82from source use the `configure` shell script in the tarball root
83directory.
84
85The `autoconf(1)` generated `configure` script creates a make file
86that is tailored for your system. To install:
87
88[subs="attributes"]
89  $ tar -xzf asciidoc-{revnumber}.tar.gz
90  $ cd asciidoc-{revnumber}
91  $ ./configure
92  $ sudo make install
93
94To install the documentation:
95
96  $ sudo make docs
97
98To uninstall AsciiDoc:
99
100  $ sudo make uninstall
101
102If Vim is installed on your system the AsciiDoc Vim syntax highlighter
103and filetype detection scripts will be install in the global Vim
104configuration file directory (`asciidoc.vim` in the `syntax` directory
105and `asciidoc_filetype.vim` in the `ftdetect` directory).
106
107
108[[X3]]
109Microsoft Windows installation
110------------------------------
111AsciiDoc is developed and tested on Linux but there seem to be quite a
112few people using it on Windows.  To install AsciiDoc on Windows unzip
113the distribution Zip file contents:
114
115[subs="attributes"]
116  $ unzip asciidoc-{revnumber}.zip
117
118This will create the folder +asciidoc-{revnumber}+ containing the
119`asciidoc.py` and `a2x.py` executables along with configuration files
120and documentation.
121
122To generate DocBook based outputs (e.g. PDFs) you will also need a
123working DocBook toolchain. Installing and configuring a DocBook
124toolchain on Windows can be a challenge -- this blog post explains
125http://blog.rainwebs.net/2010/02/25/how-to-create-handsome-pdf-documents-without-frustration/[How
126to Create Handsome PDF Documents Without Frustration] using
127http://www.cygwin.com/[Cygwin],
128http://dblatex.sourceforge.net/[dblatex] and AsciiDoc.
129
130
131Testing your installation
132-------------------------
133Test out asciidoc by changing to the AsciiDoc application directory
134and convert the User Guide document (`./doc/asciidoc.txt`) to XHTML
135(`./doc/asciidoc.html`):
136
137  $ python asciidoc.py doc/asciidoc.txt
138
139link:testasciidoc.html[testasciidoc] offers a more extensive set of
140conformance tests, though you do need to create the test data before
141running the tests (this in itself is a good post-install test):
142
143  $ python ./tests/testasciidoc.py update
144
145Now you can run the tests by executing this command:
146
147  $ python ./tests/testasciidoc.py run
148
149A full battery of tests can be run from the `main.aap` script in the
150distribution root directory:
151
152  $ aap test
153
154
155Building the distribution
156-------------------------
157The AsciiDoc distribution is built using http://www.a-a-p.org/[A-A-P]
158(a software build system written by Bram Moolenaar). The AsciiDoc
159A-A-P scripts are:
160
161`./main.aap`:: Builds the distribution tarball and zip files,
162documentation and example website.
163`./doc/main.aap`:: Builds distribution documentation.
164`./examples/website/main.aap`:: Builds AsciiDoc website.
165`./common.aap`:: Included in all scripts.
166
167To build the distribution tarball and zip files, documentation and
168example website run A-A-P from the distribution root directory:
169
170  $ aap
171
172
173[[X2]]
174Prepackaged AsciiDoc installation
175---------------------------------
176The following platform specific AsciiDoc packages are available:
177
178*Debian GNU/Linux*::
179  If you use Debian or a Debian based distribution there's an
180  http://packages.debian.org/asciidoc[AsciiDoc Debian package]
181  available.  Thanks to mailto:stone@debian.org[Fredrik Steen] who
182  built and maintains the Debian AsciiDoc package.
183
184*Gentoo Linux*::
185  If you use Gentoo Linux there's a
186  http://packages.gentoo.org/package/app-text/asciidoc[Gentoo AsciiDoc
187  package] available. Thanks to mailto:brandon@ifup.org[Brandon
188  Philips] for writing the ebuild.
189
190*Fedora Linux*::
191  With help from Terje RÞsten, Chris Wright added asciidoc to Fedora
192  Extras which is available in the default installation. To install
193  asciidoc execute the following command:
194
195  $ yum install asciidoc
196
197*Slackware Linux*::
198  John Calixto has created a Slackware package for AsciiDoc which can
199  be downloaded from http://linuxpackages.net/.
200
201*Ark Linux*::
202  mailto:bero@arklinux.org[Bernhard Rosenkraenzer] added AsciiDoc to
203  Ark Linux -- the package is available from the Ark Linux repository
204  at http://arklinux.osuosl.org/dockyard-devel/, so Ark Linux users
205  should just run `apt-get install asciidoc`.
206
207*T2 Linux*::
208  mailto:cw@ixplanet.de[Christian Wiese] added AsciiDoc to the
209  http://www.t2-project.org/[T2 Linux] repository at
210  http://svn.exactcode.de/t2/trunk/package/textproc/asciidoc/. To
211  build and install the package on a T2 system, run
212  `./scripts/Emerge-Pkg asciidoc` from within your T2 source directory
213  (default: `/usr/src/t2-src`).
214
215*Red Hat Enterprise Linux, Fedora and CentOS packages*::
216  Dag Wieers has built AsciiDoc RPMs for a number of Red Hat based
217  distributions, they can be downloaded from
218  http://dag.wieers.com/rpm/packages/asciidoc/.
219
220*CSW Package for Sun Solaris*::
221  Ben Walton has created a CSW package for AsciiDoc, you can find it
222  here: http://opencsw.org/packages/asciidoc.
223
224See also link:userguide.html#X38[Packager Notes] in the 'AsciiDoc User
225Guide'.
226
227
Note: See TracBrowser for help on using the repository browser.