#!/bin/sh -e

export LDFLAGS="$LDFLAGS -static"

./configure \
    --prefix=/usr \
    --with-system-zlib

make
make DESTDIR="$1" install

clinst -Dm644 doas.conf "$1/etc/doas.conf"