#!/bin/sh -e

./configure \
    --prefix=/usr \
    --with-xinitdir=/etc/X11/xinit

make
make DESTDIR="$1" install

sed 's/enable_xauth=1/enable_xauth=0/' "$1/usr/bin/startx" >_
cat _ > "$1/usr/bin/startx"