[Dist/Debian] Add initial debian packaging files 01/220701/3
authorWook Song <wook16.song@samsung.com>
Fri, 20 Dec 2019 04:40:19 +0000 (13:40 +0900)
committerWook Song <wook16.song@samsung.com>
Mon, 23 Dec 2019 05:31:04 +0000 (14:31 +0900)
This patch adds initial debian packaging files.

Change-Id: Ifeadfdb5c3e67a87773ac2834b3b17765c867645
Signed-off-by: Wook Song <wook16.song@samsung.com>
12 files changed:
debian/changelog [new file with mode: 0644]
debian/compat [new file with mode: 0644]
debian/control [new file with mode: 0644]
debian/copyright [new file with mode: 0644]
debian/libinference-engine-dev.install [new file with mode: 0644]
debian/libinference-engine.install [new file with mode: 0644]
debian/libinference-engine.triggers [new file with mode: 0644]
debian/patches/0001-CMake-Do-not-call-get_linux_name-when-LINUX_OS_NAME-.patch [new file with mode: 0644]
debian/patches/0002-CMake-Add-a-variable-to-resolve-dependency-on-TBB-us.patch [new file with mode: 0644]
debian/patches/series [new file with mode: 0644]
debian/rules [new file with mode: 0755]
debian/source/format [new file with mode: 0644]

