浏览代码

swupdate: package libswupdate into separate package

The libswupdate shared library produced by the contents of the ipc
subdirectory can be used by other packages to communicate with SWUpdate.
The library is embedded into the base package which creates two
problems:

- A recipe / program cannot depend on libswupdate without depending on
  swupdate
- The complete set of swupdate licenses seems to apply to the program
  including strong copyleft GPL-2.0-only instead only LPGL-2.1-or-later

As documented in the source code swupdate-ipc is purely
LGPL-2.1-or-later.

Existing recipes / programs which need libswupdate but only depend on
swupdate will still get libswupdate through a runtime recommendation.

Signed-off-by: Ricardo Simoes <ricardo.simoes@pt.bosch.com>
Signed-off-by: Mark Jonas <mark.jonas@de.bosch.com>
Ricardo Simoes 1 年之前
父节点
当前提交
76739fe56f
共有 1 个文件被更改,包括 6 次插入0 次删除
  1. 6 0
      recipes-support/swupdate/swupdate.inc

+ 6 - 0
recipes-support/swupdate/swupdate.inc

@@ -7,6 +7,7 @@ DEPENDS += "libconfig zlib libubootenv json-c"
 # https://sbabic.github.io/swupdate/licensing.html
 # rst form: file://doc/source/licensing.rst
 LICENSE = "GPL-2.0-only & GPL-2.0-or-later & LGPL-2.1-or-later & LGPL-2.1-only & MIT & ISC & BSD-1-Clause & BSD-3-Clause"
+LICENSE:${PN}-ipc = "LGPL-2.1-or-later"
 LICENSE:${PN}-lua = "LGPL-2.1-only & MIT"
 LICENSE:${PN}-www = "MIT"
 
@@ -43,6 +44,7 @@ LTOEXTRA += "-flto-partition=none"
 
 PACKAGES =+ " \
     ${PN}-client \
+    ${PN}-ipc \
     ${PN}-lua \
     ${PN}-progress \
     ${PN}-tools \
@@ -60,6 +62,7 @@ ALLOW_EMPTY:${PN}-tools-hawkbit = "1"
 ALLOW_EMPTY:${PN}-tools-ipc = "1"
 
 FILES:${PN}-client = "${bindir}/swupdate-client"
+FILES:${PN}-ipc = "${libdir}/libswupdate${SOLIBS}"
 FILES:${PN}-lua += "${libdir}/lua/"
 FILES:${PN}-progress = " \
     ${bindir}/swupdate-progress \
@@ -96,6 +99,9 @@ RDEPENDS:${PN}-tools += "${PN}-client ${PN}-progress ${PN}-tools-hawkbit \
     ${@bb.utils.contains('DISTRO_FEATURES','systemd','${PN}-usb','',d)} \
 "
 
+RDEPENDS:${PN}-dev += "${PN}-ipc"
+RRECOMMENDS:${PN} += "${PN}-ipc"
+
 S = "${WORKDIR}/git"
 B = "${WORKDIR}/build"