aboutsummaryrefslogtreecommitdiff
path: root/testing/socklog/build
diff options
context:
space:
mode:
Diffstat (limited to 'testing/socklog/build')
-rwxr-xr-xtesting/socklog/build31
1 files changed, 31 insertions, 0 deletions
diff --git a/testing/socklog/build b/testing/socklog/build
new file mode 100755
index 00000000..d13d124c
--- /dev/null
+++ b/testing/socklog/build
@@ -0,0 +1,31 @@
+#!/bin/sh -e
+
+cd socklog-2.1.0
+
+# Change configuration options to build everything statically
+echo "${CC:-gcc} -D_GNU_SOURCE $CFLAGS" > src/conf-cc
+echo "${CC:-gcc} -static $LDFLAGS -Wl,-z -Wl,noexecstack" > src/conf-ld
+package/compile
+
+# Create package directories
+mkdir -p "$1/usr/bin"
+mkdir -p "$1/usr/share/man/man1" "$1/usr/share/man/man8"
+
+# Install programs and manpages
+for bin in command/*; do
+ cp "$bin" "$1/usr/bin/$bin"
+done
+
+for man1 in man/*.1; do
+ cp "$man1" "$1/usr/share/man/man1/$man1"
+done
+
+for man8 in man/*.8; do
+ cp "$man1" "$1/usr/share/man/man8/$man8"
+done
+
+
+install -Dm755 socklog-unix.run "$1/etc/sv/socklog-unix/run"
+ln -s /run/runit/supervise.socklog "$1/etc/sv/socklog-unix/run"
+install -Dm755 svlogd.run "$1/etc/sv/socklog-unix/log/run"
+ln -s /run/runit/supervise.svlogd "$1/etc/sv/socklog-unix/log/run"