NAME="xinit"
DESC="Usable script to start the xserver"
VERSION="1.4.2"
FILES=("https://www.x.org/pub/individual/app/xinit-$VERSION.tar.xz")
HASHES=("0e9a1b9a82b84ab229c709c0f939c113")
DEPENDS=(
  "libx11" "xauth"
  "xmodmap" "xrdb" 
)

PACKAGE() {
  tar xf $NAME-$VERSION.tar.xz
  cd $NAME-$VERSION

  ./configure $XORG_CONFIG --with-xinitdir=/etc/X11/app-defaults
  make && make DESTDIR=${ROOTDIR} install && ldconfig

  sed -i '175s/.*/    xserverauthfile=`mktemp -p \/tmp serverauth.XXXXXXXXXX`/' \
      "$ROOTDIR/usr/bin/startx"

  cd .. && rm -rf $NAME-$VERSION
}
