Debian Codegraph @

scripts/packaging/opencl/rhel_8/SPECS/opencl.spec

raw
1 #it's changed by external script
2 %global rel i1
3 %global ver xxx
4 %global NEO_OCL_VERSION_MAJOR xxx
5 %global NEO_OCL_VERSION_MINOR xxx
6 %global NEO_OCL_VERSION_BUILD xxx
7 %global NEO_RELEASE_WITH_REGKEYS FALSE
8 %global NEO_ENABLE_I915_PRELIM_DETECTION FALSE
9 %global NEO_ENABLE_XE_PRELIM_DETECTION FALSE
10 %global NEO_ENABLE_XE_EU_DEBUG_SUPPORT FALSE
11 %global NEO_USE_XE_EU_DEBUG_EXP_UPSTREAM FALSE
12 %global NEO_I915_PRELIM_HEADERS_DIR %{nil}
13
14 %define _source_payload w5T16.xzdio
15 %define _binary_payload w5T16.xzdio
16
17 Name: intel-opencl
18 Epoch: 1
19 Version: %{ver}
20 Release: %{rel}%{?dist}
21 Summary: Intel(R) Graphics Compute Runtime for OpenCL(TM)
22
23 Group: System Environment/Libraries
24 License: MIT
25 URL: https://github.com/intel/compute-runtime
26 Source0: %{url}/archive/%{version}/compute-runtime.tar.xz
27 Source1: copyright
28 %if "%{NEO_I915_PRELIM_HEADERS_DIR}" != ""
29 Source2: uapi.tar.xz
30 %endif
31
32 Requires: intel-gmmlib
33 Requires: intel-igc-opencl-2
34
35 BuildRequires: libva-devel gcc-c++ cmake ninja-build make
36 BuildRequires: intel-gmmlib-devel
37 BuildRequires: intel-igc-opencl-devel
38
39 %description
40 Intel(R) Graphics Compute Runtime for OpenCL(TM) is a open source project to converge Intel's development efforts on OpenCL(TM) compute stacks supporting the GEN graphics hardware architecture.
41
42 %package -n intel-ocloc
43 Summary: ocloc package for opencl
44 Requires: intel-igc-opencl-2
45 %description -n intel-ocloc
46 Intel(R) Graphics Compute Runtime for OpenCL(TM) is a open source project to converge Intel's development efforts on OpenCL(TM) compute stacks supporting the GEN graphics hardware architecture.
47
48 %define debug_package %{nil}
49
50 %prep
51 %if "%{NEO_I915_PRELIM_HEADERS_DIR}" == ""
52 %autosetup -p1 -n compute-runtime
53 %else
54 %autosetup -p1 -n compute-runtime -b 2
55 %endif
56
57 %build
58 mkdir build
59 cd build
60 %cmake .. \
61 -GNinja ${NEO_BUILD_EXTRA_OPTS} \
62 -DNEO_OCL_VERSION_MAJOR=%{NEO_OCL_VERSION_MAJOR} \
63 -DNEO_OCL_VERSION_MINOR=%{NEO_OCL_VERSION_MINOR} \
64 -DNEO_VERSION_BUILD=%{NEO_OCL_VERSION_BUILD} \
65 -DCMAKE_BUILD_TYPE=Release \
66 -DBUILD_WITH_L0=FALSE \
67 -DNEO_SKIP_UNIT_TESTS=TRUE \
68 -DNEO_ENABLE_I915_PRELIM_DETECTION=%{NEO_ENABLE_I915_PRELIM_DETECTION} \
69 -DNEO_ENABLE_XE_PRELIM_DETECTION=%{NEO_ENABLE_XE_PRELIM_DETECTION} \
70 -DNEO_ENABLE_XE_EU_DEBUG_SUPPORT=%{NEO_ENABLE_XE_EU_DEBUG_SUPPORT} \
71 -DNEO_USE_XE_EU_DEBUG_EXP_UPSTREAM=%{NEO_USE_XE_EU_DEBUG_EXP_UPSTREAM} \
72 -DRELEASE_WITH_REGKEYS=%{NEO_RELEASE_WITH_REGKEYS} \
73 -DCMAKE_VERBOSE_MAKEFILE=FALSE \
74 -DNEO_I915_PRELIM_HEADERS_DIR=$(realpath %{NEO_I915_PRELIM_HEADERS_DIR})
75 %ninja_build
76
77 %install
78 cd build
79 %ninja_install
80
81 chmod +x %{buildroot}/%{_libdir}/intel-opencl/libigdrcl.so
82 chmod +x %{buildroot}/%{_libdir}/libocloc.so
83 rm -vf %{buildroot}/%{_libdir}/intel-opencl/libigdrcl.so.debug
84 rm -vf %{buildroot}/%{_libdir}/libocloc.so.debug
85 rm -rvf %{buildroot}/usr/lib/debug/
86 #insert license into package
87 mkdir -p %{buildroot}/usr/share/doc/intel-opencl/
88 cp -pvR %{_sourcedir}/copyright %{buildroot}/usr/share/doc/intel-opencl/.
89 mkdir -p %{buildroot}/usr/share/doc/intel-ocloc/
90 cp -pvR %{_sourcedir}/copyright %{buildroot}/usr/share/doc/intel-ocloc/.
91
92 if [ -d "${NEO_NINJA_DUMP}" ]; then
93 cp -v .ninja* ${NEO_NINJA_DUMP}/
94 fi
95
96 %files
97 %defattr(-,root,root)
98 %{_libdir}/intel-opencl/libigdrcl.so
99 %config(noreplace)
100 /etc/OpenCL/vendors/intel.icd
101 /usr/share/doc/intel-opencl/copyright
102
103 %files -n intel-ocloc
104 %defattr(-,root,root)
105 %{_bindir}/ocloc
106 %{_libdir}/libocloc.so
107 %{_includedir}/ocloc_api.h
108 %config(noreplace)
109 /usr/share/doc/intel-ocloc/copyright
110
111 %doc
112
113 %changelog
114 * Wed May 6 2020 Pavel Androniychuk <[email protected]> - 20.17.16650
115 - Update spec files to pull version automatically.
116
117 * Tue Apr 28 2020 Jacek Danecki <[email protected]> - 20.16.16582-1
118 - Update to 20.16.16582
119
120 * Tue Mar 03 2020 Jacek Danecki <[email protected]> - 20.08.15750-1
121 - Update to 20.08.15750
122
123 * Tue Jan 14 2020 Jacek Danecki <[email protected]> - 20.01.15264-1
124 - Update to 20.01.15264
125 - Updated IGC
126 - Updated gmmlib