# Note: depends on libcap
# Note: depends on gperf
# Note: depends on intltool
# Note: depends on pkg-config
# Note: depends on dbus
# Note: depends on glib
# Note: depends on m4
# Note: depends on meson
# Note: depends on ninja
# Note: depends on docbook-xsl
# Note: depends on docbook-xml-4.5
# Note: depends on docbook-xml-4.2
wget -c https://github.com/systemd/systemd/archive/v246/systemd-246.tar.gz
tar -xzf systemd-246.tar.gz
cd systemd-246
mkdir -p build
cd build
meson --prefix="/usr" --sysconfdir="/etc" --localstatedir="/var" ..  ||  meson --prefix="/usr" --sysconfdir="/etc" --localstatedir="/var" -Defi="false" ..
ninja
DESTDIR="`pwd`/staging" ninja install
mv staging/sbin/* staging/usr/lib/systemd # Don't force systemd as init
cp -rd staging/* /