@@ -13,49 +13,11 @@ ARCH="${UNAME_TO_GOARCH[$(uname -m)]}"
13
13
if [[ " $ARCH " == " ppc64le" ]]; then
14
14
# Install Pandoc from source
15
15
dnf install -y https://dl.fedoraproject.org/pub/epel/epel-release-latest-9.noarch.rpm
16
- dnf install -y cabal-install ghc gmp-devel gcc-toolset-13 git jq
17
-
18
- source /opt/rh/gcc-toolset-13/enable
19
-
20
- # ghc-8.10 has specific path for gcc in settings
21
- sed -i.bak ' s|/usr/bin/gcc|gcc|g' /usr/lib64/ghc-8.10.7/settings
22
-
23
- cabal user-config init
24
-
25
- sed -i -e ' s/http/https/g' -e ' s/-- secure: True/secure: True/g' $HOME /.cabal/config
26
-
27
- cabal update
28
- cabal install cabal-install --verbose
29
-
30
- # use latest cabal
31
- export PATH=/root/.cabal/bin:$PATH
32
-
33
- PANDOC_VERSION=$( curl -s " https://api.github.com/repos/jgm/pandoc/releases/latest" | jq -r ' .tag_name' )
34
-
35
- cd /tmp
36
- git clone --recurse-submodules https://github.com/jgm/pandoc.git
37
- cd pandoc
38
- git checkout ${PANDOC_VERSION}
39
- git submodule update --init --recursive
40
-
41
- # Modify config
42
- sed -i -e ' s/http/https/g' -e ' s/-- secure: True/secure: True/g' $HOME /.cabal/config
43
-
44
- cabal update -v
45
- cd pandoc-cli
46
- cabal build -j" $( nproc) " --verbose
16
+ dnf install -y pandoc
47
17
mkdir -p /usr/local/pandoc/bin
48
- cabal install \
49
- --installdir=/usr/local/pandoc/bin \
50
- --overwrite-policy=always \
51
- --install-method=copy
52
-
53
- # Clean up Haskell build system
54
- rm -rf ~ /.cabal ~ /.ghc /tmp/pandoc
55
- dnf remove -y cabal-install ghc gmp-devel
56
- dnf clean all && rm -rf /var/cache/dnf
57
-
58
- /usr/local/pandoc/bin/pandoc --version
18
+ ln -s /usr/bin/pandoc /usr/local/pandoc/bin/pandoc
19
+ export PATH=" /usr/local/pandoc/bin:$PATH "
20
+ pandoc --version
59
21
60
22
elif [[ " $ARCH " == " amd64" ]]; then
61
23
# pandoc installation
0 commit comments