File beignet.spec of Package beignet
#
# spec file for package beignet
#
# Copyright (c) 2016 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.1.2
Release: 0
Summary: Open source implementation of the OpenCL 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
Patch0: gcc6-support.patch
Patch1: llvm38-support.patch
Patch2: std-isnan-isinf.patch
BuildRequires: cmake
BuildRequires: gcc-c++
BuildRequires: llvm >= 3.3
BuildRequires: llvm-clang >= 3.3
BuildRequires: llvm-clang-devel >= 3.3
BuildRequires: llvm-devel >= 3.3
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
%description
Beignet is an open source 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: Open source implementation of the OpenCL for Intel GPUs devel package
Group: Development/Libraries/C and C++
Requires: %{name} = %{version}-%{release}
Requires: opencl-headers
%description devel
Devel package for Beignet is an open source implementation of the OpenCL
specification - a generic compute oriented API.
%prep
%setup -q -n Beignet-%{version}-Source
%patch0 -p1
%patch1 -p1
%patch2 -p1
%build
%cmake \
-DLLVM_INSTALL_DIR=%{_bindir}/ \
-DCMAKE_BUILD_TYPE=Release
make VERBOSE=1 %{?_smp_mflags}
%install
%cmake_install
find %{buildroot}%{_includedir}/CL/ -regextype posix-egrep -not -regex ".*(cl_intel.h)" -type f -delete
%files
%defattr(-,root,root)
%doc COPYING README.md
%{_libdir}/beignet/
%{_sysconfdir}/OpenCL/vendors/intel-beignet.icd
%dir %{_sysconfdir}/OpenCL
%dir %{_sysconfdir}/OpenCL/vendors
%files devel
%defattr(-,root,root)
%doc docs/*
%{_includedir}/CL/cl_intel.h
%changelog