diff --git a/debian/changelog b/debian/changelog
new file mode 100644 (file)
index 0000000..64e8ab9
--- /dev/null
@@ -0,0 +1,5 @@
+openvino (2019R3) unstable; urgency=low
+
+  * Initial debian packaging files are added
+
+ -- Wook Song <wook16.song@samsung.com>  Wed, 18 Dec 2019 13:19:20 +0900
diff --git a/debian/compat b/debian/compat
new file mode 100644 (file)
index 0000000..ec63514
--- /dev/null
@@ -0,0 +1 @@
+9
diff --git a/debian/control b/debian/control
new file mode 100644 (file)
index 0000000..100dfce
--- /dev/null
@@ -0,0 +1,39 @@
+Source: openvino
+Maintainer: Wook Song <wook16.song@samsung.com>
+Section: libs
+Priority: optional
+Build-Depends: debhelper (>= 9.0.0), quilt,
+ cmake, pkg-config,
+ gcc-9 | gcc-8 | gcc-7 | gcc-6 | gcc-5,
+ g++-9 | g++-8 | g++-7 | g++-6 | g++-5,
+ libtbb-dev (>=2019~U9-0)
+Standards-Version: 4.1.4
+Vcs-Git: git://git.tizen.org/platform/upstream/dldt
+Vcs-Browser: https://git.tizen.org/cgit/platform/upstream/dldt
+
+Package: libinference-engine
+Section: libs
+Priority: optional
+Architecture: any
+Multi-Arch: same
+Depends: ${shlibs:Depends}, ${misc:Depends}, libtbb
+Description: OpenVINO™ Toolkit - Deep Learning Deployment Toolkit
+ OpenVINO™ toolkit, short for Open Visual Inference and Neural network
+ Optimization toolkit, provides developers with improved neural network
+ performance on a variety of Intel® processors and helps them further
+ unlock cost-effective, real-time vision applications.
+ .
+ The toolkit enables deep learning inference and easy heterogeneous
+ execution across multiple Intel® platforms (CPU, Intel® Processor Graphics)
+ —providing implementations across cloud architectures to edge devices.
+ This open source distribution provides flexibility and availability to
+ the developer community to innovate deep learning and AI solutions.
+
+Package: libinference-engine-dev
+Section: libs
+Priority: optional
+Architecture: any
+Multi-Arch: same
+Depends: ${shlibs:Depends}, ${misc:Depends}, libinference-engine
+Description: OpenVINO™ Toolkit Development package
+ This is development package for Intel® OpenVINO™ Toolkit.
diff --git a/debian/copyright b/debian/copyright
new file mode 100644 (file)
index 0000000..b7f843e
--- /dev/null
@@ -0,0 +1,9 @@
+Format: http://www.debian.org/doc/packaging-manuals/copyright-format/1.0/
+Upstream-Name: dldt
+Source: https://github.com/opencv/dldt
+
+Files: *
+Copyright: Intel Corporation 2018-2019
+License: Apache-2.0
+ /usr/share/common-licenses/Apache-2.0
+
diff --git a/debian/libinference-engine-dev.install b/debian/libinference-engine-dev.install
new file mode 100644 (file)
index 0000000..4bf50dc
--- /dev/null
@@ -0,0 +1,6 @@
+/usr/include/*
+/usr/lib/*/libfluid.a
+/usr/lib/*/libhelpers.a
+/usr/lib/*/libinference_engine_s.a
+/usr/lib/*/libngraph.a
+/usr/lib/*/libpugixml.a
diff --git a/debian/libinference-engine.install b/debian/libinference-engine.install
new file mode 100644 (file)
index 0000000..a6474f3
--- /dev/null
@@ -0,0 +1,2 @@
+/usr/lib/*/*.so
+/usr/lib/*/*.xml
diff --git a/debian/libinference-engine.triggers b/debian/libinference-engine.triggers
new file mode 100644 (file)
index 0000000..dd86603
--- /dev/null
@@ -0,0 +1 @@
+activate-noawait ldconfig
diff --git a/debian/patches/0001-CMake-Do-not-call-get_linux_name-when-LINUX_OS_NAME-.patch b/debian/patches/0001-CMake-Do-not-call-get_linux_name-when-LINUX_OS_NAME-.patch
new file mode 100644 (file)
index 0000000..d1e2904
--- /dev/null
@@ -0,0 +1,38 @@
+From c5776b1c367ef19574166e6562f930125789ae97 Mon Sep 17 00:00:00 2001
+From: Wook Song <wook16.song@samsung.com>
+Date: Wed, 13 Nov 2019 14:45:42 +0900
+Subject: [PATCH 1/2] [CMake] Do not call get_linux_name when LINUX_OS_NAME is
+ provided
+
+In order to handle other OS platforms that are not compatible with the
+function, get_linux_name, in dependencies.cmake, this patch makes this
+function be not invoked when LINUX_OS_NAME is provided from outside.
+
+Change-Id: I19f7bde8d4175997cb9df31810595aa4ccbca460
+Signed-off-by: Wook Song <wook16.song@samsung.com>
+---
+ inference-engine/cmake/dependencies.cmake | 8 +++++---
+ 1 file changed, 5 insertions(+), 3 deletions(-)
+
+diff --git a/inference-engine/cmake/dependencies.cmake b/inference-engine/cmake/dependencies.cmake
+index 682f2e55..89d0c41f 100644
+--- a/inference-engine/cmake/dependencies.cmake
++++ b/inference-engine/cmake/dependencies.cmake
+@@ -12,9 +12,11 @@ set_temp_directory(TEMP "${IE_MAIN_SOURCE_DIR}")
+ include(ExternalProject)
+ include(linux_name)
+-if(COMMAND get_linux_name)
+-    get_linux_name(LINUX_OS_NAME)
+-endif()
++if (NOT DEFINED LINUX_OS_NAME)
++    if(COMMAND get_linux_name)
++        get_linux_name(LINUX_OS_NAME)
++    endif()
++endif (NOT DEFINED LINUX_OS_NAME)
+ if (ENABLE_MYRIAD)
+     include(vpu_dependencies)
+-- 
+2.17.1
+
diff --git a/debian/patches/0002-CMake-Add-a-variable-to-resolve-dependency-on-TBB-us.patch b/debian/patches/0002-CMake-Add-a-variable-to-resolve-dependency-on-TBB-us.patch
new file mode 100644 (file)
index 0000000..49d7516
--- /dev/null
@@ -0,0 +1,86 @@
+From cecdd587a8a62d979b8391fba29bae21bf7d2027 Mon Sep 17 00:00:00 2001
+From: Wook Song <wook16.song@samsung.com>
+Date: Wed, 13 Nov 2019 14:57:03 +0900
+Subject: [PATCH 2/2] [CMake] Add a variable to resolve dependency on TBB using
+ system library
+
+In order to resolve the build dependency on TBB using one installed in
+the system, this patch adds a variable to the dependencies.cmake file.
+
+Change-Id: Ie07a0ce99c7539687b2d2059377da464b9159c8e
+Signed-off-by: Wook Song <wook16.song@samsung.com>
+---
+ inference-engine/cmake/dependencies.cmake | 21 +++++++++++++++------
+ inference-engine/cmake/ie_parallel.cmake  | 10 ++++++++--
+ 2 files changed, 23 insertions(+), 8 deletions(-)
+
+diff --git a/inference-engine/cmake/dependencies.cmake b/inference-engine/cmake/dependencies.cmake
+index 89d0c41f..561b057a 100644
+--- a/inference-engine/cmake/dependencies.cmake
++++ b/inference-engine/cmake/dependencies.cmake
+@@ -7,6 +7,9 @@ cmake_policy(SET CMP0054 NEW)
+ #we have number of dependencies stored on ftp
+ include(dependency_solver)
++include(FindPkgConfig)
++find_package(PkgConfig REQUIRED)
++
+ set_temp_directory(TEMP "${IE_MAIN_SOURCE_DIR}")
+ include(ExternalProject)
+@@ -79,10 +82,14 @@ if (THREADING STREQUAL "TBB" OR THREADING STREQUAL "TBB_AUTO")
+                 ENVIRONMENT "TBBROOT"
+                 VERSION_REGEX ".*_([a-z]*_([a-z0-9]+\\.)*[0-9]+).*")
+     elseif(LINUX)
+-        RESOLVE_DEPENDENCY(TBB
+-                ARCHIVE_LIN "tbb2019_20181010_lin.tgz"
+-                TARGET_PATH "${TEMP}/tbb"
+-                ENVIRONMENT "TBBROOT")
++        if (USE_TBB_SYSTEM_DEPS)
++            pkg_search_module(TBB REQUIRED libtbb)
++        else(USE_TBB_SYSTEM_DEPS)
++            RESOLVE_DEPENDENCY(TBB
++                    ARCHIVE_LIN "tbb2019_20181010_lin.tgz"
++                    TARGET_PATH "${TEMP}/tbb"
++                    ENVIRONMENT "TBBROOT")
++        endif (USE_TBB_SYSTEM_DEPS)
+     else(APPLE)
+         RESOLVE_DEPENDENCY(TBB
+                 ARCHIVE_MAC "tbb2019_20190414_v1_mac.tgz"
+@@ -90,8 +97,10 @@ if (THREADING STREQUAL "TBB" OR THREADING STREQUAL "TBB_AUTO")
+                 ENVIRONMENT "TBBROOT"
+                 VERSION_REGEX ".*_([a-z]*_([a-z0-9]+\\.)*[0-9]+).*")
+     endif()
+-    log_rpath_from_dir(TBB "${TBB}/lib")
+-    debug_message(STATUS "tbb=" ${TBB})
++    if (NOT USE_TBB_SYSTEM_DEPS)
++        log_rpath_from_dir(TBB "${TBB}/lib")
++        debug_message(STATUS "tbb=" ${TBB})
++    endif (NOT USE_TBB_SYSTEM_DEPS)
+ endif ()
+ if (ENABLE_OPENCV)
+diff --git a/inference-engine/cmake/ie_parallel.cmake b/inference-engine/cmake/ie_parallel.cmake
+index 97e8c5e9..f8151a87 100644
+--- a/inference-engine/cmake/ie_parallel.cmake
++++ b/inference-engine/cmake/ie_parallel.cmake
+@@ -36,8 +36,14 @@ function(set_ie_threading_interface_for TARGET_NAME)
+             endif ()
+             if (NOT TBB_INCLUDE_DIRS OR NOT TBB_LIBRARIES_RELEASE)
+-                find_path(TBB_INCLUDE_DIRS tbb/tbb.h ${incl_path} NO_DEFAULT_PATH)
+-                find_library(TBB_LIBRARIES_RELEASE tbb ${lib_rel_path} NO_DEFAULT_PATH)
++                if (USE_TBB_SYSTEM_DEPS)
++                    pkg_search_module(SYSTEM_TBB REQUIRED libtbb)
++                    set(incl_path ${SYSTEM_TBB_INCLUDE_DIRS})
++                    set(TBB_LIBRARIES_RELEASE ${SYSTEM_TBB_LIBRARIES})
++                else ()
++                    find_path(TBB_INCLUDE_DIRS tbb/tbb.h ${incl_path} NO_DEFAULT_PATH)
++                    find_library(TBB_LIBRARIES_RELEASE tbb ${lib_rel_path} NO_DEFAULT_PATH)
++                endif ()
+                 ext_message(STATUS "TBB include: ${TBB_INCLUDE_DIRS}")
+                 ext_message(STATUS "TBB Release lib: ${TBB_LIBRARIES_RELEASE}")
+                 if (NOT LINUX)
+-- 
+2.17.1
+
diff --git a/debian/patches/series b/debian/patches/series
new file mode 100644 (file)
index 0000000..d7e7799
--- /dev/null
@@ -0,0 +1,2 @@
+0001-CMake-Do-not-call-get_linux_name-when-LINUX_OS_NAME-.patch
+0002-CMake-Add-a-variable-to-resolve-dependency-on-TBB-us.patch
diff --git a/debian/rules b/debian/rules
new file mode 100755 (executable)
index 0000000..99da19d
--- /dev/null
@@ -0,0 +1,72 @@
+#!/usr/bin/make -f
+
+export DEB_HOST_MULTIARCH ?= $(shell dpkg-architecture -qDEB_HOST_MULTIARCH)
+export DEB_HOST_ARCH ?= $(shell dpkg-architecture -qDEB_HOST_ARCH)
+export DEB_CXXFLAGS_MAINT_APPEND ?= -std=c++11
+export SRC_ROOT ?= $(shell pwd)
+export DH_VERBOSE = 1
+
+
+EXTERNAL_ADE_ARCHIVE   := ade-cbe2db61a659c2cc304c3837406f95c39dfa938e
+EXTERNAL_NGRAPH_ARCHIVE :=  ngraph-0.22.0-rc.2
+PREFIX :=      /usr
+LIBDIR :=      lib/${DEB_HOST_MULTIARCH}
+INCDIR :=      include
+SYSCONFDIR := /etc
+DATADIR        :=      $(PREFIX)/share
+
+%:
+       dh $@ --with quilt --parallel
+
+override_dh_auto_configure:
+       cp $(SRC_ROOT)/packaging/$(EXTERNAL_ADE_ARCHIVE).tar.gz $(SRC_ROOT)/inference-engine/thirdparty
+       cp $(SRC_ROOT)/packaging/$(EXTERNAL_NGRAPH_ARCHIVE).tar.gz $(SRC_ROOT)/inference-engine/thirdparty
+       cd $(SRC_ROOT)/inference-engine/thirdparty && \
+                       tar zxf $(EXTERNAL_ADE_ARCHIVE).tar.gz && \
+                       mv $(EXTERNAL_ADE_ARCHIVE)/* ade/
+       cd $(SRC_ROOT)/inference-engine/thirdparty && \
+                       tar zxf $(EXTERNAL_NGRAPH_ARCHIVE).tar.gz && \
+                       mv $(EXTERNAL_NGRAPH_ARCHIVE)/* ngraph/
+       cd $(SRC_ROOT)/inference-engine/thirdparty && \
+                       rm -rf *.tar.gz $(EXTERNAL_ADE_ARCHIVE)
+       cd $(SRC_ROOT)/inference-engine/thirdparty && \
+                       rm -rf *.tar.gz $(EXTERNAL_NGRAPH_ARCHIVE)
+       cd $(SRC_ROOT)/inference-engine && rm -rf build && mkdir -p build
+       cd $(SRC_ROOT)/inference-engine/build && cmake .. \
+                       -DCMAKE_VERBOSE_MAKEFILE=ON -DCMAKE_INSTALL_PREFIX:PATH=$(PREFIX) \
+                       -DCMAKE_INSTALL_LIBDIR:PATH=$(LIBDIR) -DINCLUDE_INSTALL_DIR:PATH=$(INCDIR) \
+                       -DLIB_INSTALL_DIR:PATH=$(LIBDIR) -DSYSCONF_INSTALL_DIR:PATH=$(SYSCONFDIR) \
+                       -DSHARE_INSTALL_PREFIX:PATH=$(DATADIR) \
+                       -DBUILD_SHARED_LIBS:BOOL=ON \
+                       -DUSE_TBB_SYSTEM_DEPS=ON -DBUILD_ADE_DOCUMENTATION=OFF -DBUILD_ADE_TUTORIAL=OFF \
+                       -DBUILD_PKGCONFIG=OFF -DBUILD_SHARED_LIBS=OFF -DBUILD_TESTING=OFF -DBUILD_TESTS=OFF \
+                       -DCLDNN__INCLUDE_EXAMPLES=OFF -DCMAKE_BUILD_TYPE=Release -DCOVERAGE=OFF \
+                       -DDEVELOPMENT_PLUGIN_MODE=OFF -DENABLE_VPU=OFF -DENABLE_ADE_TESTING=OFF \
+                       -DENABLE_AFFINITY_GENERATOR=OFF -DENABLE_ALTERNATIVE_TEMP=OFF -DENABLE_CLDNN=OFF \
+                       -DENABLE_CLDNN_BUILD=OFF -DENABLE_CLDNN_TESTS=OFF -DENABLE_CPPCHECK=OFF -DENABLE_CPPLINT=OFF \
+                       -DENABLE_CPPLINT_REPORT=OFF -DENABLE_CPP_CCT=OFF -DENABLE_DEBUG_SYMBOLS=OFF \
+                       -DENABLE_FUZZING=OFF -DENABLE_GAPI_TESTS=OFF -DENABLE_GNA=OFF -DENABLE_LTO=OFF \
+                       -DENABLE_MKL_DNN=OFF -DENABLE_MYRIAD=OFF -DENABLE_MYRIAD_MVNC_TESTS=OFF -DENABLE_MYRIAD_NO_BOOT=OFF \
+                       -DENABLE_OBJECT_DETECTION_TESTS=ON -DENABLE_OPENCV=OFF -DENABLE_PLUGIN_RPATH=OFF \
+                       -DENABLE_PROFILING_ITT=OFF -DENABLE_PROFILING_RAW=OFF -DENABLE_PYTHON=OFF -DENABLE_ROCKHOPER=OFF \
+                       -DENABLE_SAMPLES=OFF -DENABLE_SAMPLES_CORE=OFF -DENABLE_SEGMENTATION_TESTS=OFF -DENABLE_TESTS=ON \
+                       -DTREAT_WARNING_AS_ERROR=OFF
+
+override_dh_auto_build:
+               dh_auto_build --builddirectory=$(SRC_ROOT)/inference-engine/build --
+
+override_dh_auto_install:
+               mkdir -p $(SRC_ROOT)/debian/tmp$(PREFIX)/$(LIBDIR)
+               mkdir -p $(SRC_ROOT)/debian/tmp$(PREFIX)/$(INCDIR)
+               find $(SRC_ROOT)/inference-engine/bin -name "*.so" -exec install -m 644 {} $(SRC_ROOT)/debian/tmp$(PREFIX)/$(LIBDIR) \;
+               find $(SRC_ROOT)/inference-engine/bin -name "plugins.xml" -exec install -m 644 {} $(SRC_ROOT)/debian/tmp$(PREFIX)/$(LIBDIR) \;
+               cp -r $(SRC_ROOT)/inference-engine/include/* $(SRC_ROOT)/debian/tmp$(PREFIX)/$(INCDIR)
+               find $(SRC_ROOT)/inference-engine/bin -name "*.a" -exec install -m 644 {} $(SRC_ROOT)/debian/tmp$(PREFIX)/$(LIBDIR) \;
+
+override_dh_auto_clean:
+               dh_auto_clean --builddirectory=$(SRC_ROOT)/inference-engine/build --
+               rm -rf $(SRC_ROOT)/inference-engine/bin
+               rm -rf $(SRC_ROOT)/inference-engine/build
+               rm -rf $(SRC_ROOT)/debian/tmp
+               rm -rf $(SRC_ROOT)/inference-engine/thirdparty/ade/*
+               rm -rf $(SRC_ROOT)/inference-engine/thirdparty/ngraph/*
diff --git a/debian/source/format b/debian/source/format
new file mode 100644 (file)
index 0000000..89ae9db
--- /dev/null
@@ -0,0 +1 @@
+3.0 (native)