@@ -1,6 +1,15 @@
# Makefile for the different targets used to generate full packages of a kernel
# It uses the generic clean infrastructure of kbuild
+# How to acquire (fake) root privileges
+ifndef KBUILD_PKG_ROOTCMD
+ifneq ($(shell id -u),0)
+ifeq ($(shell which fakeroot >/dev/null 2>&1 && echo found),found)
+KBUILD_PKG_ROOTCMD := fakeroot -u
+endif
+endif
+endif
+
# RPM target
# ---------------------------------------------------------------------------
# The rpm target generates two rpm files: