rpm build refactor

- use ninja
- do not produce verbose make files

Related-To: NEO-7310
Signed-off-by: Artur Harasimiuk <artur.harasimiuk@intel.com>
This commit is contained in:
Artur Harasimiuk
2022-09-07 19:52:46 +00:00
committed by Compute-Runtime-Automation
parent bddf8c7dbc
commit b24ff7ffbc
4 changed files with 26 additions and 24 deletions

View File

@ -18,7 +18,7 @@ URL: https://github.com/intel/compute-runtime
Source0: %{url}/archive/%{version}/compute-runtime-%{version}.tar.xz
Source1: copyright
BuildRequires: make libva-devel gcc-c++ cmake
BuildRequires: libva-devel gcc-c++ cmake ninja-build make
BuildRequires: intel-gmmlib-devel
BuildRequires: intel-igc-opencl-devel
@ -42,20 +42,21 @@ exposing hardware capabilities to applications.
mkdir build
cd build
%cmake .. \
-GNinja \
-DNEO_VERSION_BUILD=%{build_id} \
-DCMAKE_BUILD_TYPE=Release \
-DNEO_BUILD_WITH_OCL=FALSE \
-DNEO_SKIP_UNIT_TESTS=1 \
-DNEO_SKIP_UNIT_TESTS=TRUE \
-DNEO_ENABLE_i915_PRELIM_DETECTION=TRUE \
-DRELEASE_WITH_REGKEYS=%{NEO_RELEASE_WITH_REGKEYS} \
-DCMAKE_INSTALL_PREFIX=/usr \
-DL0_INSTALL_UDEV_RULES=1 \
-DUDEV_RULES_DIR=/etc/udev/rules.d/
%make_build
-DUDEV_RULES_DIR=/etc/udev/rules.d/ \
-DCMAKE_VERBOSE_MAKEFILE=FALSE
%ninja_build
%install
cd build
%make_install
%ninja_install
#Remove OpenCL files before installing
rm -rf %{buildroot}%{_libdir}/intel-opencl/

View File

@ -28,7 +28,7 @@ Source0: %{url}/archive/%{version}/compute-runtime-%{version}.tar.xz
Source1: copyright
ExclusiveArch: x86_64
BuildRequires: cmake make gcc-c++
BuildRequires: cmake gcc-c++ ninja make
#BuildRequires: libva-devel
BuildRequires: libigdgmm%{?name_suffix}-devel
BuildRequires: libigdfcl%{?name_suffix}-devel
@ -52,21 +52,21 @@ exposing hardware capabilities to applications.
%build
%cmake .. \
-GNinja \
-DNEO_VERSION_BUILD=%{build_id} \
-DCMAKE_BUILD_TYPE=%{build_type} \
-DCMAKE_INSTALL_PREFIX=/usr \
-DNEO_BUILD_WITH_OCL=FALSE \
-DNEO_SKIP_UNIT_TESTS=TRUE \
-DNEO_ENABLE_i915_PRELIM_DETECTION=TRUE \
-DRELEASE_WITH_REGKEYS=%{NEO_RELEASE_WITH_REGKEYS} \
-DL0_INSTALL_UDEV_RULES=1 \
-DUDEV_RULES_DIR=/etc/udev/rules.d/ \
-Wno-dev
%make_build
-DCMAKE_VERBOSE_MAKEFILE=FALSE
%ninja_build
%install
cd build
%make_install
%ninja_install
#Remove OpenCL files before installing
rm -rf %{buildroot}%{_libdir}/intel-opencl/

View File

@ -24,7 +24,7 @@ Source1: copyright
Requires: intel-gmmlib
Requires: intel-igc-opencl
BuildRequires: make libva-devel gcc-c++ cmake
BuildRequires: libva-devel gcc-c++ cmake ninja-build make
BuildRequires: intel-gmmlib-devel
BuildRequires: intel-igc-opencl-devel
@ -46,6 +46,7 @@ Intel(R) Graphics Compute Runtime for OpenCL(TM) is a open source project to con
mkdir build
cd build
%cmake .. \
-GNinja \
-DNEO_OCL_VERSION_MAJOR=%{NEO_OCL_VERSION_MAJOR} \
-DNEO_OCL_VERSION_MINOR=%{NEO_OCL_VERSION_MINOR} \
-DNEO_VERSION_BUILD=%{NEO_OCL_VERSION_BUILD} \
@ -53,13 +54,13 @@ cd build
-DBUILD_WITH_L0=FALSE \
-DNEO_SKIP_UNIT_TESTS=TRUE \
-DNEO_ENABLE_i915_PRELIM_DETECTION=TRUE \
-DCMAKE_INSTALL_PREFIX=/usr \
-DRELEASE_WITH_REGKEYS=%{NEO_RELEASE_WITH_REGKEYS}
%make_build
-DRELEASE_WITH_REGKEYS=%{NEO_RELEASE_WITH_REGKEYS} \
-DCMAKE_VERBOSE_MAKEFILE=FALSE
%ninja_build
%install
cd build
%make_install
%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

View File

@ -30,10 +30,10 @@ Source0: %{url}/archive/%{version}/compute-runtime-%{version}.tar.xz
Source1: copyright
ExclusiveArch: x86_64
BuildRequires: cmake make gcc-c++
#BuildRequires: libva-devel
BuildRequires: libigdgmm%{?name_suffix}-devel
BuildRequires: libigdfcl%{?name_suffix}-devel
BuildRequires: cmake gcc-c++ ninja make
# BuildRequires: libva-devel
BuildRequires: libigdgmm%{?name_suffix}-devel
BuildRequires: libigdfcl%{?name_suffix}-devel
Requires: libigc%{igc_sover}%{?name_suffix}
Requires: libigdfcl%{igc_sover}%{?name_suffix}
Requires: libigdgmm%{gmmlib_sover}%{?name_suffix}
@ -54,21 +54,21 @@ Summary: ocloc package for opencl
%build
%cmake .. \
-GNinja \
-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} \
-DBUILD_WITH_L0=FALSE \
-DCMAKE_INSTALL_PREFIX=/usr \
-DNEO_SKIP_UNIT_TESTS=TRUE \
-DNEO_ENABLE_i915_PRELIM_DETECTION=TRUE \
-DRELEASE_WITH_REGKEYS=%{NEO_RELEASE_WITH_REGKEYS} \
-Wno-dev
%make_build
-DCMAKE_VERBOSE_MAKEFILE=FALSE
%ninja_build
%install
cd build
%make_install
%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