From 6ed25f26baf57115f8907966b0e170cef55f2a81 Mon Sep 17 00:00:00 2001 From: Kyle Meyer Date: Sun, 27 Oct 2024 14:10:34 -0400 Subject: Add initial setup --- img-scripts/build | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100755 img-scripts/build (limited to 'img-scripts') 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" -- cgit v1.2.3