aboutsummaryrefslogtreecommitdiff
path: root/core/mandoc/build
diff options
context:
space:
mode:
authorCem Keylan <cem@ckyln.com>2019-12-09 19:17:24 +0300
committerCem Keylan <cem@ckyln.com>2019-12-09 19:17:24 +0300
commit03423e0583057cbe5a16f8439183e2dbc0e8dd7c (patch)
tree81fe3ba69d94146f83fb5541d1fb2da0ac4eac08 /core/mandoc/build
downloadrepository-03423e0583057cbe5a16f8439183e2dbc0e8dd7c.tar.gz
secondary commit
Diffstat (limited to 'core/mandoc/build')
-rwxr-xr-xcore/mandoc/build25
1 files changed, 25 insertions, 0 deletions
diff --git a/core/mandoc/build b/core/mandoc/build
new file mode 100755
index 00000000..5b015e39
--- /dev/null
+++ b/core/mandoc/build
@@ -0,0 +1,25 @@
+#!/bin/sh -e
+
+sed -i 's,"more -s","less",g' main.c
+
+cat > configure.local <<EOF
+PREFIX=/usr
+MANDIR=/usr/share/man
+LIBDIR=/usr/lib
+CC="${CC:-gcc}"
+CFLAGS="$CFLAGS"
+MANPATH_DEFAULT=/usr/share/man
+LN="ln -sf"
+EOF
+
+MANPATH_BASE=/usr/share/man ./configure
+make
+make -j1 DESTDIR="$1" base-install lib-install
+
+# Make binaries writable.
+chmod -v u+w "$1/usr/bin/"*
+
+# Remove all development files.
+rm -rf "$1/usr/include" \
+ "$1/usr/lib" \
+ "$1/usr/share/man/man3"