i2c-tools: fix missing runtime library
authorBaruch Siach <baruch@tkos.co.il>
Sun, 31 Dec 2017 13:25:45 +0000 (15:25 +0200)
committerThomas Petazzoni <thomas.petazzoni@free-electrons.com>
Sun, 31 Dec 2017 16:13:30 +0000 (17:13 +0100)
When building with dynamic library support, i2c-tools utilities are
linked against the libi2c.so library. Current i2c-tools install commands
don't take this into account, which leads to the following run-time
error:

eeprog: error while loading shared libraries: libi2c.so.0: cannot open shared object file: No such file or directory

Use the native install target to fix that.

Cc: Angelo Compagnucci <angelo.compagnucci@gmail.com>
Cc: Matt Weber <matthew.weber@rockwellcollins.com>
Signed-off-by: Baruch Siach <baruch@tkos.co.il>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
package/i2c-tools/i2c-tools.mk

index 0f71fd4fb581945e27f7a359a40bd681d2003ea2..9ddaa7278673afe3e87acf84eedf3ac62f55b817 100644 (file)
@@ -61,11 +61,8 @@ define I2C_TOOLS_BUILD_CMDS
 endef
 
 define I2C_TOOLS_INSTALL_TARGET_CMDS
-       for i in i2cdump i2cget i2cset i2cdetect i2ctransfer; \
-       do \
-               $(INSTALL) -m 755 -D $(@D)/tools/$$i $(TARGET_DIR)/usr/sbin/$$i; \
-       done
-       $(INSTALL) -m 755 -D $(@D)/eeprog/eeprog $(TARGET_DIR)/usr/bin/eeprog;
+       $(MAKE) $(TARGET_CONFIGURE_OPTS) $(I2C_TOOLS_MAKE_OPTS) \
+               DESTDIR="$(TARGET_DIR)" prefix=/usr -C $(@D) install
        $(I2C_TOOLS_INSTALL_PYSMBUS)
 endef