aboutsummaryrefslogtreecommitdiff
path: root/testing/socklog/build
blob: b157a85afcc081835a5b220b2f05c759f4caf5d9 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
#!/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/$(basename "$bin")"
done

for man1 in man/*.1; do
	cp "$man1" "$1/usr/share/man/man1/$(basename "$man1")"
done

for man8 in man/*.8; do
	cp "$man1" "$1/usr/share/man/man8/$(basename "$man8")"
done

cd ..


install -Dm755 socklog-unix.run "$1/etc/sv/socklog-unix/run"
ln -s /run/runit/supervise.socklog "$1/etc/sv/socklog-unix/supervise"
install -Dm755 svlogd.run "$1/etc/sv/socklog-unix/log/run"
ln -s ../run/runit/supervise.svlogd "$1/etc/sv/socklog-unix/log/supervise"