DEB_HOST_MULTIARCH ?= $(shell dpkg-architecture -qDEB_HOST_MULTIARCH)
+ifneq (,$(findstring stage1,$(DEB_BUILD_PROFILES)))
+BOOTSTRAP_DH_FLAGS := -Ngir1.2-gudev-1.0 -Nlibgudev-1.0-0 -Nlibgudev-1.0-dev
+endif
+
CONFFLAGS = \
--with-rootprefix= \
--with-rootlibdir=/lib/$(DEB_HOST_MULTIARCH) \
--with-sysvrcnd-path=/etc \
--with-firmware-path=/lib/firmware \
--with-debug-shell=/bin/bash \
- --enable-libcryptsetup \
--enable-tcpwrap \
--disable-coredump \
--disable-efi \
--disable-myhostname \
--disable-vconsole \
--disable-silent-rules
+ifeq (,$(findstring stage1,$(DEB_BUILD_PROFILES)))
+CONFFLAGS += --enable-libcryptsetup
+endif
CONFFLAGS_deb = \
--enable-selinux \
rm -rf debian/install/*/etc/kernel/
find debian/install/ -name '*.la' -delete
dh_install -pudev-udeb -plibudev1-udeb --sourcedir=debian/install/udeb
- dh_install -Nudev-udeb -Nlibudev1-udeb --sourcedir=debian/install/deb
+ dh_install $(BOOTSTRAP_DH_FLAGS) -Nudev-udeb -Nlibudev1-udeb --sourcedir=debian/install/deb
# install some files manually, --sourcedir makes that necessary
# udev-udeb
install -D --mode=755 debian/extra/udev.startup \
# files shipped by udev / bash-completion
rm debian/systemd/usr/share/bash-completion/completions/udevadm
# files systemd by cryptsetup
+ifeq (,$(findstring stage1,$(DEB_BUILD_PROFILES)))
rm debian/systemd/usr/share/man/man5/crypttab.5
+endif
# files shipped by systemd
rm debian/udev/lib/udev/rules.d/70-uaccess.rules
rm debian/udev/lib/udev/rules.d/73-seat-late.rules
dh_autoreconf debian/rules -- autoreconf
%:
+ifeq (,$(findstring stage1,$(DEB_BUILD_PROFILES)))
dh $@ --with autoreconf,gir,python2
+else
+ dh $@ --with autoreconf,python2 $(BOOTSTRAP_DH_FLAGS)
+endif