]> git.ipfire.org Git - thirdparty/systemd.git/blobdiff - mkosi.build
Merge pull request #6932 from poettering/notify-pam
[thirdparty/systemd.git] / mkosi.build
index 94a6667e42f77635ee1a67e68b6577057713c669..92eb55b130c2c4b71c5bd18500469c2809ddae21 100755 (executable)
 # This is a build script for OS image generation using mkosi (https://github.com/systemd/mkosi).
 # Simply invoke "mkosi" in the project directory to build an OS image.
 
-./autogen.sh c
-make -j `nproc`
-make install
+# If mkosi.builddir/ exists mkosi will set $BUILDDIR to it, let's then use it
+# as out-of-tree build dir. Otherwise, let's make up our own builddir.
+[ -z "$BUILDDIR" ] && BUILDDIR=build
+
+export LC_CTYPE=C.UTF-8
+
+[ -f "$BUILDDIR"/build.ninja ] || meson "$BUILDDIR"
+ninja -C "$BUILDDIR" all
+[ "$WITH_TESTS" = 0 ] || ninja -C "$BUILDDIR" test || ( RET="$?" ; cat "$BUILDDIR"/meson-logs/testlog.txt ; exit "$RET" )
+ninja -C "$BUILDDIR" install
+
+mkdir -p "$DESTDIR"/etc
+
+cat > "$DESTDIR"/etc/issue <<EOF
+\S (built from systemd tree)
+Kernel \r on an \m (\l)
+
+EOF