]> git.pld-linux.org Git - SPECS.git/blob - openvino.spec
SPECS updated Sun 1 Aug 15:50:02 CEST 2021
[SPECS.git] / openvino.spec
1 #
2 # Conditional build:
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)
7 #
8 Summary:        OpenVINO - deep learning deployment toolkit
9 Summary(pl.UTF-8):      OpenVINO - narzędzia do wdrażania głębokiego uczenia
10 Name:           openvino
11 Version:        2020.3.2
12 Release:        0.1
13 License:        Apache v2.0
14 Group:          Libraries
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)
40
41 %description
42 This toolkit allows developers to deploy pre-trained deep learning
43 models through a high-level C++ Inference Engine API integrated with
44 application logic. 
45
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ą.
50
51 %package devel
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}
56
57 %description devel
58 Header files for OpenVINO library.
59
60 %description devel -l pl.UTF-8
61 Pliki nagłówkowe biblioteki OpenVINO.
62
63 %package static
64 Summary:        Static OpenVINO library
65 Summary(pl.UTF-8):      Statyczna biblioteka OpenVINO
66 Group:          Development/Libraries
67 Requires:       %{name}-devel = %{version}-%{release}
68
69 %description static
70 Static OpenVINO library.
71
72 %description static -l pl.UTF-8
73 Statyczna biblioteka OpenVINO.
74
75 %package apidocs
76 Summary:        API documentation for OpenVINO library
77 Summary(pl.UTF-8):      Dokumentacja API biblioteki OpenVINO
78 Group:          Documentation
79 #BuildArch:     noarch
80
81 %description apidocs
82 API documentation for OpenVINO library.
83
84 %description apidocs -l pl.UTF-8
85 Dokumentacja API biblioteki OpenVINO.
86
87 %prep
88 %setup -q
89 %patch0 -p1
90
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
96
97 install -d inference-engine/temp/download
98 ln -snf %{SOURCE3} %{SOURCE4} %{SOURCE5} inference-engine/temp/download
99
100 %build
101 install -d build
102 cd build
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
108         -DENABLE_AVX2=OFF \
109         -DENABLE_AVX512F=OFF \
110         -DENABLE_SSE42=OFF \
111 %endif
112         -DNGRAPH_USE_SYSTEM_PROTOBUF=ON \
113         -DTBB_DIR=/usr \
114         -DTBBROOT=/usr \
115         -DTREAT_WARNING_AS_ERROR=OFF
116
117 %{__make}
118
119 %install
120 rm -rf $RPM_BUILD_ROOT
121
122 %{__make} -C build install \
123         DESTDIR=$RPM_BUILD_ROOT
124
125 %clean
126 rm -rf $RPM_BUILD_ROOT
127
128 %post   -p /sbin/ldconfig
129 %postun -p /sbin/ldconfig
130
131 %files
132 %defattr(644,root,root,755)
133 %doc README.md
134 %attr(755,root,root) %{_libdir}/%{name}.so.*.*.*
135 %attr(755,root,root) %ghost %{_libdir}/%{name}.so.N
136
137 %files devel
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
144
145 %if %{with static_libs}
146 %files static
147 %defattr(644,root,root,755)
148 %{_libdir}/%{name}.a
149 %endif
150
151 %if %{with apidocs}
152 %files apidocs
153 %defattr(644,root,root,755)
154 %doc apidocs/*
155 %endif
This page took 0.438474 seconds and 3 git commands to generate.