[meta-tensorflow,24/25] tensorflow: split sub packages

Submitted by Hongxu Jia on Dec. 16, 2020, 1:08 p.m. | Patch ID: 178929

Details

Message ID 20201216130822.28476-25-hongxu.jia@windriver.com
State New
Headers show

Commit Message

Hongxu Jia Dec. 16, 2020, 1:08 p.m.
Split sub packages (libtensorflow-c libtensorflow-framework
label-image label-image-lite python3-tensorflow), then user
chould select the required one rather than install them
as a whole

Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
---
 recipes-framework/tensorflow/tensorflow_2.4.0.bb | 15 ++++++++++++++-
 1 file changed, 14 insertions(+), 1 deletion(-)

Patch hide | download patch | download mbox

diff --git a/recipes-framework/tensorflow/tensorflow_2.4.0.bb b/recipes-framework/tensorflow/tensorflow_2.4.0.bb
index 49c868e..6c4163e 100644
--- a/recipes-framework/tensorflow/tensorflow_2.4.0.bb
+++ b/recipes-framework/tensorflow/tensorflow_2.4.0.bb
@@ -168,7 +168,20 @@  FILES_${PN}-dev = ""
 INSANE_SKIP_${PN} += "dev-so \
                       already-stripped \
                      "
-FILES_${PN} += "${libdir}/* ${datadir}/*"
+
+PACKAGE_BEFORE_PN += "libtensorflow-c libtensorflow-framework label-image label-image-lite python3-tensorflow"
+
+RDEPENDS_label-image += "libtensorflow-framework"
+RDEPENDS_python3-tensorflow += "libtensorflow-framework"
+RDEPENDS_${PN} += "libtensorflow-c libtensorflow-framework label-image label-image-lite python3-tensorflow"
+
+ALLOW_EMPTY_${PN} = "1"
+
+FILES_python3-tensorflow += "${libdir}/* ${datadir}/* ${sbindir}/*"
+FILES_libtensorflow-c = "${libdir}/libtensorflow.so ${libdir}/libtensorflow_cc.so"
+FILES_libtensorflow-framework = "${libdir}/libtensorflow.so ${libdir}/libtensorflow_framework.so*"
+FILES_label-image = "${sbindir}/label_image"
+FILES_label-image-lite = "${sbindir}/label_image.lite"
 
 inherit siteinfo unsupportarch
 python __anonymous() {