summaryrefslogtreecommitdiffstats
path: root/README.md
blob: 68da1f499237ab7453cfa298caa2b3144c7e2288 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
# Pandoc static packages

This builds a statically-linked standalone pandoc and
pandoc-citeproc binary rpm packages on Enterprise Linux 5
which should work across current Linux platforms.

Note that since the binaries are completely statically-linked
(down to libc) they may need to be rebuilt periodically
for security updates to the linked libraries.

## Download

The binaries can be downloaded from:
http://petersen.fedorapeople.org/pandoc-static/epel-5/
or if you prefer you can add the yum repo
http://petersen.fedorapeople.org/pandoc-static/pandoc-static.repo
to /etc/yum.repos.d/.

## Build requirements

- ghc-7.4 (pandoc-1.12 needs ghc-7.2 or later to build)
- haskell-platform
- cabal-dev
- hsb2hs (to embed data files)
- pcre-devel
- libffi.a

The current packages were built using ghc-7.4.2
and haskell-platform-2012.4.0.0 with cabal-dev-0.9.1
packages in the repo:
http://repos.fedorapeople.org/repos/petersen/ghc-7.4.2/
and additionally hsb2hs-0.1, and a rebuilt libffi-3.0.5
(for libffi.a) are in the
http://petersen.fedorapeople.org/pandoc-static/epel-5/ repo.

The build from a single spec file needs a network
connection to download the Haskell libraries dependencies
otherwise they need to be downloaded in advance using cabal.

## Build steps

Here are the general steps to package the packages on RHEL or Fedora.

### RHEL 5

    $ pushd /etc/yum.repos.d
    $ su
    # wget http://repos.fedorapeople.org/repos/petersen/ghc-7.4.2/epel-ghc-7.4.2.repo
    # wget http://petersen.fedorapeople.org/pandoc-static/pandoc-static.repo
    # popd
    # yum install haskell-platform cabal-dev hsb2hs pcre-devel libffi-devel rpm-build
    # 
    $ cabal update    # skip if you have run recently
    $ rpm -iv pandoc-1.12.3.1-3.src.rpm
    $ rpmbuild -bb ~/rpmbuild/SPECS/pandoc.spec

### Fedora or RHEL >= 6

    $ sudo yum-builddep pandoc.spec
    $ cabal update    # skip if you have run recently
    $ cabal install hsb2hs
    $ rpmbuild -bb pandoc.spec

or in dir with pandoc.spec run

    $ sudo yum install cabal-rpm
    $ cblrpm rpm pandoc