package/swupdate: add staging install

SWupdate provides API for external programs, so some headers and
libraries must be install to staging.

This patch installs headers and libs to STAGING_DIR, to prevent a
header name collision a subdirectory /usr/include/swupdate creates.

Signed-off-by: Andrey Grafin <conquistador@yandex-team.ru>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
2023.02.x
Andrey Grafin 2022-12-09 00:03:28 +03:00 committed by Thomas Petazzoni
parent ef13132fd3
commit eb2f2886b2
1 changed files with 6 additions and 0 deletions

View File

@ -17,6 +17,7 @@ SWUPDATE_LICENSE_FILES = LICENSES/BSD-1-Clause.txt \
LICENSES/LGPL-2.1-or-later.txt \
LICENSES/MIT.txt \
LICENSES/OFL-1.1.txt
SWUPDATE_INSTALL_STAGING = YES
# swupdate uses $CROSS-cc instead of $CROSS-gcc, which is not
# available in all external toolchains, and use CC for linking. Ensure
@ -228,6 +229,11 @@ define SWUPDATE_BUILD_CMDS
$(TARGET_MAKE_ENV) $(SWUPDATE_MAKE_ENV) $(MAKE) -C $(@D) $(SWUPDATE_MAKE_OPTS)
endef
define SWUPDATE_INSTALL_STAGING_CMDS
$(TARGET_MAKE_ENV) $(SWUPDATE_MAKE_ENV) $(MAKE) -C $(@D) \
$(SWUPDATE_MAKE_OPTS) DESTDIR=$(STAGING_DIR) INCLUDEDIR=/usr/include/swupdate install
endef
define SWUPDATE_INSTALL_TARGET_CMDS
$(TARGET_MAKE_ENV) $(SWUPDATE_MAKE_ENV) $(MAKE) -C $(@D) \
$(SWUPDATE_MAKE_OPTS) DESTDIR=$(TARGET_DIR) install