blob: d2e014727d2443bd4774f353694284e43ce326ed (
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
|
#!/bin/sh
# SPDX-License-Identifier: 0BSD
set -eu
apk update --no-cache
apk add --no-cache file-dev libmagic libmagic-static
cabal update
feats='-f-assistant -f-webapp'
# shellcheck disable=SC2086
cabal configure $feats
# Generate a cabal.project.freeze file. Beyond recording what
# dependencies were used for a build, this (hopefully) provides future
# builds a way to get back to a known good state, if necessary.
cabal v2-freeze
make mans
n=$(nproc --ignore=1)
# Most of the cabal and GHC options from pandoc's Makefile (debpkg
# target, 4c66bf279).
#
# shellcheck disable=SC2086
cabal build -j"$n" \
--enable-executable-static $feats \
--ghc-options="-j$n +RTS -A256m -RTS -split-sections -optc-Os -optl=-pthread"
|