]>
Commit | Line | Data |
---|---|---|
039979b7 JK |
1 | # |
2 | # TODO: | |
3 | # - make it build with our LLVM | |
4 | # | |
5 | ||
6 | # Conditional build: | |
7 | %bcond_with host_pci_id # build specifically for the build host | |
8 | ||
9 | # by default build kernel for Intel Ivybridge | |
10 | %define gen_pci_id 0x0162 | |
11 | ||
22ed1ab0 | 12 | Summary: Open source implementation of the OpenCL specification for Intel GPUs |
9dfe627a | 13 | Summary(pl.UTF-8): Mająca otwarte źródła implementacja specyfikacji OpenGL dla GPU formy Intel |
22ed1ab0 | 14 | Name: beignet |
039979b7 JK |
15 | Version: 1.3.1 |
16 | Release: 0.1 | |
9dfe627a | 17 | License: LGPL v2+ |
22ed1ab0 | 18 | Group: Libraries |
039979b7 JK |
19 | Source0: https://01.org/sites/default/files/beignet-%{version}-source.tar.gz |
20 | # Source0-md5: 850886a71a34672ca26a42046d0bb442 | |
22ed1ab0 JK |
21 | URL: http://www.freedesktop.org/wiki/Software/Beignet/ |
22 | BuildRequires: Mesa-libgbm-devel | |
039979b7 | 23 | BuildRequires: Mesa-libEGL-devel |
978e36e0 | 24 | BuildRequires: OpenGL-devel |
22ed1ab0 | 25 | BuildRequires: clang-devel |
9dfe627a | 26 | BuildRequires: cmake >= 2.6.0 |
22ed1ab0 | 27 | BuildRequires: libdrm-devel |
039979b7 | 28 | BuildRequires: libedit-devel |
9dfe627a | 29 | BuildRequires: libstdc++-devel |
039979b7 JK |
30 | BuildRequires: llvm >= 3.6 |
31 | BuildRequires: llvm-devel >= 3.6 | |
32 | BuildRequires: ncurses-devel | |
22ed1ab0 | 33 | BuildRequires: ocl-icd-devel |
9dfe627a JB |
34 | BuildRequires: pkgconfig |
35 | BuildRequires: python | |
36 | BuildRequires: sed >= 4.0 | |
22ed1ab0 JK |
37 | BuildRequires: xorg-lib-libXext-devel |
38 | BuildRequires: xorg-lib-libXfixes-devel | |
039979b7 | 39 | BuildRequires: zlib-devel |
22ed1ab0 JK |
40 | Provides: ocl-icd(beignet) |
41 | Provides: ocl-icd-driver | |
42 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) | |
43 | ||
44 | %description | |
45 | Beignet is an open source implementation of the OpenCL specification - | |
46 | a generic compute oriented API. This code base contains the code to | |
47 | run OpenCL programs on Intel GPUs which basically defines and | |
48 | implements the OpenCL host functions required to initialize the | |
49 | device, create the command queues, the kernels and the programs and | |
50 | run them on the GPU. | |
51 | ||
9dfe627a JB |
52 | %description -l pl.UTF-8 |
53 | Beignet to mająca otwarte źródła implementacja specyfikacji OpenCL - | |
54 | ogólnego API przeznaczonego do obliczeń. Ten pakiet zawiera kod do | |
55 | uruchamiania programów OpenCL na procesorach graficznych (GPU) firmy | |
56 | Intel; kod ten zasadniczo definiuje i implementuje funkcje hosta | |
57 | OpenCL wymagane do zainicjowania urządzenia, tworzenia kolejek | |
58 | poleceń, jądra i programów oraz uruchamia je na GPU. | |
59 | ||
22ed1ab0 | 60 | %prep |
039979b7 | 61 | %setup -qn Beignet-%{version}-Source |
22ed1ab0 | 62 | |
9dfe627a JB |
63 | # allow to override CMAKE_VERBOSE_MAKEFILE |
64 | %{__sed} -i -e '/^SET(CMAKE_VERBOSE_MAKEFILE "false")/d' CMakeLists.txt | |
65 | ||
22ed1ab0 JK |
66 | %build |
67 | install -d build | |
68 | cd build | |
69 | %cmake \ | |
70 | -DLIB_INSTALL_DIR=%{_libdir} \ | |
978e36e0 JK |
71 | -DCMAKE_CXX_FLAGS_PLD="%{rpmcxxflags} -DNDEBUG -DGBE_DEBUG=0" \ |
72 | -DCMAKE_C_FLAGS_PLD="%{rpmcxxflags} -DNDEBUG -DGBE_DEBUG=0" \ | |
039979b7 | 73 | -DGEN_PCI_ID=%{gen_pci_id} \ |
22ed1ab0 JK |
74 | ../ |
75 | %{__make} | |
76 | ||
77 | %install | |
78 | rm -rf $RPM_BUILD_ROOT | |
79 | ||
80 | %{__make} -C build install \ | |
81 | DESTDIR=$RPM_BUILD_ROOT | |
82 | ||
9dfe627a | 83 | %{__rm} -r $RPM_BUILD_ROOT%{_includedir} |
22ed1ab0 JK |
84 | |
85 | %clean | |
86 | rm -rf $RPM_BUILD_ROOT | |
87 | ||
88 | %files | |
89 | %defattr(644,root,root,755) | |
90 | %doc docs/* | |
91 | %dir %{_libdir}/%{name} | |
92 | %{_libdir}/%{name}/beignet.bc | |
93 | %attr(755,root,root) %{_libdir}/%{name}/libcl.so | |
978e36e0 JK |
94 | %attr(755,root,root) %{_libdir}/%{name}/libgbe.so |
95 | %attr(755,root,root) %{_libdir}/%{name}/libgbeinterp.so | |
22ed1ab0 JK |
96 | %{_libdir}/%{name}/ocl_stdlib.h |
97 | %{_libdir}/%{name}/ocl_stdlib.h.pch | |
98 | /etc/OpenCL/vendors/intel-beignet.icd |