Fix OpenCL driver version when building rpm packages

Signed-off-by: Artur Harasimiuk <artur.harasimiuk@intel.com>
This commit is contained in:
Artur Harasimiuk
2022-01-11 11:34:38 +00:00
committed by Compute-Runtime-Automation
parent 9785ab7828
commit 86161a8a4f
3 changed files with 16 additions and 3 deletions

View File

@ -1,7 +1,7 @@
#!/usr/bin/env bash
#
# Copyright (C) 2021 Intel Corporation
# Copyright (C) 2021-2022 Intel Corporation
#
# SPDX-License-Identifier: MIT
#
@ -66,6 +66,9 @@ if [ "${BUILD_SRPM}" == "1" ]; then
fi
# Update spec file with new version
perl -pi -e "s/^%global NEO_OCL_VERSION_MAJOR .*/%global NEO_OCL_VERSION_MAJOR ${NEO_OCL_VERSION_MAJOR}/" $BUILD_DIR/SPECS/opencl.spec
perl -pi -e "s/^%global NEO_OCL_VERSION_MINOR .*/%global NEO_OCL_VERSION_MINOR ${NEO_OCL_VERSION_MINOR}/" $BUILD_DIR/SPECS/opencl.spec
perl -pi -e "s/^%global NEO_OCL_VERSION_BUILD .*/%global NEO_OCL_VERSION_BUILD ${NEO_OCL_VERSION_BUILD}/" $BUILD_DIR/SPECS/opencl.spec
perl -pi -e "s/^%global rel .*/%global rel ${RELEASE}/" $SPEC
perl -pi -e "s/^%global ver .*/%global ver ${VERSION}/" $SPEC

View File

@ -1,6 +1,9 @@
#it's changed by external script
%global rel i1
%global ver xxx
%global NEO_OCL_VERSION_MAJOR xxx
%global NEO_OCL_VERSION_MINOR xxx
%global NEO_OCL_VERSION_BUILD xxx
%define _source_payload w5T16.xzdio
%define _binary_payload w5T16.xzdio
@ -42,7 +45,9 @@ Intel(R) Graphics Compute Runtime for OpenCL(TM) is a open source project to con
mkdir build
cd build
%cmake .. \
-DNEO_VERSION_BUILD=%{ver} \
-DNEO_OCL_VERSION_MAJOR=%{NEO_OCL_VERSION_MAJOR} \
-DNEO_OCL_VERSION_MINOR=%{NEO_OCL_VERSION_MINOR} \
-DNEO_VERSION_BUILD=%{NEO_OCL_VERSION_BUILD} \
-DCMAKE_BUILD_TYPE=Release \
-DBUILD_WITH_L0=FALSE \
-DNEO_SKIP_UNIT_TESTS=TRUE \

View File

@ -3,6 +3,9 @@
#it's changed by external script
%global rel i1
%global ver xxx
%global NEO_OCL_VERSION_MAJOR xxx
%global NEO_OCL_VERSION_MINOR xxx
%global NEO_OCL_VERSION_BUILD xxx
%define gmmlib_sover 12
%define igc_sover 1
@ -50,8 +53,10 @@ Summary: ocloc package for opencl
%build
%cmake .. \
-DNEO_OCL_VERSION_MAJOR=%{NEO_OCL_VERSION_MAJOR} \
-DNEO_OCL_VERSION_MINOR=%{NEO_OCL_VERSION_MINOR} \
-DNEO_VERSION_BUILD=%{NEO_OCL_VERSION_BUILD} \
-DCMAKE_BUILD_TYPE=%{build_type} \
-DNEO_VERSION_BUILD=%{ver} \
-DBUILD_WITH_L0=FALSE \
-DCMAKE_INSTALL_PREFIX=/usr \
-DNEO_SKIP_UNIT_TESTS=TRUE \