aboutsummaryrefslogtreecommitdiff
path: root/extra/kcgi/build
diff options
context:
space:
mode:
Diffstat (limited to 'extra/kcgi/build')
-rwxr-xr-xextra/kcgi/build18
1 files changed, 18 insertions, 0 deletions
diff --git a/extra/kcgi/build b/extra/kcgi/build
new file mode 100755
index 00000000..178fdc95
--- /dev/null
+++ b/extra/kcgi/build
@@ -0,0 +1,18 @@
+#!/bin/sh -e
+
+# Modify Makefile to make it POSIX
+clsed '/^\.for/,/^\.endfor/d' Makefile
+
+# Modify Makefile to properly use LDFLAGS
+# We don't want this expression to expand
+# shellcheck disable=2016
+clsed '/^kfcgi:/{n; s,$, $(LDFLAGS),}' Makefile
+
+./configure \
+ PREFIX=/usr \
+ SBINDIR=/usr/bin \
+ MANDIR=/usr/share/man \
+ LDFLAGS="$LDFLAGS -static"
+
+make
+make DESTDIR="$1" install