packaging refactor

- update versioning for RPM
- make .spec files more verbose

Print information about CCACHE_BASEDIR from environment.

Signed-off-by: Artur Harasimiuk <artur.harasimiuk@intel.com>
This commit is contained in:
Artur Harasimiuk 2022-09-23 13:56:32 +00:00 committed by Compute-Runtime-Automation
parent ed1f4a1adf
commit 878d646772
13 changed files with 49 additions and 38 deletions

View File

@ -505,7 +505,10 @@ if(CCACHE_EXE_FOUND AND CCACHE_ALLOWED)
if(IS_DIRECTORY ${__tmp_dir})
get_filename_component(NEO_CCACHE_BASEDIR ".." ABSOLUTE)
list(APPEND NEO_RULE_LAUNCH_LIST "CCACHE_BASEDIR=${NEO_CCACHE_BASEDIR}")
message(STATUS "using ccache base dir: ${NEO_CCACHE_BASEDIR}")
endif()
elseif(DEFINED ENV{CCACHE_BASEDIR})
message(STATUS "Using ccache base dir: $ENV{CCACHE_BASEDIR}")
endif()
list(APPEND NEO_RULE_LAUNCH_LIST "ccache")
string(REPLACE ";" " " NEO_RULE_LAUNCH_STR "${NEO_RULE_LAUNCH_LIST}")

View File

@ -27,7 +27,7 @@ components:
branch: master
dest_dir: infra
fetch_tags: true
revision: v4205
revision: v4207
type: git
internal:
branch: master

View File

@ -15,6 +15,6 @@ get_api_version() {
API_RPM_MODEL_LINK="1"
if [ "${COMPONENT_MODEL}" != "ci" ]; then
API_DEB_MODEL_LINK="~${COMPONENT_MODEL:-unknown}${BUILD_ID:-0}"
API_RPM_MODEL_LINK=".${COMPONENT_MODEL:-unknown}${BUILD_ID:-0}"
API_RPM_MODEL_LINK="${COMPONENT_MODEL:-unknown}${BUILD_ID:-0}"
fi
}

View File

@ -37,7 +37,7 @@ get_l0_gpu_driver_version # NEO_L0_VERSION_MAJOR.NEO_L0_VERSION_MINOR.NEO_L0_VER
if [ -z "${BRANCH_SUFFIX}" ]; then
VERSION="${NEO_L0_VERSION_MAJOR}.${NEO_L0_VERSION_MINOR}.${NEO_L0_VERSION_PATCH}${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}"
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}

View File

@ -49,7 +49,7 @@ if [ "${BUILD_SRPM}" == "1" ]; then
get_api_version # API_VERSION-API_VERSION_SRC and API_RPM_MODEL_LINK
get_l0_gpu_driver_version # NEO_L0_VERSION_MAJOR.NEO_L0_VERSION_MINOR.NEO_L0_VERSION_PATCH
VERSION="${NEO_L0_VERSION_MAJOR}.${NEO_L0_VERSION_MINOR}.${NEO_L0_VERSION_PATCH}.${API_VERSION}"
VERSION="${NEO_L0_VERSION_MAJOR}.${NEO_L0_VERSION_MINOR}.${NEO_L0_VERSION_PATCH}${API_VERSION}"
RELEASE="${NEO_L0_VERSION_HOTFIX}${API_VERSION_SRC}${API_RPM_MODEL_LINK}"
RELEASE_WITH_REGKEYS="${RELEASE_WITH_REGKEYS:-FALSE}"

View File

