#!/bin/sh -e

export DESTDIR="$1"

export CFLAGS="-Wno-error"

meson \
    --prefix=/usr \
    -Dseatd=enabled \
    -Dbuiltin=enabled \
    -Dlogind=disabled \
    . output

ninja -C output
ninja -C output install

install -Dm755 run "$1/etc/sv/seatd/run"
