mirror of
https://github.com/intel/compute-runtime.git
synced 2026-01-05 09:09:04 +08:00
build: align deb packaging to packages provided by ubuntu 24.04
Related-To: NEO-11423 Signed-off-by: Pawel Cieslak <pawel.cieslak@intel.com>
This commit is contained in:
committed by
Compute-Runtime-Automation
parent
f29d43ac70
commit
c09d077621
@@ -1,132 +0,0 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
#
|
||||
# Copyright (C) 2021-2024 Intel Corporation
|
||||
#
|
||||
# SPDX-License-Identifier: MIT
|
||||
#
|
||||
|
||||
set -ex
|
||||
|
||||
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
|
||||
REPO_DIR="$( cd "$( dirname "${DIR}/../../../../" )" && pwd )"
|
||||
|
||||
BUILD_DIR="${REPO_DIR}/../build_l0_gpu_driver"
|
||||
NEO_SKIP_UNIT_TESTS=${NEO_SKIP_UNIT_TESTS:-FALSE}
|
||||
NEO_DISABLE_BUILTINS_COMPILATION=${NEO_DISABLE_BUILTINS_COMPILATION:-FALSE}
|
||||
SPEC_FILE="${SPEC_FILE:-${OS_TYPE}}"
|
||||
|
||||
BRANCH_SUFFIX="$( cat ${REPO_DIR}/.branch )"
|
||||
|
||||
ENABLE_L0_GPU_DRIVER="${ENABLE_L0_GPU_DRIVER:-1}"
|
||||
if [ "${ENABLE_L0_GPU_DRIVER}" == "0" ]; then
|
||||
exit 0
|
||||
fi
|
||||
|
||||
LOG_CCACHE_STATS="${LOG_CCACHE_STATS:-0}"
|
||||
|
||||
export BUILD_ID="${BUILD_ID:-1}"
|
||||
export CMAKE_BUILD_TYPE="${CMAKE_BUILD_TYPE:-Release}"
|
||||
|
||||
source "${REPO_DIR}/scripts/packaging/${BRANCH_SUFFIX}/functions.sh"
|
||||
source "${REPO_DIR}/scripts/packaging/${BRANCH_SUFFIX}/l0_gpu_driver/l0_gpu_driver.sh"
|
||||
|
||||
get_api_version # API_VERSION-API_VERSION_SRC and API_DEB_MODEL_LINK
|
||||
get_l0_gpu_driver_version # NEO_L0_VERSION_MAJOR.NEO_L0_VERSION_MINOR.NEO_L0_VERSION_PATCH.NEO_L0_VERSION_HOTFIX
|
||||
|
||||
if [ -z "${BRANCH_SUFFIX}" ]; then
|
||||
VERSION="${NEO_L0_VERSION_MAJOR}.${NEO_L0_VERSION_MINOR}.${NEO_L0_VERSION_PATCH}-${NEO_L0_VERSION_HOTFIX}${API_DEB_MODEL_LINK}"
|
||||
else
|
||||
VERSION="${NEO_L0_VERSION_MAJOR}.${NEO_L0_VERSION_MINOR}.${NEO_L0_VERSION_PATCH}${API_VERSION}-${NEO_L0_VERSION_HOTFIX}${API_VERSION_SRC}${API_DEB_MODEL_LINK}"
|
||||
fi
|
||||
|
||||
PKG_VERSION=${VERSION}
|
||||
|
||||
if [ "${CMAKE_BUILD_TYPE}" != "Release" ]; then
|
||||
PKG_VERSION="${PKG_VERSION}+$(echo "$CMAKE_BUILD_TYPE" | tr '[:upper:]' '[:lower:]')1"
|
||||
fi
|
||||
|
||||
rm -rf $BUILD_DIR
|
||||
mkdir -p $BUILD_DIR/debian
|
||||
|
||||
COPYRIGHT="${REPO_DIR}/scripts/packaging/${BRANCH_SUFFIX}/l0_gpu_driver/${SPEC_FILE}/copyright"
|
||||
CONTROL="${REPO_DIR}/scripts/packaging/${BRANCH_SUFFIX}/l0_gpu_driver/${SPEC_FILE}/control"
|
||||
SHLIBS="${REPO_DIR}/scripts/packaging/${BRANCH_SUFFIX}/l0_gpu_driver/${SPEC_FILE}/shlibs.local"
|
||||
|
||||
cp -pR ${REPO_DIR}/scripts/packaging/l0_gpu_driver/${SPEC_FILE}/debian/* $BUILD_DIR/debian/
|
||||
cp $COPYRIGHT $BUILD_DIR/debian/
|
||||
cp $CONTROL $BUILD_DIR/debian/
|
||||
if [ -f "${SHLIBS}" ]; then
|
||||
cp $SHLIBS $BUILD_DIR/debian/
|
||||
fi
|
||||
|
||||
LEVEL_ZERO_DEVEL_NAME=${LEVEL_ZERO_DEVEL_NAME:-level-zero-devel}
|
||||
|
||||
LEVEL_ZERO_DEVEL_VERSION=$(apt-cache policy ${LEVEL_ZERO_DEVEL_NAME} | grep Installed | cut -f2- -d ':' | xargs)
|
||||
if [ ! -z "${LEVEL_ZERO_DEVEL_VERSION}" ]; then
|
||||
perl -pi -e "s/^ level-zero-devel(?=,|$)/ ${LEVEL_ZERO_DEVEL_NAME} (=$LEVEL_ZERO_DEVEL_VERSION)/" "$BUILD_DIR/debian/control"
|
||||
fi
|
||||
|
||||
if [ -z "${BRANCH_SUFFIX}" ]; then
|
||||
GMM_VERSION=$(apt-cache policy libigdgmm12 | grep Installed | cut -f2- -d ':' | xargs)
|
||||
if [ ! -z "${GMM_VERSION}" ]; then
|
||||
perl -pi -e "s/^ libigdgmm12(?=,|$)/ libigdgmm12 (>=$GMM_VERSION)/" "$BUILD_DIR/debian/control"
|
||||
fi
|
||||
GMM_DEVEL_VERSION=$(apt-cache policy libigdgmm-dev | grep Installed | cut -f2- -d ':' | xargs)
|
||||
if [ ! -z "${GMM_DEVEL_VERSION}" ]; then
|
||||
perl -pi -e "s/^ libigdgmm-dev(?=,|$)/ libigdgmm-dev (>=$GMM_DEVEL_VERSION)/" "$BUILD_DIR/debian/control"
|
||||
fi
|
||||
|
||||
IGC_VERSION=$(apt-cache policy intel-igc-core | grep Installed | cut -f2- -d ':' | xargs)
|
||||
if [ ! -z "${IGC_VERSION}" ]; then
|
||||
perl -pi -e "s/^ intel-igc-core(?=,|$)/ intel-igc-core (=$IGC_VERSION)/" "$BUILD_DIR/debian/control"
|
||||
fi
|
||||
fi
|
||||
|
||||
# Update rules file with new version
|
||||
perl -pi -e "s/^ver = .*/ver = $NEO_L0_VERSION_PATCH/" $BUILD_DIR/debian/rules
|
||||
perl -pi -e "s/^ver_hf = .*/ver_hf = $NEO_L0_VERSION_HOTFIX/" $BUILD_DIR/debian/rules
|
||||
|
||||
#needs a top level CMAKE file
|
||||
cat << EOF | tee $BUILD_DIR/CMakeLists.txt
|
||||
cmake_minimum_required (VERSION 3.13.0 FATAL_ERROR)
|
||||
|
||||
project(neo)
|
||||
|
||||
add_subdirectory($REPO_DIR neo)
|
||||
EOF
|
||||
|
||||
(
|
||||
cd $BUILD_DIR
|
||||
if [ "${LOG_CCACHE_STATS}" == "1" ]; then
|
||||
ccache -z
|
||||
fi
|
||||
export DEB_BUILD_OPTIONS="nodocs notest nocheck"
|
||||
export DH_VERBOSE=1
|
||||
if [ "${CMAKE_BUILD_TYPE}" != "Release" ]; then
|
||||
export DH_INTERNAL_BUILDFLAGS=1
|
||||
fi
|
||||
if [ "${ENABLE_ULT}" == "0" ]; then
|
||||
NEO_SKIP_UNIT_TESTS="TRUE"
|
||||
fi
|
||||
if [ "${TARGET_ARCH}" == "aarch64" ]; then
|
||||
NEO_SKIP_UNIT_TESTS="TRUE"
|
||||
export NEO_DISABLE_BUILTINS_COMPILATION="TRUE"
|
||||
fi
|
||||
export NEO_DISABLE_BUILTINS_COMPILATION
|
||||
export NEO_SKIP_UNIT_TESTS
|
||||
|
||||
dch -v ${PKG_VERSION} -m "build $PKG_VERSION"
|
||||
ulimit -n 65535 || true
|
||||
dpkg-buildpackage -j`nproc --all` -us -uc -b -rfakeroot
|
||||
sudo dpkg -i --force-depends ../*.deb
|
||||
if [ "${LOG_CCACHE_STATS}" == "1" ]; then
|
||||
ccache -s
|
||||
ccache -s | grep 'cache hit rate' | cut -d ' ' -f 4- | xargs -I{} echo LevelZero GPU Driver {} >> $REPO_DIR/../output/logs/ccache.log
|
||||
fi
|
||||
)
|
||||
|
||||
mkdir -p ${REPO_DIR}/../output/dbgsym
|
||||
|
||||
mv ${REPO_DIR}/../*.deb ${REPO_DIR}/../output/
|
||||
find ${REPO_DIR}/.. -maxdepth 1 -name \*.ddeb -type f -print0 | xargs -0r mv -t ${REPO_DIR}/../output/dbgsym/
|
||||
@@ -1,33 +0,0 @@
|
||||
Source: intel-compute-runtime
|
||||
Section: libs
|
||||
Priority: optional
|
||||
Maintainer: Intel Graphics Team <linux-graphics@intel.com>
|
||||
XSBC-Original-Maintainer: Debian OpenCL Maintainers <pkg-opencl-devel@lists.alioth.debian.org>
|
||||
Build-Depends: debhelper (>= 11),
|
||||
cmake,
|
||||
level-zero-devel,
|
||||
intel-igc-opencl-devel,
|
||||
libigdgmm-dev,
|
||||
pkg-config
|
||||
Standards-Version: 4.3.0
|
||||
Homepage: https://github.com/oneapi-src/level-zero
|
||||
|
||||
Package: intel-level-zero-gpu
|
||||
Architecture: amd64 arm64
|
||||
Depends:
|
||||
${shlibs:Depends},
|
||||
${misc:Depends},
|
||||
intel-igc-core,
|
||||
libigdgmm12
|
||||
Description: Intel(R) Graphics Compute Runtime for oneAPI Level Zero.
|
||||
Level Zero is the primary low-level interface for language and runtime
|
||||
libraries. Level Zero offers fine-grain control over accelerators
|
||||
capabilities, delivering a simplified and low-latency interface to
|
||||
hardware, and efficiently exposing hardware capabilities to applications.
|
||||
|
||||
Package: intel-level-zero-gpu-devel
|
||||
Architecture: amd64 arm64
|
||||
Depends:
|
||||
${shlibs:Depends},
|
||||
${misc:Depends},
|
||||
Description: Intel(R) Graphics Compute Runtime for oneAPI Level Zero - development headers
|
||||
@@ -1,32 +0,0 @@
|
||||
Format: https://www.debian.org/doc/packaging-manuals/copyright-format/1.0/
|
||||
Upstream-Name: level-zero
|
||||
Source: https://github.com/oneapi-src/level-zero
|
||||
|
||||
Files: third_party/opencl_headers/*
|
||||
third_party/opengl_headers/GL/glext.h
|
||||
Copyright: 2008-2021 The Khronos Group Inc.
|
||||
2008-2021 Intel Corporation
|
||||
License: MIT
|
||||
|
||||
Files: *
|
||||
Copyright: 2018-2021 Intel Corporation
|
||||
License: MIT
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a
|
||||
copy of this software and associated documentation files (the
|
||||
"Software"), to deal in the Software without restriction, including
|
||||
without limitation the rights to use, copy, modify, merge, publish,
|
||||
distribute, sublicense, and/or sell copies of the Software, and to
|
||||
permit persons to whom the Software is furnished to do so, subject to
|
||||
the following conditions:
|
||||
.
|
||||
The above copyright notice and this permission notice shall be included
|
||||
in all copies or substantial portions of the Software.
|
||||
.
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
|
||||
OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
|
||||
IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
|
||||
CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
|
||||
TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
|
||||
SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
@@ -1,10 +0,0 @@
|
||||
intel-compute-runtime (1.0) unstable; urgency=medium
|
||||
|
||||
* Level Zero GPU Driver implemented based on v1.0 L0 Specification
|
||||
|
||||
-- Neil Spruit <neil.r.spruit@intel.com> Fri, 7 Aug 2020 12:26:37 +0300
|
||||
intel-compute-runtime (0.4.0) unstable; urgency=medium
|
||||
|
||||
* Ubuntu package init
|
||||
|
||||
-- Pavel Androniychuk <pavel.androniychuk@intel.com> Fri, 14 Feb 2020 12:26:37 +0300
|
||||
@@ -1 +0,0 @@
|
||||
11
|
||||
@@ -1 +0,0 @@
|
||||
usr/include/level_zero/zet_intel_gpu_debug.h
|
||||
@@ -1 +0,0 @@
|
||||
usr/lib/*/libze_intel_gpu.so.*
|
||||
@@ -1,50 +0,0 @@
|
||||
#!/usr/bin/make -f
|
||||
ver = xxx
|
||||
ver_hf = 0
|
||||
|
||||
%:
|
||||
dh $@ --builddir build/ --buildsystem=cmake+ninja
|
||||
|
||||
NEO_DISABLE_BUILTINS_COMPILATION ?= FALSE
|
||||
RELEASE_WITH_REGKEYS ?= FALSE
|
||||
IGDRCL_FORCE_USE_LIBVA ?= FALSE
|
||||
NEO_SKIP_UNIT_TESTS ?= FALSE
|
||||
NEO_ENABLE_i915_PRELIM_DETECTION ?= TRUE
|
||||
NEO_ENABLE_XE_EU_DEBUG_SUPPORT ?= FALSE
|
||||
NEO_FORCE_USE_AUB_STREAM ?= TRUE
|
||||
|
||||
override_dh_auto_configure:
|
||||
dh_auto_configure -- ${NEO_BUILD_EXTRA_OPTS} \
|
||||
-DCMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE} \
|
||||
-DNEO_VERSION_BUILD=$(ver) \
|
||||
-DNEO_VERSION_HOTFIX=$(ver_hf) \
|
||||
-DNEO_SKIP_UNIT_TESTS=${NEO_SKIP_UNIT_TESTS} \
|
||||
-DNEO_ENABLE_i915_PRELIM_DETECTION=${NEO_ENABLE_i915_PRELIM_DETECTION} \
|
||||
-DNEO_ENABLE_XE_EU_DEBUG_SUPPORT=${NEO_ENABLE_XE_EU_DEBUG_SUPPORT} \
|
||||
-DNEO_DISABLE_BUILTINS_COMPILATION=${NEO_DISABLE_BUILTINS_COMPILATION} \
|
||||
-DNEO_BUILD_WITH_OCL=FALSE \
|
||||
-DRELEASE_WITH_REGKEYS=${RELEASE_WITH_REGKEYS} \
|
||||
-DIGDRCL_FORCE_USE_LIBVA=${IGDRCL_FORCE_USE_LIBVA} \
|
||||
-DNEO_FORCE_USE_AUB_STREAM=${NEO_FORCE_USE_AUB_STREAM} \
|
||||
-DL0_INSTALL_UDEV_RULES=1 \
|
||||
-DUDEV_RULES_DIR=/etc/udev/rules.d/ \
|
||||
-Wno-dev
|
||||
|
||||
override_dh_auto_build:
|
||||
${BUILD_PREFIX} dh_auto_build
|
||||
|
||||
override_dh_install:
|
||||
rm -rf debian/intel-level-zero-gpu/etc/
|
||||
rm -rf debian/intel-level-zero-gpu/usr/lib/${DEB_TARGET_MULTIARCH}/intel-opencl/
|
||||
rm -rf debian/intel-level-zero-gpu/usr/bin/
|
||||
rm -rf debian/intel-level-zero-gpu/usr/include/ocloc_api.h
|
||||
rm -rf debian/intel-level-zero-gpu/usr/lib/${DEB_TARGET_MULTIARCH}/libocloc.so
|
||||
rm -rvf debian/intel-level-zero-gpu/usr/lib/debug
|
||||
dh_install
|
||||
if [ -d "${NEO_NINJA_DUMP}" ]; then find -name .ninja_\* -type f -exec cp -v {} ${NEO_NINJA_DUMP}/ \;; fi
|
||||
|
||||
override_dh_builddeb:
|
||||
dh_builddeb -- -Zxz
|
||||
|
||||
override_dh_auto_test:
|
||||
echo "ULTs already executed"
|
||||
@@ -1 +0,0 @@
|
||||
3.0 (quilt)
|
||||
@@ -1,2 +0,0 @@
|
||||
libigdgmm 11 intel-gmmlib
|
||||
libigdgmm 12 libigdgmm12
|
||||
Reference in New Issue
Block a user