Debian Codegraph @

scripts/packaging/l0_gpu_driver/sles_15/SPECS/l0_gpu_driver.spec

raw
1 # spec file for package intel-level-zero-gpu
2
3 #it's changed by external script
4 %global ver xxx
5 %global rel xxx
6 %global build_id xxx
7 %global NEO_RELEASE_WITH_REGKEYS FALSE
8 %global NEO_ENABLE_XE_EU_DEBUG_SUPPORT FALSE
9 %global NEO_I915_PRELIM_HEADERS_DIR %{nil}
10
11 %define gmmlib_sover 12
12 %define igc_sover 1
13
14 %if !0%{?build_type:1}
15 %define build_type Release
16 %endif
17
18 %define _source_payload w5T16.xzdio
19 %define _binary_payload w5T16.xzdio
20
21 Name: intel-level-zero-gpu
22 Version: %{ver}
23 Release: %{rel}%{?dist}
24 Summary: Intel(R) GPU Driver for oneAPI Level Zero.
25
26 Group: System Environment/Libraries
27 License: MIT
28 URL: https://github.com/intel/compute-runtime
29 Source0: %{url}/archive/%{version}/compute-runtime.tar.xz
30 Source1: copyright
31 %if "%{NEO_I915_PRELIM_HEADERS_DIR}" != ""
32 Source2: uapi.tar.xz
33 %endif
34
35 ExclusiveArch: x86_64
36 BuildRequires: cmake gcc-c++ ninja make
37 #BuildRequires: libva-devel
38 BuildRequires: libigdgmm%{?name_suffix}-devel
39 BuildRequires: libigdfcl%{?name_suffix}-devel
40
41 Requires: libigc%{igc_sover}%{?name_suffix}
42 Requires: libigdfcl%{igc_sover}%{?name_suffix}
43 Requires: libigdgmm%{gmmlib_sover}%{?name_suffix}
44
45 %description
46 Runtime library providing the ability to use Intel GPUs with the oneAPI Level
47 Zero programming interface.
48 Level Zero is the primary low-level interface for language and runtime
49 libraries. Level Zero offers fine-grain control over accelerators capabilities,
50 delivering a simplified and low-latency interface to hardware, and efficiently
51 exposing hardware capabilities to applications.
52
53 %package -n intel-level-zero-gpu%{?name_suffix}-devel
54 Summary: Development files for Intel(R) GPU Driver for oneAPI Level Zero.
55 Group: Development/Libraries/C and C++
56 Requires: intel-level-zero-gpu%{?name_suffix} = %{version}
57 Provides: intel-level-zero-gpu-devel
58
59 %description -n intel-level-zero-gpu%{?name_suffix}-devel
60 Intel(R) Graphics Compute Runtime for oneAPI Level Zero - development headers
61
62 %debug_package %{nil}
63
64 %prep
65 %if "%{NEO_I915_PRELIM_HEADERS_DIR}" == ""
66 %autosetup -p1 -n compute-runtime
67 %else
68 %autosetup -p1 -n compute-runtime -b 2
69 %endif
70
71 %build
72 %cmake .. \
73 -GNinja ${NEO_BUILD_EXTRA_OPTS} \
74 -DNEO_VERSION_BUILD=%{build_id} \
75 -DCMAKE_BUILD_TYPE=%{build_type} \
76 -DNEO_BUILD_WITH_OCL=FALSE \
77 -DNEO_SKIP_UNIT_TESTS=TRUE \
78 -DNEO_ENABLE_i915_PRELIM_DETECTION=TRUE \
79 -DNEO_ENABLE_XE_EU_DEBUG_SUPPORT=%{NEO_ENABLE_XE_EU_DEBUG_SUPPORT} \
80 -DRELEASE_WITH_REGKEYS=%{NEO_RELEASE_WITH_REGKEYS} \
81 -DL0_INSTALL_UDEV_RULES=1 \
82 -DUDEV_RULES_DIR=/etc/udev/rules.d/ \
83 -DCMAKE_VERBOSE_MAKEFILE=FALSE \
84 -DNEO_I915_PRELIM_HEADERS_DIR=$(realpath %{NEO_I915_PRELIM_HEADERS_DIR})
85
86 %if 0%{?neo_rpm__post_cmake:0}
87 %{neo_rpm__post_cmake_command}
88 %endif
89
90 %ninja_build
91
92 %install
93 cd build
94 %ninja_install
95
96 #Remove OpenCL files
97 rm -rvf %{buildroot}%{_libdir}/intel-opencl/
98 rm -rvf %{buildroot}%{_sysconfdir}/OpenCL/
99 rm -rvf %{buildroot}%{_bindir}/ocloc*
100 rm -rvf %{buildroot}%{_libdir}/libocloc*.so
101 rm -rvf %{buildroot}%{_includedir}/ocloc_api.h
102 #Remove debug files
103 rm -vf %{buildroot}/%{_libdir}/intel-opencl/libigdrcl*.so.debug
104 rm -vf %{buildroot}/%{_libdir}/libocloc*.so.debug
105 rm -rvf %{buildroot}/usr/lib/debug/
106 #insert license into package
107 mkdir -p %{buildroot}/usr/share/doc/intel-level-zero-gpu%{?name_suffix}/
108 cp -pvR %{_sourcedir}/copyright %{buildroot}/usr/share/doc/intel-level-zero-gpu%{?name_suffix}/.
109
110 if [ -d "${NEO_NINJA_DUMP}" ]; then
111 cp -v .ninja* ${NEO_NINJA_DUMP}/
112 fi
113
114 %files -n intel-level-zero-gpu%{?name_suffix}
115 %defattr(-,root,root)
116 %{_libdir}/libze_intel_gpu*.so.*
117 /usr/share/doc/intel-level-zero-gpu%{?name_suffix}/copyright
118 %config(noreplace)
119
120 %files -n intel-level-zero-gpu%{?name_suffix}-devel
121 %{_includedir}/level_zero/zet_intel_gpu_debug.h
122
123 %doc
124
125 %changelog
126 * Mon Sep 13 2021 Compute-Runtime-Automation <[email protected]>
127 - Initial spec file for SLES 15.3