summaryrefslogtreecommitdiffstats
path: root/mkosi.images/build/mkosi.conf.d/debian-ubuntu/mkosi.prepare
diff options
context:
space:
mode:
Diffstat (limited to 'mkosi.images/build/mkosi.conf.d/debian-ubuntu/mkosi.prepare')
-rwxr-xr-xmkosi.images/build/mkosi.conf.d/debian-ubuntu/mkosi.prepare15
1 files changed, 15 insertions, 0 deletions
diff --git a/mkosi.images/build/mkosi.conf.d/debian-ubuntu/mkosi.prepare b/mkosi.images/build/mkosi.conf.d/debian-ubuntu/mkosi.prepare
new file mode 100755
index 0000000..cec81ec
--- /dev/null
+++ b/mkosi.images/build/mkosi.conf.d/debian-ubuntu/mkosi.prepare
@@ -0,0 +1,15 @@
+#!/bin/bash
+# SPDX-License-Identifier: LGPL-2.1-or-later
+set -e
+
+if [[ "$1" == "build" ]]; then
+ exit 0
+fi
+
+if [[ ! -d "pkg/$PKG_SUBDIR/debian" ]]; then
+ echo "deb rules not found at pkg/$PKG_SUBDIR/debian, run mkosi once with -ff to make sure the rules are cloned" >&2
+ exit 1
+fi
+
+cd "pkg/$PKG_SUBDIR"
+DEB_BUILD_PROFILES="pkg.systemd.upstream" apt-get build-dep .