@ -58,19 +58,19 @@ cd build
cd build
%ninja_install
#Remove OpenCL files before installing
rm -rf %{buildroot}%{_libdir}/intel-opencl/
rm -rf %{buildroot}%{_sysconfdir}/OpenCL/
rm -rf %{buildroot}%{_bindir}/ocloc
rm -rf %{buildroot}%{_libdir}/libocloc.so
rm -rf %{buildroot}%{_includedir}/ocloc_api.h
#Remove OpenCL files
rm -rvf %{buildroot}%{_libdir}/intel-opencl/
rm -rvf %{buildroot}%{_sysconfdir}/OpenCL/
rm -rvf %{buildroot}%{_bindir}/ocloc
rm -rvf %{buildroot}%{_libdir}/libocloc.so
rm -rvf %{buildroot}%{_includedir}/ocloc_api.h
#Remove debug files
rm -f %{buildroot}/%{_libdir}/intel-opencl/libigdrcl.so.debug
rm -f %{buildroot}/%{_libdir}/libocloc.so.debug
rm -rf %{buildroot}/usr/lib/debug/
rm -vf %{buildroot}/%{_libdir}/intel-opencl/libigdrcl.so.debug
rm -vf %{buildroot}/%{_libdir}/libocloc.so.debug
rm -rvf %{buildroot}/usr/lib/debug/
#insert license into package
mkdir -p %{buildroot}/usr/share/doc/intel-level-zero-gpu/
cp -pR %{_sourcedir}/copyright %{buildroot}/usr/share/doc/intel-level-zero-gpu/.
cp -pvR %{_sourcedir}/copyright %{buildroot}/usr/share/doc/intel-level-zero-gpu/.
%files
%defattr(-,root,root)

View File

@ -45,7 +45,7 @@ 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.
%debug_package
%debug_package %{nil}
%prep
%autosetup -p1 -n compute-runtime-%{version}
@ -68,19 +68,19 @@ exposing hardware capabilities to applications.
cd build
%ninja_install
#Remove OpenCL files before installing
rm -rf %{buildroot}%{_libdir}/intel-opencl/
rm -rf %{buildroot}%{_sysconfdir}/OpenCL/
rm -rf %{buildroot}%{_bindir}/ocloc
rm -rf %{buildroot}%{_libdir}/libocloc.so
rm -rf %{buildroot}%{_includedir}/ocloc_api.h
#Remove OpenCL files
rm -rvf %{buildroot}%{_libdir}/intel-opencl/
rm -rvf %{buildroot}%{_sysconfdir}/OpenCL/
rm -rvf %{buildroot}%{_bindir}/ocloc
rm -rvf %{buildroot}%{_libdir}/libocloc.so
rm -rvf %{buildroot}%{_includedir}/ocloc_api.h
#Remove debug files
rm -f %{buildroot}/%{_libdir}/intel-opencl/libigdrcl.so.debug
rm -f %{buildroot}/%{_libdir}/libocloc.so.debug
rm -rf %{buildroot}/usr/lib/debug/
rm -vf %{buildroot}/%{_libdir}/intel-opencl/libigdrcl.so.debug
rm -vf %{buildroot}/%{_libdir}/libocloc.so.debug
rm -rvf %{buildroot}/usr/lib/debug/
#insert license into package
mkdir -p %{buildroot}/usr/share/doc/intel-level-zero-gpu%{?name_suffix}/
cp -pR %{_sourcedir}/copyright %{buildroot}/usr/share/doc/intel-level-zero-gpu%{?name_suffix}/.
cp -pvR %{_sourcedir}/copyright %{buildroot}/usr/share/doc/intel-level-zero-gpu%{?name_suffix}/.
%files -n intel-level-zero-gpu%{?name_suffix}
%defattr(-,root,root)

View File

@ -38,3 +38,6 @@ override_dh_install:
override_dh_builddeb:
dh_builddeb -- -Zxz
override_dh_auto_test:
echo "ULTs already executed"

View File

@ -42,7 +42,7 @@ export NEO_OCL_VERSION_BUILD
if [ -z "${BRANCH_SUFFIX}" ]; then
VERSION="${NEO_OCL_VERSION_MAJOR}.${NEO_OCL_VERSION_MINOR}.${NEO_OCL_VERSION_BUILD}${API_DEB_MODEL_LINK}"
else
VERSION="1:${NEO_OCL_VERSION_MAJOR}.${NEO_OCL_VERSION_MINOR}.${NEO_OCL_VERSION_BUILD}.${API_VERSION}-${NEO_OCL_VERSION_HOTFIX}${API_VERSION_SRC}${API_DEB_MODEL_LINK}"
VERSION="1:${NEO_OCL_VERSION_MAJOR}.${NEO_OCL_VERSION_MINOR}.${NEO_OCL_VERSION_BUILD}${API_VERSION}-${NEO_OCL_VERSION_HOTFIX}${API_VERSION_SRC}${API_DEB_MODEL_LINK}"
fi
PKG_VERSION=${VERSION}

View File

