debian: Fix release package build

Since acrn-tools are not built when creating a release build, there are no
tool binaries to be installed. Generate the required debian/acrn-tools.install
file on the fly whenever a debug build is requested. This keeps this file
empty on a release build avoiding the resulting build errors about missing
files.

Additionally a package specific README.Debian file is added to explain this
behavior. It will be installed according to Debian packaging guidelines
at /usr/share/doc/acrn-tools/README.Debian.

Tracked-On: #8257
Signed-off-by: Helmut Buchsbaum <helmut.buchsbaum@opensource.tttech-industrial.com>
This commit is contained in:
Helmut Buchsbaum 2022-10-31 17:48:00 +01:00 committed by acrnsi-robot
parent 48c01048ba
commit 13937162e1
3 changed files with 23 additions and 0 deletions

7
debian/acrn-tools.README.Debian vendored Normal file
View File

@ -0,0 +1,7 @@
acrn-tools for Debian
---------------------
Since acrn-tools cannot be provided for release builds, a virtually empty
acrn-tools package indicates a release build package. As a consequence,
the tools belonging to this package are only populated for debug builds.

16
debian/rules vendored
View File

@ -146,6 +146,21 @@ else
devnull = >/dev/null devnull = >/dev/null
endif endif
### dh_installdeb ############################################################
# create acrntools.install for debug build
ifeq ($(RELEASE),n)
debian/acrn-tools.install: debian/acrn-tools.install.debug
@$(call echo-verbose)
@$(call echo-silent,CREATE $@)
$(Q)cp $< $@
override_dh_install: debian/acrn-tools.install
$(Q)dh_install
endif
### dh_installdeb ############################################################ ### dh_installdeb ############################################################
debian/acrn-hypervisor.postinst: debian/acrn-hypervisor.postinst.in debian/acrn-hypervisor.postinst: debian/acrn-hypervisor.postinst.in
@$(call echo-verbose) @$(call echo-verbose)
@ -390,6 +405,7 @@ override_dh_auto_clean:
$(Q)rm -f debian/acrn-hypervisor.postinst $(Q)rm -f debian/acrn-hypervisor.postinst
$(Q)rm -f debian/acrn-hypervisor.postrm $(Q)rm -f debian/acrn-hypervisor.postrm
$(Q)rm -f debian/acrn-hypervisor.prerm $(Q)rm -f debian/acrn-hypervisor.prerm
$(Q)rm -f debian/acrn-tools.install
$(Q)rm -f debian/acrn-hypervisor.templates $(Q)rm -f debian/acrn-hypervisor.templates
$(Q)rm -rf debian/acrn-board-inspector/build $(Q)rm -rf debian/acrn-board-inspector/build
$(Q)dh_auto_clean $(devnull) $(Q)dh_auto_clean $(devnull)