#!/bin/sh -e

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

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