#!/bin/sh -e

sed -i 's/rc/-r -o/g' Makefile

make PREFIX="/usr" DESTDIR="$1" RANLIB=true install

install -Dm644 sysmgr.boot         "$1/etc/rc.d/sysmgr.boot"
install -Dm644 sysmgr.pre.shutdown "$1/usr/lib/init/rc.d/sysmgr.pre.shutdown"
install -Dm755 respawn             "$1/usr/bin/respawn"
