aboutsummaryrefslogtreecommitdiff
path: root/extra/kcgi/build
diff options
context:
space:
mode:
Diffstat (limited to 'extra/kcgi/build')
-rwxr-xr-xextra/kcgi/build10
1 files changed, 8 insertions, 2 deletions
diff --git a/extra/kcgi/build b/extra/kcgi/build
index f6bc745b..178fdc95 100755
--- a/extra/kcgi/build
+++ b/extra/kcgi/build
@@ -1,12 +1,18 @@
#!/bin/sh -e
# Modify Makefile to make it POSIX
-sed -i '/^\.for/,/^\.endfor/d' Makefile
+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
+ MANDIR=/usr/share/man \
+ LDFLAGS="$LDFLAGS -static"
make
make DESTDIR="$1" install