Browse Source

package/azure-iot-sdk-c: fix installation of libumqtt

Unlike the other libraries built by azure-iot-sdk-c, libumqtt follows
a regular versioning scheme. It has a libumqtt.so.1 SONAME, with
libumqtt.so.1 being a symlink to libumqtt.so.1.1.11.

However, we currently install the library itself as libumqtt.so to the
target filesystem, which is not its SONAME, which means it cannot be
found by any other library/program linked against it.

This commit fixes that by installing the library as
libumqtt.so.1.1.11, and creating the appropriate symlinks. The static
library installation is not modified.

Signed-off-by: Stephan Hoffmann <stephan.hoffmann@ext.grandcentrix.net>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
Stephan Hoffmann 5 years ago
parent
commit
570dd0c31b
1 changed files with 7 additions and 1 deletions
  1. 7 1
      package/azure-iot-sdk-c/azure-iot-sdk-c.mk

+ 7 - 1
package/azure-iot-sdk-c/azure-iot-sdk-c.mk

@@ -41,13 +41,19 @@ AZURE_IOT_SDK_C_LIBS += \
 	iothub_client/libiothub_client_mqtt_transport.so \
 	iothub_service_client/libiothub_service_client.so \
 	serializer/libserializer.so \
-	umqtt/libumqtt.so
+	umqtt/libumqtt.so.1.1.11
+
+define AZURE_IOT_SDK_C_CREATE_SYMLINKS
+	ln -sf libumqtt.so.1.1.11 $(1)/usr/lib/libumqtt.so.1
+	ln -sf libumqtt.so.1.1.11 $(1)/usr/lib/libumqtt.so
+endef
 endif
 
 define AZURE_IOT_SDK_C_INSTALL_LIBS
 	$(foreach l,$(AZURE_IOT_SDK_C_LIBS), \
 		$(INSTALL) -D -m 0755 $(@D)/$(l) $(1)/usr/lib/$(notdir $(l))
 	)
+	$(call AZURE_IOT_SDK_C_CREATE_SYMLINKS,$(1))
 endef
 
 define AZURE_IOT_SDK_C_INSTALL_STAGING_CMDS