Files
openvino/cmake/developer_package/packaging/debian.cmake
Ilya Lavrenov 92ef155ed1 Debian packages tests on Azure (#12469)
* Squashed commit of the following:

commit 036a32290ed795326d51dd41d83b891248b0ac05
Merge: db41a71ea9 ee0b67e605
Author: Ilya Lavrenov <ilya.lavrenov@intel.com>
Date:   Tue Aug 9 04:33:54 2022 +0800

    Merge remote-tracking branch 'origin/debian-packages-azure' into debian-on-azure

commit ee0b67e605
Author: Ilya Lavrenov <ilya.lavrenov@intel.com>
Date:   Mon Jul 18 03:31:46 2022 +0800

    test

commit e357eb1428
Author: Ilya Lavrenov <ilya.lavrenov@intel.com>
Date:   Thu Jul 7 02:58:22 2022 +0800

    Test

commit 4635acc497
Author: Ilya Lavrenov <ilya.lavrenov@intel.com>
Date:   Sun Jul 17 22:10:52 2022 +0800

    Azure

commit b1fff55143
Merge: 806ecaefa5 d67d4ce736
Author: Ilya Lavrenov <ilya.lavrenov@intel.com>
Date:   Sun Jul 17 21:28:49 2022 +0800

    Merge branch 'debian-packages' into debian-packages-azure

commit d67d4ce736
Author: Ilya Lavrenov <ilya.lavrenov@intel.com>
Date:   Sun Jul 17 21:28:30 2022 +0800

    Removed commented code

commit 806ecaefa5
Merge: e328c9fc07 4413f0c4a8
Author: Ilya Lavrenov <ilya.lavrenov@intel.com>
Date:   Sun Jul 17 21:24:40 2022 +0800

    Merge branch 'debian-packages' into debian-packages-azure

commit 4413f0c4a8
Author: Ilya Lavrenov <ilya.lavrenov@intel.com>
Date:   Sun Jul 17 21:24:22 2022 +0800

    Fixed python; need to update component name in product config

commit e328c9fc07
Author: Ilya Lavrenov <ilya.lavrenov@intel.com>
Date:   Sun Jul 17 21:23:51 2022 +0800

    Updated .ci

commit cb59bc9563
Author: Ilya Lavrenov <ilya.lavrenov@intel.com>
Date:   Sun Jul 17 15:33:21 2022 +0800

    Updates

commit d733e7aeb5
Merge: 096bdcc9e4 e31018844d
Author: Ilya Lavrenov <ilya.lavrenov@intel.com>
Date:   Sun Jul 17 15:31:26 2022 +0800

    Merge branch 'debian-packages' into debian-packages-azure

commit e31018844d
Author: Ilya Lavrenov <ilya.lavrenov@intel.com>
Date:   Sun Jul 17 15:31:08 2022 +0800

    Some updates

commit b079a9e3a5
Merge: b0f15a8513 6514c213c3
Author: Ilya Lavrenov <ilya.lavrenov@intel.com>
Date:   Sun Jul 17 15:06:59 2022 +0800

    Merge remote-tracking branch 'upstream/master' into debian-packages

commit 096bdcc9e4
Author: Ilya Lavrenov <ilya.lavrenov@intel.com>
Date:   Sun Jul 17 02:59:56 2022 +0800

    CI pipeline with debian

commit 5b1c29a1a3
Author: Ilya Lavrenov <ilya.lavrenov@intel.com>
Date:   Sun Jul 17 02:12:15 2022 +0800

    Test comit

commit b0f15a8513
Author: Ilya Lavrenov <ilya.lavrenov@intel.com>
Date:   Sat Jul 16 18:56:58 2022 +0800

    Fixde tests on Windows

commit 16dc4d8bc0
Author: Ilya Lavrenov <ilya.lavrenov@intel.com>
Date:   Sat Jul 16 15:46:15 2022 +0800

    Try to fix GNA

commit 9801e52322
Author: Ilya Lavrenov <ilya.lavrenov@intel.com>
Date:   Sat Jul 16 14:40:21 2022 +0800

    Update TBB install rules

commit 279f8a8a72
Merge: 9bf178fce0 09f2b5062b
Author: Ilya Lavrenov <ilya.lavrenov@intel.com>
Date:   Sat Jul 16 14:30:15 2022 +0800

    Merge remote-tracking branch 'upstream/master' into debian-packages

commit 9bf178fce0
Author: Ilya Lavrenov <ilya.lavrenov@intel.com>
Date:   Fri Jul 15 21:09:00 2022 +0800

    Fix for debian

commit 7afa431f05
Author: Ilya Lavrenov <ilya.lavrenov@intel.com>
Date:   Fri Jul 15 20:16:09 2022 +0800

    Revert cmake scripts location

commit 9ead76efce
Author: Ilya Lavrenov <ilya.lavrenov@intel.com>
Date:   Fri Jul 15 19:31:08 2022 +0800

    Try to fix TBB finding

commit 6f0da74e2a
Merge: be9e25c6f7 e8310f7e0b
Author: Ilya Lavrenov <ilya.lavrenov@intel.com>
Date:   Fri Jul 15 19:14:50 2022 +0800

    Merge remote-tracking branch 'upstream/master' into debian-packages

commit be9e25c6f7
Merge: c203963548 35a31a329d
Author: Ilya Lavrenov <ilya.lavrenov@intel.com>
Date:   Thu Jul 14 22:44:45 2022 +0800

    Merge remote-tracking branch 'upstream/master' into debian-packages

commit c203963548
Author: Ilya Lavrenov <ilya.lavrenov@intel.com>
Date:   Tue Apr 5 22:29:34 2022 +0300

    Small fixes after self-revew

commit e2f1595c21
Merge: 3bae350d1c c2703c81f6
Author: Ilya Lavrenov <ilya.lavrenov@intel.com>
Date:   Tue Apr 5 22:21:41 2022 +0300

    Merge remote-tracking branch 'upstream/master' into debian-packages

commit 3bae350d1c
Author: Ilya Lavrenov <ilya.lavrenov@intel.com>
Date:   Tue Apr 5 22:17:17 2022 +0300

    Split debian file on common tools and repo specific stuff

commit 8a5bb7fe04
Author: Ilya Lavrenov <ilya.lavrenov@intel.com>
Date:   Tue Apr 5 20:41:45 2022 +0300

    Revert TMP WAs

commit be78da4a88
Merge: d0da7056d0 86495ceb0f
Author: Ilya Lavrenov <ilya.lavrenov@intel.com>
Date:   Tue Apr 5 13:44:49 2022 +0300

    Merge remote-tracking branch 'upstream/master' into debian-packages

commit d0da7056d0
Author: Ilya Lavrenov <ilya.lavrenov@intel.com>
Date:   Sun Apr 3 12:11:33 2022 +0300

    Improvements

commit 69bafd3519
Author: Ilya Lavrenov <ilya.lavrenov@intel.com>
Date:   Sun Apr 3 12:02:25 2022 +0300

    Enabled nlohmann_json from system

commit bdbc7804af
Author: Ilya Lavrenov <ilya.lavrenov@intel.com>
Date:   Sun Apr 3 11:46:19 2022 +0300

    Use nlohmann_jsonConfig from system

commit 0f2e2bbdcb
Author: Ilya Lavrenov <ilya.lavrenov@intel.com>
Date:   Sun Apr 3 11:13:40 2022 +0300

    Tried to use dependencies on system

commit 88415fc133
Author: Ilya Lavrenov <ilya.lavrenov@intel.com>
Date:   Sat Apr 2 19:28:48 2022 +0300

    Try to improve gflags: part 2

commit b8fafcb670
Merge: 56dad4d12a 29fb8c79b1
Author: Ilya Lavrenov <ilya.lavrenov@intel.com>
Date:   Sat Apr 2 19:23:19 2022 +0300

    Merge remote-tracking branch 'upstream/master' into debian-packages

commit 56dad4d12a
Author: Ilya Lavrenov <ilya.lavrenov@intel.com>
Date:   Sat Apr 2 19:23:15 2022 +0300

    Try to improve gflags

commit 81aa7ccc38
Author: Ilya Lavrenov <ilya.lavrenov@intel.com>
Date:   Sat Apr 2 18:08:03 2022 +0300

    Skip TBB component

commit 9446326040
Merge: 610729c716 4fcc18c00e
Author: Ilya Lavrenov <ilya.lavrenov@intel.com>
Date:   Sat Apr 2 11:13:14 2022 +0300

    Merge remote-tracking branch 'upstream/master' into debian-packages

commit 610729c716
Author: Ilya Lavrenov <ilya.lavrenov@intel.com>
Date:   Fri Apr 1 19:36:10 2022 +0300

    fixed TBB

commit 1930daa580
Merge: fc37de4382 2388f3b976
Author: Ilya Lavrenov <ilya.lavrenov@intel.com>
Date:   Fri Apr 1 19:04:19 2022 +0300

    Merge remote-tracking branch 'upstream/master' into debian-packages

commit fc37de4382
Merge: c2ea71e45d d3060d4bcc
Author: Ilya Lavrenov <ilya.lavrenov@intel.com>
Date:   Thu Mar 31 21:08:44 2022 +0300

    Merge remote-tracking branch 'upstream/master' into debian-packages

commit c2ea71e45d
Merge: aeebfeba92 9fa5150d71
Author: Ilya Lavrenov <ilya.lavrenov@intel.com>
Date:   Wed Mar 30 13:42:44 2022 +0300

    Merge remote-tracking branch 'upstream/master' into debian-packages

commit aeebfeba92
Merge: e65d2e8097 30ec7366bb
Author: Ilya Lavrenov <ilya.lavrenov@intel.com>
Date:   Mon Mar 28 20:06:38 2022 +0300

    Merge remote-tracking branch 'upstream/master' into debian-packages

commit e65d2e8097
Author: Ilya Lavrenov <ilya.lavrenov@intel.com>
Date:   Sat Mar 26 13:55:52 2022 +0300

    Reverted OV_CPACK_COMPILER_IS_CLANG

commit 8cf4d15d4d
Merge: 2639adb686 aded1a2c70
Author: Ilya Lavrenov <ilya.lavrenov@intel.com>
Date:   Sat Mar 26 13:53:40 2022 +0300

    Merge remote-tracking branch 'upstream/master' into debian-packages

commit 2639adb686
Merge: cebdf3f92a a2705b1fed
Author: Ilya Lavrenov <ilya.lavrenov@intel.com>
Date:   Fri Mar 25 15:18:48 2022 +0300

    Merge remote-tracking branch 'upstream/master' into debian-packages

commit cebdf3f92a
Merge: 7ded4663d0 e3098ece7e
Author: Ilya Lavrenov <ilya.lavrenov@intel.com>
Date:   Fri Mar 18 18:08:10 2022 +0300

    Merge remote-tracking branch 'upstream/master' into debian-packages

commit 7ded4663d0
Merge: ab92bd6c13 6b22d0d109
Author: Ilya Lavrenov <ilya.lavrenov@intel.com>
Date:   Fri Feb 18 19:51:47 2022 +0300

    Merge remote-tracking branch 'upstream/master' into debian-packages

commit ab92bd6c13
Author: Ilya Lavrenov <ilya.lavrenov@intel.com>
Date:   Fri Feb 18 19:48:07 2022 +0300

    added versions via -

commit 1f4f71a498
Merge: f3825b8d9d 07f0966e62
Author: Ilya Lavrenov <ilya.lavrenov@intel.com>
Date:   Fri Feb 18 19:29:31 2022 +0300

    Merge branch 'tf-brick-3' into debian-packages

commit f3825b8d9d
Author: Ilya Lavrenov <ilya.lavrenov@intel.com>
Date:   Fri Feb 18 19:05:20 2022 +0300

    Used standard dir for OV_CPACK_TOOLSDIR

commit 466c5c055c
Merge: 6d57fc75a3 d2177cf177
Author: Ilya Lavrenov <ilya.lavrenov@intel.com>
Date:   Fri Feb 18 18:47:36 2022 +0300

    Merge remote-tracking branch 'upstream/master' into debian-packages

commit 07f0966e62
Author: Ilya Lavrenov <ilya.lavrenov@intel.com>
Date:   Fri Feb 18 15:02:29 2022 +0300

    Revert "repair TF FE tests after build (#10432)"

    This reverts commit 306b7611d9.

commit 6d57fc75a3
Merge: 697b0190e3 61f657795c
Author: Ilya Lavrenov <ilya.lavrenov@intel.com>
Date:   Fri Feb 18 14:30:26 2022 +0300

    Merge remote-tracking branch 'upstream/master' into debian-packages

commit 697b0190e3
Author: Ilya Lavrenov <ilya.lavrenov@intel.com>
Date:   Wed Feb 16 20:00:45 2022 +0300

    Fixed package name

commit 8bd9368f6e
Author: Ilya Lavrenov <ilya.lavrenov@intel.com>
Date:   Wed Feb 16 19:37:55 2022 +0300

    Tuned locations

commit 61f09a2f3e
Author: Ilya Lavrenov <ilya.lavrenov@intel.com>
Date:   Wed Feb 16 19:24:42 2022 +0300

    Fixed cmake stage

commit 4519f0fc06
Author: Ilya Lavrenov <ilya.lavrenov@intel.com>
Date:   Wed Feb 16 19:07:41 2022 +0300

    Split packaging into common and debian part

commit a6b3259e38
Author: Ilya Lavrenov <ilya.lavrenov@intel.com>
Date:   Wed Feb 16 18:27:22 2022 +0300

    Renaming

commit 694581c317
Author: Ilya Lavrenov <ilya.lavrenov@intel.com>
Date:   Wed Feb 16 18:20:44 2022 +0300

    Parametrize installation paths

commit d693205c40
Merge: 5047fc8667 abeb910ce2
Author: Ilya Lavrenov <ilya.lavrenov@intel.com>
Date:   Wed Feb 16 17:34:11 2022 +0300

    Merge remote-tracking branch 'upstream/master' into debian-packages

commit 5047fc8667
Merge: ee8cdf3b12 317b956d2e
Author: Ilya Lavrenov <ilya.lavrenov@intel.com>
Date:   Tue Feb 15 18:49:52 2022 +0300

    Merge remote-tracking branch 'upstream/master' into debian-packages

commit ee8cdf3b12
Author: Ilya Lavrenov <ilya.lavrenov@intel.com>
Date:   Tue Feb 15 18:49:23 2022 +0300

    Removed custom MYRIAD kernels

commit 5c1db8f9f8
Author: Ilya Lavrenov <ilya.lavrenov@intel.com>
Date:   Tue Feb 15 18:26:58 2022 +0300

    Disabled versioning for now

commit f305376469
Author: Ilya Lavrenov <ilya.lavrenov@intel.com>
Date:   Tue Feb 15 17:12:24 2022 +0300

    System TBB

commit fcc455e18e
Author: Ilya Lavrenov <ilya.lavrenov@intel.com>
Date:   Tue Feb 15 16:35:40 2022 +0300

    Improvements

commit a2dc0275a3
Merge: de9cb7c102 e168c9b1c3
Author: Ilya Lavrenov <ilya.lavrenov@intel.com>
Date:   Tue Feb 15 14:14:54 2022 +0300

    Merge remote-tracking branch 'upstream/master' into debian-packages

commit de9cb7c102
Author: Ilya Lavrenov <ilya.lavrenov@intel.com>
Date:   Tue Feb 15 14:14:36 2022 +0300

    Self-review

commit df794a493a
Merge: 85e01e8b4c 68c390f679
Author: Ilya Lavrenov <ilya.lavrenov@intel.com>
Date:   Tue Feb 15 13:35:32 2022 +0300

    Merge remote-tracking branch 'upstream/master' into debian-packages

commit 85e01e8b4c
Merge: f637f8fbc4 a875f6ed9c
Author: Ilya Lavrenov <ilya.lavrenov@intel.com>
Date:   Tue Feb 15 12:55:25 2022 +0300

    Merge remote-tracking branch 'upstream/master' into debian-packages

commit f637f8fbc4
Merge: db2e5d348e 3a5d821219
Author: Ilya Lavrenov <ilya.lavrenov@intel.com>
Date:   Mon Feb 14 19:29:34 2022 +0300

    Merge remote-tracking branch 'upstream/master' into debian-packages

commit db2e5d348e
Merge: 78073f53ca ac2e639ff8
Author: Ilya Lavrenov <ilya.lavrenov@intel.com>
Date:   Mon Feb 14 18:25:05 2022 +0300

    Merge remote-tracking branch 'upstream/master' into debian-packages

commit 78073f53ca
Author: Ilya Lavrenov <ilya.lavrenov@intel.com>
Date:   Thu Jan 13 16:37:54 2022 +0300

    Automatic triplet generation; added SOVERSION

commit 2267703a55
Merge: 91b67538ca b7e8ef910d
Author: Ilya Lavrenov <ilya.lavrenov@intel.com>
Date:   Thu Jan 13 16:01:38 2022 +0300

    Merge remote-tracking branch 'upstream/master' into debian-packages

commit 91b67538ca
Author: Ilya Lavrenov <ilya.lavrenov@intel.com>
Date:   Thu Jan 13 01:09:30 2022 +0300

    Added both version and soversion

commit c19ecf16a8
Merge: fc449e76dc ab09135195
Author: Ilya Lavrenov <ilya.lavrenov@intel.com>
Date:   Tue Jan 11 18:29:46 2022 +0300

    Merge remote-tracking branch 'upstream/master' into debian-packages

commit fc449e76dc
Author: Ilya Lavrenov <ilya.lavrenov@intel.com>
Date:   Mon Dec 27 20:17:22 2021 +0300

    removed if target

commit 52638ac629
Author: Ilya Lavrenov <ilya.lavrenov@intel.com>
Date:   Mon Dec 27 20:13:01 2021 +0300

    location for DM

commit dd8f0ffaf4
Author: Ilya Lavrenov <ilya.lavrenov@intel.com>
Date:   Mon Dec 27 19:55:04 2021 +0300

    Fixed complation of private plugins

commit 140472f436
Author: Ilya Lavrenov <ilya.lavrenov@intel.com>
Date:   Mon Dec 27 18:40:44 2021 +0300

    Enable FHS even for non-debian packages

commit f461859cfe
Merge: e603fcf8af f565e0f854
Author: Ilya Lavrenov <ilya.lavrenov@intel.com>
Date:   Mon Dec 27 18:34:31 2021 +0300

    Merge remote-tracking branch 'upstream/master' into debian-packages

commit e603fcf8af
Author: Ilya Lavrenov <ilya.lavrenov@intel.com>
Date:   Mon Dec 27 18:34:20 2021 +0300

    Install location for plugins and python

commit 1ae71e993d
Merge: 5c2b9a97d5 ab10057371
Author: Ilya Lavrenov <ilya.lavrenov@intel.com>
Date:   Mon Dec 27 17:53:48 2021 +0300

    Merge remote-tracking branch 'upstream/master' into debian-packages

commit 5c2b9a97d5
Author: Ilya Lavrenov <ilya.lavrenov@intel.com>
Date:   Mon Dec 27 17:53:30 2021 +0300

    Fixed for debian packaging

commit ab53b80e56
Merge: 043768808c 4188dbbf9f
Author: Ilya Lavrenov <ilya.lavrenov@intel.com>
Date:   Mon Dec 27 16:06:40 2021 +0300

    Merge remote-tracking branch 'upstream/master' into debian-packages

commit 043768808c
Merge: cd44300742 2514c0ef38
Author: Ilya Lavrenov <ilya.lavrenov@intel.com>
Date:   Thu Dec 16 16:05:24 2021 +0300

    Merge remote-tracking branch 'upstream/master' into debian-packages

commit cd44300742
Author: Ilya Lavrenov <ilya.lavrenov@intel.com>
Date:   Tue Dec 14 01:52:30 2021 +0300

    Fixes

commit c97ce1ef60
Author: Ilya Lavrenov <ilya.lavrenov@intel.com>
Date:   Tue Dec 14 01:40:50 2021 +0300

    Created virtual packages

commit 680a11ee2d
Author: Ilya Lavrenov <ilya.lavrenov@intel.com>
Date:   Mon Dec 13 16:19:49 2021 +0300

    Added more files to core component for DEBIAN generator

commit 9b454a00de
Merge: 394e600fed 5124d95df7
Author: Ilya Lavrenov <ilya.lavrenov@intel.com>
Date:   Mon Dec 13 15:30:55 2021 +0300

    Merge remote-tracking branch 'upstream/master' into debian-packages

commit 394e600fed
Merge: 74504d011f 562d388ad9
Author: Ilya Lavrenov <ilya.lavrenov@intel.com>
Date:   Fri Dec 10 17:50:30 2021 +0300

    Merge remote-tracking branch 'upstream/master' into debian-packages

commit 74504d011f
Merge: aabd31a3a5 0c68574aa7
Author: Ilya Lavrenov <ilya.lavrenov@intel.com>
Date:   Fri Dec 10 14:25:47 2021 +0300

    Merge remote-tracking branch 'upstream/master' into debian-packages

commit aabd31a3a5
Merge: 95bbc6f1e8 92760949bf
Author: Ilya Lavrenov <ilya.lavrenov@intel.com>
Date:   Wed Dec 8 18:06:01 2021 +0300

    Merge remote-tracking branch 'upstream/master' into debian-packages

commit 95bbc6f1e8
Merge: b4b5149e84 f734e7679b
Author: Ilya Lavrenov <ilya.lavrenov@intel.com>
Date:   Wed Dec 8 14:53:12 2021 +0300

    Merge remote-tracking branch 'upstream/master' into debian-packages

commit b4b5149e84
Author: Ilya Lavrenov <ilya.lavrenov@intel.com>
Date:   Tue Dec 7 19:19:58 2021 +0300

    Last fixes

commit 311529ce50
Author: Ilya Lavrenov <ilya.lavrenov@intel.com>
Date:   Mon Dec 6 19:47:35 2021 +0300

    Works

commit 746f91c8e8
Author: Ilya Lavrenov <ilya.lavrenov@intel.com>
Date:   Mon Dec 6 18:42:54 2021 +0300

    Ntext iteration

commit c6d9b58b2a
Author: Ilya Lavrenov <ilya.lavrenov@intel.com>
Date:   Mon Dec 6 14:29:53 2021 +0300

    Fixes after merge with master

commit 64c633d8fe
Merge: 29252a7d96 d27720777c
Author: Ilya Lavrenov <ilya.lavrenov@intel.com>
Date:   Mon Dec 6 14:20:40 2021 +0300

    Merge remote-tracking branch 'upstream/master' into debian-packages

commit 29252a7d96
Author: Ilya Lavrenov <ilya.lavrenov@intel.com>
Date:   Sun Dec 5 20:50:19 2021 +0300

    Improvements

commit c13d7795ef
Author: Ilya Lavrenov <ilya.lavrenov@intel.com>
Date:   Sun Dec 5 19:45:01 2021 +0300

    Debian packages are generated

commit 61f36feb97
Author: Ilya Lavrenov <ilya.lavrenov@intel.com>
Date:   Sat Dec 4 22:00:11 2021 +0300

    Removed samples_deps, demo_scripts component

commit e67a46cc3e
Author: Ilya Lavrenov <ilya.lavrenov@intel.com>
Date:   Fri Dec 3 18:48:43 2021 +0300

    Start point for debian packages

commit 0ab57298f8
Author: Ilya Lavrenov <ilya.lavrenov@intel.com>
Date:   Fri Dec 3 13:10:17 2021 +0300

    Export frontend_common as dev target

* Improvements

* Fixed aizre scripts

* Revert "Fixed MINOR version"

This reverts commit aa391a94bd6e488e27dbb830403e6531dcdc7a19.

* Try to parametrize linux.yml

* Tests

* Fixes

* Fixed commands

* Disabled test

* Fixes

* Fixed typo

* Try to enable debian packages on CI

* One more iteration

* Fixes

* Fixed tensorflow tests

* Explicit debian pipeline

* Fixes

* Skipped ov_core_read_model_from_memory
2022-08-12 00:07:21 +04:00

274 lines
9.9 KiB
CMake

# Copyright (C) 2018-2022 Intel Corporation
# SPDX-License-Identifier: Apache-2.0
#
include(GNUInstallDirs)
#
# ov_debian_cpack_set_dirs()
#
# Set directories for cpack
#
macro(ov_debian_cpack_set_dirs)
# override default locations for Debian
set(OV_CPACK_TOOLSDIR ${CMAKE_INSTALL_BINDIR}) # only C++ tools are here
set(OV_CPACK_INCLUDEDIR ${CMAKE_INSTALL_INCLUDEDIR})
set(OV_CPACK_LIBRARYDIR ${CMAKE_INSTALL_LIBDIR})
set(OV_CPACK_RUNTIMEDIR ${CMAKE_INSTALL_LIBDIR})
set(OV_CPACK_ARCHIVEDIR ${CMAKE_INSTALL_LIBDIR})
set(OV_CPACK_PLUGINSDIR ${CMAKE_INSTALL_LIBDIR}/openvino-${OpenVINO_VERSION})
set(OV_CPACK_IE_CMAKEDIR ${CMAKE_INSTALL_LIBDIR}/cmake/inferenceengine${OpenVINO_VERSION})
set(OV_CPACK_NGRAPH_CMAKEDIR ${CMAKE_INSTALL_LIBDIR}/cmake/ngraph${OpenVINO_VERSION})
set(OV_CPACK_OPENVINO_CMAKEDIR ${CMAKE_INSTALL_LIBDIR}/cmake/openvino${OpenVINO_VERSION})
set(OV_CPACK_DOCDIR ${CMAKE_INSTALL_DATADIR}/doc/openvino-${OpenVINO_VERSION})
# non-native stuff
set(OV_CPACK_PYTHONDIR ${OV_CPACK_PLUGINSDIR})
set(OV_CPACK_SHAREDIR ${CMAKE_INSTALL_DATADIR}/openvino-${OpenVINO_VERSION}) # internal
set(OV_CPACK_SAMPLESDIR ${OV_CPACK_SHAREDIR}/samples)
set(OV_CPACK_DEVREQDIR ${OV_CPACK_SHAREDIR})
unset(OV_CPACK_SHAREDIR)
# skipped during debian packaging
set(OV_CPACK_WHEELSDIR "tools")
# for BW compatibility
set(IE_CPACK_LIBRARY_PATH ${OV_CPACK_LIBRARYDIR})
set(IE_CPACK_RUNTIME_PATH ${OV_CPACK_RUNTIMEDIR})
set(IE_CPACK_ARCHIVE_PATH ${OV_CPACK_ARCHIVEDIR})
endmacro()
ov_debian_cpack_set_dirs()
#
# Override CPack components name for Debian generator
# This is needed to change the granularity, i.e. merge several components
# into a single one
#
macro(ov_override_component_names)
# merge C++ and C runtimes
set(OV_CPACK_COMP_CORE_C "${OV_CPACK_COMP_CORE}")
set(OV_CPACK_COMP_CORE_C_DEV "${OV_CPACK_COMP_CORE_DEV}")
# merge all pythons into a single component
set(OV_CPACK_COMP_PYTHON_OPENVINO "pyopenvino")
set(OV_CPACK_COMP_PYTHON_IE_API "${OV_CPACK_COMP_PYTHON_OPENVINO}")
set(OV_CPACK_COMP_PYTHON_NGRAPH "${OV_CPACK_COMP_PYTHON_OPENVINO}")
# merge all C / C++ samples as a single samples component
set(OV_CPACK_COMP_CPP_SAMPLES "samples")
set(OV_CPACK_COMP_C_SAMPLES "${OV_CPACK_COMP_CPP_SAMPLES}")
# set(OV_CPACK_COMP_PYTHON_SAMPLES "${OV_CPACK_COMP_CPP_SAMPLES}")
# move requirements.txt to core-dev
set(OV_CPACK_COMP_DEV_REQ_FILES "${OV_CPACK_COMP_CORE_DEV}")
# move core_tools to core-dev
set(OV_CPACK_COMP_CORE_TOOLS "${OV_CPACK_COMP_CORE_DEV}")
endmacro()
ov_override_component_names()
#
# Common Debian specific settings
#
macro(ov_debian_specific_settings)
# multiple packages are generated
set(CPACK_DEB_COMPONENT_INSTALL ON)
# automatically find dependencies for binaries
set(CPACK_DEBIAN_PACKAGE_SHLIBDEPS ON)
# enable dependencies between components
set(CPACK_DEBIAN_ENABLE_COMPONENT_DEPENDS ON)
# control file permissions
set(CPACK_DEBIAN_PACKAGE_CONTROL_STRICT_PERMISSION OFF)
# homepage
set(CPACK_DEBIAN_PACKAGE_HOMEPAGE "https://docs.openvino.ai/")
# enable for debug cpack run
if(NOT DEFINED CPACK_DEBIAN_PACKAGE_DEBUG)
set(CPACK_DEBIAN_PACKAGE_DEBUG OFF)
endif()
# WA: dpkg-shlibdeps requires folder with libraries
# proper way is to use -l (path to libs) and -L (path to shlibs) for other already installed components
# but it requires CMake source code changes
# with current WA automatic deps detection via dpkg-shlibdeps for "our libraries"
# is ignored; but dependencies between our components are here because of
# CPACK_COMPONENT_<UCOMP>_DEPENDS variables
# More proper WA is try to enable INSTALL_RPATH
if(DEFINED CMAKE_LIBRARY_OUTPUT_DIRECTORY)
set(CPACK_DEBIAN_PACKAGE_SHLIBDEPS_PRIVATE_DIRS "${CMAKE_LIBRARY_OUTPUT_DIRECTORY}")
else()
message(FATAL_ERROR "CMAKE_LIBRARY_OUTPUT_DIRECTORY is empty")
endif()
# automatic dependencies discovering between openvino and user packages
set(CPACK_DEBIAN_PACKAGE_GENERATE_SHLIBS ON)
# OpenVINO does not have backward and forward compatibility
set(CPACK_DEBIAN_PACKAGE_GENERATE_SHLIBS_POLICY "=")
# naming convention for debian package files
set(CPACK_DEBIAN_FILE_NAME "DEB-DEFAULT")
# need to update this version once we rebuild the same package with additional fixes
# set(CPACK_DEBIAN_PACKAGE_RELEASE "1")
# enable this if someday we change the version scheme
# set(CPACK_DEBIAN_PACKAGE_EPOCH "2")
endmacro()
ov_debian_specific_settings()
# needed to override cmake auto generated files
set(def_postinst "${OpenVINO_BINARY_DIR}/_CPack_Packages/postinst")
set(def_postrm "${OpenVINO_BINARY_DIR}/_CPack_Packages/postrm")
set(def_triggers "${OpenVINO_BINARY_DIR}/_CPack_Packages/triggers")
set(triggers_content "activate-noawait ldconfig\n\n")
set(post_content "#!/bin/sh\n\nset -e;\nset -e\n\n")
file(REMOVE ${def_postinst} ${def_postrm} ${def_triggers})
file(WRITE "${def_postinst}" "${post_content}")
file(WRITE "${def_postrm}" "${post_content}")
file(WRITE "${def_triggers}" "${triggers_content}")
#
# Functions helpful for packaging your modules with Debian cpack
#
#
# ov_debian_add_changelog_and_copyright(<comp name>)
#
function(ov_debian_add_changelog_and_copyright comp)
string(TOUPPER "${comp}" ucomp)
if(NOT DEFINED CPACK_DEBIAN_${ucomp}_PACKAGE_NAME)
message(FATAL_ERROR "CPACK_DEBIAN_${ucomp}_PACKAGE_NAME is not defined")
else()
set(package_name "${CPACK_DEBIAN_${ucomp}_PACKAGE_NAME}")
endif()
set(package_name "${CPACK_DEBIAN_${ucomp}_PACKAGE_NAME}")
# copyright
install(FILES "${OpenVINO_SOURCE_DIR}/cmake/developer_package/packaging/copyright"
DESTINATION ${CMAKE_INSTALL_DATADIR}/doc/${package_name}/
COMPONENT ${comp})
# create changelog.gz
find_host_program(gzip_PROGRAM NAMES gzip DOC "Path to gzip tool")
if(NOT gzip_PROGRAM)
message(FATAL_ERROR "Failed to find gzip tool")
endif()
set(changelog_src "${OpenVINO_SOURCE_DIR}/cmake/developer_package/packaging/changelog")
set(package_bin_dir "${OpenVINO_BINARY_DIR}/_CPack_Packages/${package_name}")
set(changelog_output "${package_bin_dir}/changelog")
file(REMOVE "${changelog_output}")
file(REMOVE "${changelog_output}.gz")
file(MAKE_DIRECTORY "${package_bin_dir}")
configure_file("${changelog_src}" "${changelog_output}" COPYONLY)
execute_process(COMMAND gzip -n -9 "${changelog_output}"
WORKING_DIRECTORY "${package_bin_dir}"
OUTPUT_VARIABLE output_message
ERROR_VARIABLE error_message
RESULT_VARIABLE exit_code
OUTPUT_STRIP_TRAILING_WHITESPACE)
# install changelog.gz
install(FILES "${changelog_output}.gz"
DESTINATION ${CMAKE_INSTALL_DATADIR}/doc/${package_name}/
COMPONENT ${comp})
endfunction()
#
# ov_debian_add_lintian_suppression(<comp name> <suppression1, suppression2, ...>)
#
function(ov_debian_add_lintian_suppression comp)
set(lines ${ARGN})
string(TOUPPER "${comp}" ucomp)
if(NOT DEFINED CPACK_DEBIAN_${ucomp}_PACKAGE_NAME)
message(FATAL_ERROR "CPACK_DEBIAN_${ucomp}_PACKAGE_NAME is not defined")
else()
set(package_name "${CPACK_DEBIAN_${ucomp}_PACKAGE_NAME}")
endif()
foreach(line IN LISTS lines)
set(line "${package_name} binary: ${line}")
if(content)
set(content "${content}\n${line}")
else()
set(content "${line}")
endif()
endforeach()
set(lintian_override_file "${OpenVINO_BINARY_DIR}/_CPack_Packages/lintian/${package_name}")
file(REMOVE ${lintian_override_file})
file(WRITE ${lintian_override_file} ${content})
install(FILES ${lintian_override_file}
DESTINATION ${CMAKE_INSTALL_DATADIR}/lintian/overrides/
COMPONENT ${comp})
endfunction()
#
# ov_debian_generate_conflicts(<comp name>)
#
function(ov_debian_generate_conflicts comp)
set(cpack_name_versions ${ARGN})
string(TOUPPER "${comp}" ucomp)
# sanity check
if(NOT DEFINED CPACK_DEBIAN_${ucomp}_PACKAGE_NAME)
message(FATAL_ERROR "CPACK_DEBIAN_${ucomp}_PACKAGE_NAME is not defined")
else()
if(NOT DEFINED cpack_name_ver)
message(FATAL_ERROR "Internal variable 'cpack_name_ver' is not defined")
endif()
string(REPLACE "${cpack_name_ver}" "" package_name_base "${CPACK_DEBIAN_${ucomp}_PACKAGE_NAME}")
endif()
foreach(cpack_name_version IN LISTS cpack_name_versions)
if(package_names)
set(package_names "${package_names}, ${package_name_base}${cpack_name_version}")
else()
set(package_names "${package_name_base}${cpack_name_version}")
endif()
endforeach()
set(CPACK_DEBIAN_${ucomp}_PACKAGE_CONFLICTS "${package_names}" PARENT_SCOPE)
endfunction()
#
# ov_debian_add_latest_component(<comp>)
#
# Adds latest component for `comp`, but without a version
# Description and other stuff (arch) is taken from the main component
#
macro(ov_debian_add_latest_component comp)
string(TOUPPER "${comp}" ucomp)
set(comp_name "${comp}_latest")
set(upper_case "${ucomp}_LATEST")
set(CPACK_COMPONENT_${upper_case}_DESCRIPTION "${CPACK_COMPONENT_${ucomp}_DESCRIPTION}")
set(CPACK_COMPONENT_${upper_case}_ARCHITECTURE "${CPACK_COMPONENT_${ucomp}_ARCHITECTURE}")
set(CPACK_COMPONENT_${upper_case}_DEPENDS "${ucomp}")
# take package name
if(DEFINED CPACK_DEBIAN_${ucomp}_PACKAGE_NAME)
string(REPLACE "-${cpack_name_ver}" ""
CPACK_DEBIAN_${upper_case}_PACKAGE_NAME
"${CPACK_DEBIAN_${ucomp}_PACKAGE_NAME}")
else()
message(FATAL_ERROR "CPACK_DEBIAN_${ucomp}_PACKAGE_NAME is not defined")
endif()
ov_debian_add_lintian_suppression(${comp_name}
# it's umbrella package
"empty-binary-package")
# add latest to a list of debian packages
list(APPEND CPACK_COMPONENTS_ALL ${comp_name})
endmacro()