build: adjust name for legacy1 packages

Related-To: NEO-6683
Signed-off-by: Artur Harasimiuk <artur.harasimiuk@intel.com>
This commit is contained in:
Artur Harasimiuk
2024-07-31 15:24:33 +00:00
committed by Compute-Runtime-Automation
parent 8edc40adbc
commit b6038de550
5 changed files with 34 additions and 28 deletions

View File

@@ -91,19 +91,20 @@ fi
echo "NEO_CURRENT_PLATFORMS_SUPPORT: ${NEO_CURRENT_PLATFORMS_SUPPORT}"
echo "NEO_LEGACY_PLATFORMS_SUPPORT: ${NEO_LEGACY_PLATFORMS_SUPPORT}"
export NEO_OCLOC_VERSION_MAJOR=${NEO_OCL_VERSION_MAJOR}
export NEO_OCLOC_VERSION_MINOR=${NEO_OCL_VERSION_MINOR}
if [[ "${NEO_LEGACY_PLATFORMS_SUPPORT}" == "TRUE" ]] && [[ ! "${NEO_CURRENT_PLATFORMS_SUPPORT}" == "TRUE" ]]; then
echo "Building Legacy package"
export NEO_OCLOC_VERSION_MAJOR=24
export NEO_OCLOC_VERSION_MINOR=22
perl -pi -e "s/^Package: intel-opencl-icd$/Package: intel-opencl-icd-${NEO_OCLOC_VERSION_MAJOR}-${NEO_OCLOC_VERSION_MINOR}/" "$BUILD_DIR/debian/control"
export NEO_OCLOC_VERSION_MODE=0
perl -pi -e "s/^Package: intel-opencl-icd$/Package: intel-opencl-icd-legacy1/" "$BUILD_DIR/debian/control"
else
echo "Building Current/Full package"
export NEO_OCLOC_VERSION_MAJOR=${NEO_OCL_VERSION_MAJOR}
export NEO_OCLOC_VERSION_MINOR=${NEO_OCL_VERSION_MINOR}
export NEO_OCLOC_VERSION_MODE=1
fi
perl -pi -e "s/\/ocloc 0$/\/ocloc-${NEO_OCLOC_VERSION_MAJOR}.${NEO_OCLOC_VERSION_MINOR} ${NEO_OCLOC_VERSION_MAJOR}${NEO_OCLOC_VERSION_MINOR}/" "$BUILD_DIR/debian/postinst"
perl -pi -e "s/\/ocloc$/\/ocloc-${NEO_OCLOC_VERSION_MAJOR}.${NEO_OCLOC_VERSION_MINOR}/" "$BUILD_DIR/debian/prerm"
perl -pi -e "s/\/ocloc 0$/\/ocloc-${NEO_OCLOC_VERSION_MAJOR}.${NEO_OCLOC_VERSION_MINOR}.${NEO_OCLOC_VERSION_MODE} ${NEO_OCLOC_VERSION_MAJOR}${NEO_OCLOC_VERSION_MINOR}${NEO_OCLOC_VERSION_MODE}/" "$BUILD_DIR/debian/postinst"
perl -pi -e "s/\/ocloc$/\/ocloc-${NEO_OCLOC_VERSION_MAJOR}.${NEO_OCLOC_VERSION_MINOR}.${NEO_OCLOC_VERSION_MODE}/" "$BUILD_DIR/debian/prerm"
#needs a top level CMAKE file
cat << EOF | tee $BUILD_DIR/CMakeLists.txt

View File

@@ -9,6 +9,7 @@
%global NEO_RELEASE_WITH_REGKEYS FALSE
%global NEO_ENABLE_XE_EU_DEBUG_SUPPORT FALSE
%global NEO_I915_PRELIM_HEADERS_DIR %{nil}
%global NEO_OCLOC_VERSION_MODE 1
%define gmmlib_sover 12
%define igc_sover 1
@@ -114,12 +115,12 @@ fi
/usr/share/doc/intel-ocloc%{?name_suffix}/copyright
%post -n intel-ocloc%{?name_suffix}
update-alternatives --quiet --install /usr/bin/ocloc ocloc /usr/bin/ocloc-%{NEO_OCL_VERSION_MAJOR}.%{NEO_OCL_VERSION_MINOR} %{NEO_OCL_VERSION_MAJOR}%{NEO_OCL_VERSION_MINOR}
update-alternatives --quiet --install /usr/bin/ocloc ocloc /usr/bin/ocloc-%{NEO_OCL_VERSION_MAJOR}.%{NEO_OCL_VERSION_MINOR}.%{NEO_OCLOC_VERSION_MODE} %{NEO_OCL_VERSION_MAJOR}%{NEO_OCL_VERSION_MINOR}%{NEO_OCLOC_VERSION_MODE}
%preun -n intel-ocloc%{?name_suffix}
if [ $1 == "0" ]; then
# uninstall
update-alternatives --quiet --remove ocloc /usr/bin/ocloc-%{NEO_OCL_VERSION_MAJOR}.%{NEO_OCL_VERSION_MINOR}
update-alternatives --quiet --remove ocloc /usr/bin/ocloc-%{NEO_OCL_VERSION_MAJOR}.%{NEO_OCL_VERSION_MINOR}.%{NEO_OCLOC_VERSION_MODE}
fi
%changelog