#!/bin/sh -e
./configure \
--prefix=/usr \
--sbindir=/usr/bin \
--sysconfdir=/etc \
--rundir=/run \
--libexecdir=/usr/lib/dhcpcd
make
make DESTDIR="$1" install
# Install runit service.
mkdir -p "$1/etc/sv/dhcpcd"
cp -f dhcpcd.run "$1/etc/sv/dhcpcd/run"
ln -sf /run/runit/supervise.dhcpcd "$1/etc/sv/dhcpcd/supervise"