File level-zero.spec of Package level-zero

Name:       level-zero
Version:        1.8.5
Release:        lp153.14.1
Summary:    oneAPI Level Zero Specification Headers and Loader 

License:    MIT
URL:        https://github.com/oneapi-src/level-zero
Source0:    %{url}/archive/v%{version}.tar.gz
Packager:  Alessandro de Oliveira Faria (A.K.A CABELO) <cabelo@opensuse.org>
ExclusiveArch:  x86_64
%define debug_package %{nil}

BuildRequires: gcc-c++ cmake make opencl-headers

%description
The objective of the oneAPI Level-Zero Application Programming Interface (API) is to provide direct-to-metal interfaces to offload accelerator devices. Its programming interface can be tailored to any device needs and can be adapted to support broader set of languages features such as function pointers, virtual functions, unified memory, and I/O capabilities.

%package       devel
Summary:       The oneAPI Level Zero Specification Headers and Loader development package.
Requires:      %{name} = %{version}-%{release}

%description   devel
The %{name}-devel package contains library and header files for developing applications that use %{name}.

%prep
%setup -n level-zero-%{version}

%build
%if 0%{?suse_version}
%cmake ..
%else
mkdir build
cd build
cmake -DCMAKE_INSTALL_PREFIX=%{_prefix} ..
%endif
cmake --build . --config Release

%install
%make_install -C build

%post -p /sbin/ldconfig
%postun -p /sbin/ldconfig

%files
%{_libdir}/libze_loader.so.*
%{_libdir}/libze_validation_layer.so.*
%{_libdir}/libze_tracing_layer.so.*

%files devel
%dir %{_includedir}/level_zero
%{_includedir}/level_zero/*
%{_libdir}/libze_loader.so
%{_libdir}/libze_validation_layer.so
%{_libdir}/libze_tracing_layer.so
%{_libdir}/pkgconfig/libze_loader.pc
%{_libdir}/pkgconfig/level-zero.pc

%changelog
* Tue Jun 28 2022 Alessandro de Oliveira Faria <cabelo@opensuse.org>
- Update to version v1.8.'
  * Add missing stypes for spec 1.4 features
  * Fix argument names in topology APIs
openSUSE Build Service is sponsored by