aboutsummaryrefslogtreecommitdiff
path: root/core/sinit/build
blob: 1466e64d17a096fc9e8b31e375671a3c4b41e336 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
#!/bin/sh -e

(
    cd sinit
    make CFLAGS="$CFLAGS -static" PREFIX=/usr DESTDIR="$1" install
)
ln -s sinit "$1/usr/bin/init"

install -Dm755 poweroff "$1/usr/bin/poweroff"
install -Dm755 reboot "$1/usr/bin/reboot"

install -Dm644 sinit-launch-services.boot "$1/etc/init/sinit-launch-services.boot"

# shellcheck disable=2086
"${CC:-gcc}" -o "$1/usr/bin/kpow" init/bin/kpow.c $CFLAGS -static