@ -49,7 +49,7 @@ if [ "${BUILD_SRPM}" == "1" ]; then
get_opencl_version # NEO_OCL_VERSION_MAJOR.NEO_OCL_VERSION_MINOR.NEO_OCL_VERSION_BUILD
get_api_version # API_VERSION-API_VERSION_SRC and API_RPM_MODEL_LINK
VERSION="${NEO_OCL_VERSION_MAJOR}.${NEO_OCL_VERSION_MINOR}.${NEO_OCL_VERSION_BUILD}.${API_VERSION}"
VERSION="${NEO_OCL_VERSION_MAJOR}.${NEO_OCL_VERSION_MINOR}.${NEO_OCL_VERSION_BUILD}${API_VERSION}"
RELEASE="${NEO_OCL_VERSION_HOTFIX}${API_VERSION_SRC}${API_RPM_MODEL_LINK}"
RELEASE_WITH_REGKEYS="${RELEASE_WITH_REGKEYS:-FALSE}"

View File

@ -61,16 +61,17 @@ cd build
%install
cd build
%ninja_install
chmod +x %{buildroot}/%{_libdir}/intel-opencl/libigdrcl.so
chmod +x %{buildroot}/%{_libdir}/libocloc.so
rm -f %{buildroot}/%{_libdir}/intel-opencl/libigdrcl.so.debug
rm -f %{buildroot}/%{_libdir}/libocloc.so.debug
rm -rf %{buildroot}/usr/lib/debug/
rm -vf %{buildroot}/%{_libdir}/intel-opencl/libigdrcl.so.debug
rm -vf %{buildroot}/%{_libdir}/libocloc.so.debug
rm -rvf %{buildroot}/usr/lib/debug/
#insert license into package
mkdir -p %{buildroot}/usr/share/doc/intel-opencl/
cp -pR %{_sourcedir}/copyright %{buildroot}/usr/share/doc/intel-opencl/.
cp -pvR %{_sourcedir}/copyright %{buildroot}/usr/share/doc/intel-opencl/.
mkdir -p %{buildroot}/usr/share/doc/intel-ocloc/
cp -pR %{_sourcedir}/copyright %{buildroot}/usr/share/doc/intel-ocloc/.
cp -pvR %{_sourcedir}/copyright %{buildroot}/usr/share/doc/intel-ocloc/.
%files
%defattr(-,root,root)

View File

@ -47,7 +47,7 @@ the GEN graphics hardware architecture.
Summary: ocloc package for opencl
%description -n intel-ocloc%{?name_suffix}
%debug_package
%debug_package %{nil}
%prep
%autosetup -p1 -n compute-runtime-%{version}
@ -69,16 +69,17 @@ Summary: ocloc package for opencl
%install
cd build
%ninja_install
chmod +x %{buildroot}/%{_libdir}/intel-opencl/libigdrcl.so
rm -f %{buildroot}/%{_libdir}/intel-opencl/libigdrcl.so.debug
rm -f %{buildroot}/%{_libdir}/libocloc.so.debug
rm -rf %{buildroot}/usr/lib/debug/
rm -vf %{buildroot}/%{_libdir}/intel-opencl/libigdrcl.so.debug
rm -vf %{buildroot}/%{_libdir}/libocloc.so.debug
rm -rvf %{buildroot}/usr/lib/debug/
#insert license into package
mkdir -p %{buildroot}/usr/share/doc/intel-opencl%{?name_suffix}/
cp -pR %{_sourcedir}/copyright %{buildroot}/usr/share/doc/intel-opencl%{?name_suffix}/.
cp -pvR %{_sourcedir}/copyright %{buildroot}/usr/share/doc/intel-opencl%{?name_suffix}/.
mkdir -p %{buildroot}/usr/share/doc/intel-ocloc%{?name_suffix}/
cp -pR %{_sourcedir}/copyright %{buildroot}/usr/share/doc/intel-ocloc%{?name_suffix}/.
cp -pvR %{_sourcedir}/copyright %{buildroot}/usr/share/doc/intel-ocloc%{?name_suffix}/.
%files -n intel-opencl%{?name_suffix}
%defattr(-,root,root)

View File

@ -33,3 +33,6 @@ override_dh_install:
override_dh_builddeb:
dh_builddeb -- -Zxz
override_dh_auto_test:
echo "ULTs already executed"