3 %bcond_without apidocs # API documentation
4 %bcond_without static_libs # static libraries
5 %bcond_without opencv # OpenCV support
6 %bcond_with gna # GNA engine support (proprietary, x86_64 only, downloading from https://download.01.org/opencv/2020/openvinotoolkit/2020.3/inference_engine/GNA_01.00.00.1401.zip)
8 Summary: OpenVINO - deep learning deployment toolkit
9 Summary(pl.UTF-8): OpenVINO - narzędzia do wdrażania głębokiego uczenia
15 #Source0Download: https://github.com/openvinotoolkit/openvino/releases
16 Source0: https://github.com/openvinotoolkit/openvino/archive/%{version}/%{name}-%{version}.tar.gz
17 # Source0-md5: f756d94110e2ddb5bf8c50d63cc910fd
18 %define ade_gitref cbe2db61a659c2cc304c3837406f95c39dfa938e
19 Source1: https://github.com/opencv/ade/archive/%{ade_gitref}/ade-%{ade_gitref}.tar.gz
20 # Source1-md5: 7b78a98fdc4906dcdfb809e11848189e
21 %define ngraph_gitref 1797d7fb712d2ffa6048ce5f5b3b560b84ab5ae4
22 Source2: https://github.com/NervanaSystems/ngraph/archive/%{ngraph_gitref}/ngraph-%{ngraph_gitref}.tar.gz
23 # Source2-md5: 07c44d55373c8ea04de35cd66a2b3c4c
24 Source3: https://download.01.org/opencv/2020/openvinotoolkit/2020.3/inference_engine/firmware_pcie-ma248x_1656.zip
25 # Source3-md5: 93be199f56fbb0afa4fd10fe144d7734
26 Source4: https://download.01.org/opencv/2020/openvinotoolkit/2020.3/inference_engine/firmware_usb-ma2450_1656.zip
27 # Source4-md5: 9e0ec96b2d8458468a74b1e2fbeab417
28 Source5: https://download.01.org/opencv/2020/openvinotoolkit/2020.3/inference_engine/firmware_usb-ma2x8x_1656.zip
29 # Source5-md5: aa7da91690d47f53470d1d084fbdf4d5
30 Patch0: %{name}-no-download.patch
31 URL: https://github.com/openvinotoolkit/openvino
32 BuildRequires: cmake >= 3.7.2
33 BuildRequires: libstdc++-devel >= 6:4.7
34 %{?with_opencv:BuildRequires: opencv-devel >= 4.3}
35 BuildRequires: protobuf-devel >= 2.6.1
36 BuildRequires: tbb-devel >= 2020.3
37 # if using noarch subpackages:
38 #BuildRequires: rpm-build >= 4.6
39 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
42 This toolkit allows developers to deploy pre-trained deep learning
43 models through a high-level C++ Inference Engine API integrated with
46 %description -l pl.UTF-8
47 Ten zestaw narzędzi pozwala programistom wdrażać wstępnie wytrenowane
48 modele uczenia głębokiego poprzez wysokopoziomowe API C++ Inference
49 Engine, zintegrowane z logiką aplikacyjną.
52 Summary: Header files for OpenVINO library
53 Summary(pl.UTF-8): Pliki nagłówkowe biblioteki OpenVINO
54 Group: Development/Libraries
55 Requires: %{name} = %{version}-%{release}
58 Header files for OpenVINO library.
60 %description devel -l pl.UTF-8
61 Pliki nagłówkowe biblioteki OpenVINO.
64 Summary: Static OpenVINO library
65 Summary(pl.UTF-8): Statyczna biblioteka OpenVINO
66 Group: Development/Libraries
67 Requires: %{name}-devel = %{version}-%{release}
70 Static OpenVINO library.
72 %description static -l pl.UTF-8
73 Statyczna biblioteka OpenVINO.
76 Summary: API documentation for OpenVINO library
77 Summary(pl.UTF-8): Dokumentacja API biblioteki OpenVINO
82 API documentation for OpenVINO library.
84 %description apidocs -l pl.UTF-8
85 Dokumentacja API biblioteki OpenVINO.
91 %{__tar} xf %{SOURCE1} --strip-components=1 -C inference-engine/thirdparty/ade
92 %{__tar} xf %{SOURCE2} --strip-components=1 -C ngraph
93 # allow custom CMAKE_BUILD_TYPE
94 %{__sed} -i -e '/^if (CMAKE_BUILD_TYPE/,/^endif/ d' ngraph/CMakeLists.txt
95 %{__sed} -i -e '/^include(linux_name)/,/^endif/ c set(LINUX_OS_NAME PLD)' inference-engine/cmake/dependencies.cmake
97 install -d inference-engine/temp/download
98 ln -snf %{SOURCE3} %{SOURCE4} %{SOURCE5} inference-engine/temp/download
103 %cmake --debug-output --debug-find .. \
104 %{!?with_gna:-DENABLE_GNA=OFF} \
105 %{!?with_opencv:-DENABLE_OPENCV=OFF} \
106 -DENABLE_UNSAFE_LOCATIONS=ON \
107 %ifnarch %{x8664} x32
109 -DENABLE_AVX512F=OFF \
112 -DNGRAPH_USE_SYSTEM_PROTOBUF=ON \
115 -DTREAT_WARNING_AS_ERROR=OFF
120 rm -rf $RPM_BUILD_ROOT
122 %{__make} -C build install \
123 DESTDIR=$RPM_BUILD_ROOT
126 rm -rf $RPM_BUILD_ROOT
128 %post -p /sbin/ldconfig
129 %postun -p /sbin/ldconfig
132 %defattr(644,root,root,755)
134 %attr(755,root,root) %{_libdir}/%{name}.so.*.*.*
135 %attr(755,root,root) %ghost %{_libdir}/%{name}.so.N
138 %defattr(644,root,root,755)
139 %doc devel-doc/* ChangeLog NEWS TODO
140 %attr(755,root,root) %{_libdir}/%{name}.so
141 %{_includedir}/%{name}
142 %{_aclocaldir}/%{name}.m4
143 %{_pkgconfigdir}/%{name}.pc
145 %if %{with static_libs}
147 %defattr(644,root,root,755)
153 %defattr(644,root,root,755)