build: handle NEO_I915_PRELIM_HEADERS_DIR in packaging scripts

Signed-off-by: Mateusz Jablonski <mateusz.jablonski@intel.com>
This commit is contained in:
Mateusz Jablonski
2024-04-17 11:34:22 +00:00
committed by Compute-Runtime-Automation
parent 8676b97412
commit cee5f2d93c
7 changed files with 60 additions and 72 deletions

View File

@@ -1,7 +1,7 @@
#!/usr/bin/env bash
#
# Copyright (C) 2021-2023 Intel Corporation
# Copyright (C) 2021-2024 Intel Corporation
#
# SPDX-License-Identifier: MIT
#
@@ -61,9 +61,9 @@ if [ "${BUILD_SRPM}" == "1" ]; then
cp $COPYRIGHT $BUILD_DIR/SOURCES/
cp $SPEC_SRC $BUILD_DIR/SPECS/
if [ -d "$I915_HEADERS_DIR" ]; then
tar -c -I 'xz -6 -T0' -f $BUILD_DIR/SOURCES/uapi.tar.xz -C $REPO_DIR --transform "s,${I915_HEADERS_DIR:1},uapi," $I915_HEADERS_DIR
perl -pi -e "s;^%global I915_HEADERS_DIR .*;%global I915_HEADERS_DIR %{_builddir}/uapi;" $SPEC
if [ -d "$NEO_I915_PRELIM_HEADERS_DIR" ]; then
tar -c -I 'xz -6 -T0' -f $BUILD_DIR/SOURCES/uapi.tar.xz -C $REPO_DIR --transform "s,${NEO_I915_PRELIM_HEADERS_DIR:1},uapi," $NEO_I915_PRELIM_HEADERS_DIR
perl -pi -e "s;^%global NEO_I915_PRELIM_HEADERS_DIR .*;%global NEO_I915_PRELIM_HEADERS_DIR %{_builddir}/uapi/drm;" $SPEC
fi
PATCH_SPEC="${REPO_DIR}/scripts/packaging/${BRANCH_SUFFIX}/patch_spec.sh"

View File

@@ -4,7 +4,7 @@
%global build_id xxx
%global NEO_RELEASE_WITH_REGKEYS FALSE
%global NEO_ENABLE_XE_EU_DEBUG_SUPPORT FALSE
%global I915_HEADERS_DIR %{nil}
%global NEO_I915_PRELIM_HEADERS_DIR %{nil}
%define _source_payload w5T16.xzdio
%define _binary_payload w5T16.xzdio
@@ -19,7 +19,7 @@ License: MIT
URL: https://github.com/intel/compute-runtime
Source0: %{url}/archive/%{version}/compute-runtime.tar.xz
Source1: copyright
%if "%{I915_HEADERS_DIR}" != ""
%if "%{NEO_I915_PRELIM_HEADERS_DIR}" != ""
Source2: uapi.tar.xz
%endif
@@ -50,7 +50,7 @@ Intel(R) Graphics Compute Runtime for oneAPI Level Zero - development headers
%define debug_package %{nil}
%prep
%if "%{I915_HEADERS_DIR}" == ""
%if "%{NEO_I915_PRELIM_HEADERS_DIR}" == ""
%autosetup -p1 -n compute-runtime
%else
%autosetup -p1 -n compute-runtime -b 2
@@ -71,7 +71,7 @@ cd build
-DL0_INSTALL_UDEV_RULES=1 \
-DUDEV_RULES_DIR=/etc/udev/rules.d/ \
-DCMAKE_VERBOSE_MAKEFILE=FALSE \
-DI915_HEADERS_DIR=$(realpath %{I915_HEADERS_DIR})
-DNEO_I915_PRELIM_HEADERS_DIR=$(realpath %{NEO_I915_PRELIM_HEADERS_DIR})
%ninja_build
%install

View File

@@ -6,7 +6,7 @@
%global build_id xxx
%global NEO_RELEASE_WITH_REGKEYS FALSE
%global NEO_ENABLE_XE_EU_DEBUG_SUPPORT FALSE
%global I915_HEADERS_DIR %{nil}
%global NEO_I915_PRELIM_HEADERS_DIR %{nil}
%define gmmlib_sover 12
%define igc_sover 1
@@ -28,7 +28,7 @@ License: MIT
URL: https://github.com/intel/compute-runtime
Source0: %{url}/archive/%{version}/compute-runtime.tar.xz
Source1: copyright
%if "%{I915_HEADERS_DIR}" != ""
%if "%{NEO_I915_PRELIM_HEADERS_DIR}" != ""
Source2: uapi.tar.xz
%endif
@@ -62,7 +62,7 @@ Intel(R) Graphics Compute Runtime for oneAPI Level Zero - development headers
%debug_package %{nil}
%prep
%if "%{I915_HEADERS_DIR}" == ""
%if "%{NEO_I915_PRELIM_HEADERS_DIR}" == ""
%autosetup -p1 -n compute-runtime
%else
%autosetup -p1 -n compute-runtime -b 2
@@ -81,7 +81,7 @@ Intel(R) Graphics Compute Runtime for oneAPI Level Zero - development headers
-DL0_INSTALL_UDEV_RULES=1 \
-DUDEV_RULES_DIR=/etc/udev/rules.d/ \
-DCMAKE_VERBOSE_MAKEFILE=FALSE \
-DI915_HEADERS_DIR=$(realpath %{I915_HEADERS_DIR})
-DNEO_I915_PRELIM_HEADERS_DIR=$(realpath %{NEO_I915_PRELIM_HEADERS_DIR})
%ninja_build
%install