When the dynamic/static library of i2c-tools is enabled it is installed
to the target destination. However, in order for external packages to
link against it, it must also be installed to staging.
Here, the flag is set to install the package to staging. The
INSTALL_STAGING command is included to complete the operation.
Signed-off-by: Brad Love <brad@nextdimension.cc>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
I2C_TOOLS_LICENSE = GPL-2.0+, GPL-2.0 (py-smbus), LGPL-2.1+ (libi2c)
I2C_TOOLS_LICENSE_FILES = COPYING COPYING.LGPL README
I2C_TOOLS_MAKE_OPTS = EXTRA=eeprog
+I2C_TOOLS_INSTALL_STAGING = YES
ifeq ($(BR2_PACKAGE_PYTHON),y)
I2C_TOOLS_DEPENDENCIES += python
$(I2C_TOOLS_INSTALL_PYSMBUS)
endef
+define I2C_TOOLS_INSTALL_STAGING_CMDS
+ $(MAKE) $(TARGET_CONFIGURE_OPTS) $(I2C_TOOLS_MAKE_OPTS) \
+ DESTDIR="$(STAGING_DIR)" prefix=/usr -C $(@D) install
+endef
+
$(eval $(generic-package))