[Dist] Install absl headers. Exclude duplicated.
authorMyungJoo Ham <myungjoo.ham@samsung.com>
Thu, 11 Jul 2019 03:33:45 +0000 (12:33 +0900)
committerMyungJoo Ham <myungjoo.ham@samsung.com>
Thu, 11 Jul 2019 03:54:23 +0000 (12:54 +0900)
TF headers require ABSL headers. Install them.
Exclude duplicated hedares of tf-lite from tf's devel.

Change-Id: I7e4a255383484e886857d2d2e33250cf7f5f42f9
Signed-off-by: MyungJoo Ham <myungjoo.ham@samsung.com>
packaging/tensorflow.spec

index 77b9d2a28c3cc9be551f08878b5f9e1862735236..d3333d20f469ec8aa059f664f65da3f0048671ee 100644 (file)
@@ -395,6 +395,14 @@ install -m 0644 tensorflow/lite/profiling/*.h %{buildroot}%{_includedir}/tensorf
 install -m 0644 tensorflow/lite/tools/make/downloads/flatbuffers/include/flatbuffers/*.h %{buildroot}%{_includedir}/flatbuffers
 install -m 0644 ./tensorflow-lite.pc.in %{buildroot}%{_libdir}/pkgconfig/tensorflow-lite.pc
 
+%if %{enable_tf}
+# Install ABSL headers for tf users.
+mkdir -p %{buildroot}%{_includedir}/tensorflow/absl
+pushd build/abseil_cpp/src/abseil_cpp/absl
+find . -type d -exec mkdir -p %{buildroot}%{_includedir}/tensorflow/absl/{} \;
+find . -name "*.h" -exec install -m 0644 {} %{buildroot}%{_includedir}/tensorflow/absl/{} \;
+popd
+%endif
 
 %if %{enable_tf}
 %files
@@ -409,6 +417,8 @@ install -m 0644 ./tensorflow-lite.pc.in %{buildroot}%{_libdir}/pkgconfig/tensorf
 %manifest %{name}.manifest
 %defattr(-, root, root)
 %{_includedir}/%{name}
+%exclude %{_includedir}/tensorflow/lite
+%exclude %{_includedir}/tensorflow/contrib/lite
 %{_libdir}/pkgconfig/*
 %endif