git.iko.soy/typeable/pandoc
on master help sign in
Improved INSTALL instructions.
commitb0143bfad6ebc3b2ae1ced2fb3a9bed989c41000 authorJohn MacFarlane <jgm@berkeley.edu> dateThu 8 Aug 2013, 14:05 (13 years ago) parent2677e84
1 file changed+43−23
INSTALL+43−23
INSTALL+43−23
@@ -9,9 +9,17 @@ Quick install
99-------------
1010
11111. Install the [Haskell platform]. This will give you [GHC] and
12−the [cabal-install] build tool.
12+ the [cabal-install] build tool, as well as `alex` and `happy`.
13+ If you do not use the Haskell platform, you'll need to install
14+ `alex` and `happy` separately:
1315
14−2. Use `cabal` to install pandoc and its dependencies:
16+ cabal install alex happy
17+
18+2. Update your package database:
19+
20+ cabal update
21+
22+3. Use `cabal` to install pandoc and its dependencies:
1523
1624 cabal install pandoc
1725
@@ -23,15 +31,22 @@ the [cabal-install] build tool.
2331
2432 cabal install
2533
26−3. Make sure the `$CABALDIR/bin` directory is in your path. You should
27−now be able to run `pandoc`:
34+ Note: If you obtained the source from the git repository (rather
35+ than a release tarball), you'll need to do
36+
37+ git submodule update --init
38+
39+ to fetch the contents of `data/templates` before `cabal install`.
40+
41+4. Make sure the `$CABALDIR/bin` directory is in your path. You should
42+ now be able to run `pandoc`:
2843
2944 pandoc --help
3045
3146 [Not sure where `$CABALDIR` is?](http://www.haskell.org/haskellwiki/Cabal-Install#The_cabal-install_configuration_file)
3247
33−4. Make sure the `$CABALDIR/share/man/man1` directory is in your `MANPATH`.
34−You should now be able to access the `pandoc` man page:
48+5. Make sure the `$CABALDIR/share/man/man1` directory is in your `MANPATH`.
49+ You should now be able to access the `pandoc` man page:
3550
3651 man pandoc
3752
@@ -45,14 +60,19 @@ Custom install
4560This is a step-by-step procedure that offers maximal control
4661over the build and installation. Most users should use the
4762quick install, but this information may be of use to packagers.
48−For more details, see the [Cabal User's Guide].
63+For more details, see the [Cabal User's Guide]. These instructions
64+assume that the pandoc source directory is your working directory.
4965
50661. Install dependencies: in addition to the [Haskell platform],
51−you will need [zip-archive], [blaze-html], and [highlighting-kate].
67+ you will need a number of additional libraries. You can install
68+ them all with
69+
70+ cabal update
71+ cabal install --only-dependencies
5272
53732. Configure:
5474
55− runghc Setup.hs configure --prefix=DIR --bindir=DIR --libdir=DIR \
75+ cabal configure --prefix=DIR --bindir=DIR --libdir=DIR \
5676 --datadir=DIR --libsubdir=DIR --datasubdir=DIR --docdir=DIR \
5777 --htmldir=DIR --program-prefix=PREFIX --program-suffix=SUFFIX \
5878 --mandir=DIR --flags=FLAGSPEC
@@ -64,26 +84,34 @@ you will need [zip-archive], [blaze-html], and [highlighting-kate].
6484 preceded by a `-` (to force the flag to `false`), and separated
6585 by spaces. Pandoc's flags include:
6686
67− - `blaze_html_0_5`: Use blaze-html >= 0.5 (default yes)
68− - `embed_data_files`: embed all data files into the binary (default no)
87+ - `embed_data_files`: embed all data files into the binary (default no).
88+ This is helpful if you want to create a relocatable binary.
89+ Note: if this option is selected, you need to install the
90+ `hsb2hs` preprocessor:
91+
92+ cabal install hsb2hs
93+
94+ - `http-conduit`: use the `http-conduit` library to fetch external
95+ resources (default yes -- without this, pandoc cannot make SSL
96+ connections)
6997
70983. Build:
7199
72− runghc Setup.hs build
100+ cabal build
73101
741024. Build API documentation:
75103
76− runghc Setup.hs haddock --html-location=URL --hyperlink-source
104+ cabal haddock --html-location=URL --hyperlink-source
77105
781065. Copy the files:
79107
80− runghc Setup.hs copy --destdir=PATH
108+ cabal copy --destdir=PATH
81109
82110 The default destdir is `/`.
83111
841126. Register pandoc as a GHC package:
85113
86− runghc Setup.hs register
114+ cabal register
87115
88116 Package managers may want to use the `--gen-script` option to
89117 generate a script that can be run to register the package at
@@ -109,7 +137,6 @@ you please.
109137[blaze-html]: http://hackage.haskell.org/package/blaze-html
110138[Cabal User's Guide]: http://www.haskell.org/cabal/release/latest/doc/users-guide/builders.html#setup-configure-paths
111139
112−
113140Running tests
114141-------------
115142
@@ -118,13 +145,6 @@ To build the tests:
118145
119146 cabal configure --enable-tests && cabal build
120147
121−Note: If you obtained the source via git, you should first do
122−
123− git submodule update --init data/templates
124−
125−to populate the templates subdirectory. (You can skip this step
126−if you obtained the source from a release tarball.)
127−
128148To run the tests:
129149
130150 cabal test