aboutsummaryrefslogtreecommitdiff
path: root/img-scripts
diff options
context:
space:
mode:
Diffstat (limited to 'img-scripts')
-rwxr-xr-ximg-scripts/build28
1 files changed, 28 insertions, 0 deletions
diff --git a/img-scripts/build b/img-scripts/build
new file mode 100755
index 0000000..d2e0147
--- /dev/null
+++ b/img-scripts/build
@@ -0,0 +1,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"