#!/bin/sh -e
sed -i '/chown/d' GNUmakefile
./configure \
--prefix=/usr \
--enable-static \
--with-shadow \
--with-timestamp \
--without-pam
make
make DESTDIR="$1" install
mkdir -p "$1/etc"
cp -f doas.conf "$1/etc"
chmod 600 "$1/etc/doas.conf"