File beignet.spec of Package beignet

#
# spec file for package beignet
#
# Copyright (c) 2018 SUSE LINUX GmbH, Nuernberg, Germany.
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.

# Please submit bugfixes or comments via http://bugs.opensuse.org/
#


Name:           beignet
Version:        1.3.2
Release:        0
Summary:        OpenCL implementation for Intel GPUs
License:        LGPL-2.1+
Group:          Development/Libraries/C and C++
Url:            https://01.org/beignet/
Source0:        https://01.org/sites/default/files/%{name}-%{version}-source.tar.gz
Source99:       beignet-rpmlintrc
BuildRequires:  cmake
BuildRequires:  gcc-c++
BuildRequires:  ncurses-devel
BuildRequires:  opencl-headers
BuildRequires:  pkgconfig
BuildRequires:  pkgconfig(egl)
BuildRequires:  pkgconfig(gl)
BuildRequires:  pkgconfig(ice)
BuildRequires:  pkgconfig(ocl-icd)
BuildRequires:  pkgconfig(zlib)
# exclusive to Intel GPU
ExclusiveArch:  %{ix86} x86_64
%if 0%{?suse_version} > 1320
BuildRequires:  clang-devel >= 3.3
%else
BuildRequires:  llvm-clang >= 3.3
BuildRequires:  llvm-clang-devel >= 3.3
BuildRequires:  llvm-devel >= 3.3
%endif

%description
Beignet is an implementation of the OpenCL specification - a generic
compute oriented API. This code base contains the code to run OpenCL programs
on Intel GPUs, which basically defines and implements the OpenCL host functions
required to initialize the device, create the command queues, the kernels and
the programs and run them on the GPU.

%package devel
Summary:        Development files for Beignet, a OpenCL implementation for Intel GPUs
Group:          Development/Libraries/C and C++
Requires:       %{name} = %{version}-%{release}
Requires:       opencl-headers

%description devel
Devel package for Beignet, an implementation of the OpenCL
specification, a generic compute oriented API.

%prep
%setup -q -n Beignet-%{version}-Source

%build
%cmake \
	-DLLVM_INSTALL_DIR=%{_bindir}/
%make_jobs

%install
%cmake_install
find %{buildroot}%{_includedir}/CL/ -regextype posix-egrep -not -regex ".*(cl_intel.h)" -type f -delete

%files
%doc COPYING README.md
%{_libdir}/beignet/
%{_sysconfdir}/OpenCL/vendors/intel-beignet.icd
%dir %{_sysconfdir}/OpenCL
%dir %{_sysconfdir}/OpenCL/vendors

%files devel
%doc docs/*
%{_includedir}/CL/cl_intel.h

%changelog
openSUSE Build Service is sponsored by