git.iko.soy/typeable/pandoc
on 1.9 help sign in
101 lines 3.2 kB history raw
1% Installing pandoc
3These instructions explain how to install pandoc from source.
4Binary packages or ports of pandoc are available for freebsd
5and several linux distributions, so check your package manager.
6There is also a Windows installer.
8Quick install
9-------------
111. Install the [Haskell platform]. This will give you [GHC] and
12the [cabal-install] build tool.
142. Use `cabal` to install pandoc and its dependencies:
16 cabal install pandoc
18 This procedure will install the released version of pandoc,
19 which will be downloaded automatically from HackageDB.
20 If you want to install a modified or development version
21 of pandoc instead, switch to the source directory and do
22 as above, but without the 'pandoc':
24 cabal install
263. Make sure the `$CABALDIR/bin` directory is in your path. You should
27now be able to run `pandoc`:
29 pandoc --help
314. Make sure the `$CABALDIR/share/man/man1` directory is in your `MANPATH`.
32You should now be able to access the `pandoc` man page:
34 man pandoc
36[GHC]: http://www.haskell.org/ghc/
37[Haskell platform]: http://hackage.haskell.org/platform/
38[cabal-install]: http://hackage.haskell.org/trac/hackage/wiki/CabalInstall
40Custom install
41--------------
43This is a step-by-step procedure that offers maximal control
44over the build and installation. Most users should use the
45quick install, but this information may be of use to packagers.
46For more details, see the [Cabal User's Guide].
481. Install dependencies: in addition to the [Haskell platform],
49you will need [zip-archive], [blaze-html], and [highlighting-kate].
512. Configure:
53 runghc Setup.hs configure --prefix=DIR --bindir=DIR --libdir=DIR \
54 --datadir=DIR --libsubdir=DIR --datasubdir=DIR --docdir=DIR \
55 --htmldir=DIR --program-prefix=PREFIX --program-suffix=SUFFIX \
56 --mandir=DIR --flags=FLAGSPEC
58 All of the options have sensible defaults that can be overridden
59 as needed.
61 `FLAGSPEC` is a list of Cabal configuration flags, optionally
62 preceded by a `-` (to force the flag to `false`), and separated
63 by spaces. Pandoc's flags include:
65 - `executable`: build the pandoc executable (default yes)
66 - `library`: build the pandoc library (default yes)
68 So, for example,
70 --flags="-executable"
72 tells Cabal to build the library but not the executables,
73 and to compile with syntax highlighting support.
753. Build:
77 runghc Setup.hs build
794. Build API documentation:
81 runghc Setup.hs haddock --html-location=URL --hyperlink-source
835. Copy the files:
85 runghc Setup.hs copy --destdir=PATH
87 The default destdir is `/`.
896. Register pandoc as a GHC package:
91 runghc Setup.hs register
93 Package managers may want to use the `--gen-script` option to
94 generate a script that can be run to register the package at
95 install time.
97[zip-archive]: http://hackage.haskell.org/package/zip-archive
98[highlighting-kate]: http://hackage.haskell.org/package/highlighting-kate
99[blaze-html]: http://hackage.haskell.org/package/blaze-html
100[Cabal User's Guide]: http://www.haskell.org/cabal/release/latest/doc/users-guide/builders.html#setup-configure-paths