]>
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 | |
b4439341 JK |
21 | Patch0: cflags.patch |
22 | Patch1: static_llvm.patch | |
22ed1ab0 JK |
23 | URL: http://www.freedesktop.org/wiki/Software/Beignet/ |
24 | BuildRequires: Mesa-libgbm-devel | |
039979b7 | 25 | BuildRequires: Mesa-libEGL-devel |
978e36e0 | 26 | BuildRequires: OpenGL-devel |
22ed1ab0 | 27 | BuildRequires: clang-devel |
9dfe627a | 28 | BuildRequires: cmake >= 2.6.0 |
22ed1ab0 | 29 | BuildRequires: libdrm-devel |
039979b7 | 30 | BuildRequires: libedit-devel |
9dfe627a | 31 | BuildRequires: libstdc++-devel |
039979b7 JK |
32 | BuildRequires: llvm >= 3.6 |
33 | BuildRequires: llvm-devel >= 3.6 | |
34 | BuildRequires: ncurses-devel | |
22ed1ab0 | 35 | BuildRequires: ocl-icd-devel |
9dfe627a JB |
36 | BuildRequires: pkgconfig |
37 | BuildRequires: python | |
38 | BuildRequires: sed >= 4.0 | |
22ed1ab0 JK |
39 | BuildRequires: xorg-lib-libXext-devel |
40 | BuildRequires: xorg-lib-libXfixes-devel | |
039979b7 | 41 | BuildRequires: zlib-devel |
22ed1ab0 JK |
42 | Provides: ocl-icd(beignet) |
43 | Provides: ocl-icd-driver | |
44 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) | |
45 | ||
46 | %description | |
47 | Beignet is an open source implementation of the OpenCL specification - | |
48 | a generic compute oriented API. This code base contains the code to | |
49 | run OpenCL programs on Intel GPUs which basically defines and | |
50 | implements the OpenCL host functions required to initialize the | |
51 | device, create the command queues, the kernels and the programs and | |
52 | run them on the GPU. | |
53 | ||
9dfe627a JB |
54 | %description -l pl.UTF-8 |
55 | Beignet to mająca otwarte źródła implementacja specyfikacji OpenCL - | |
56 | ogólnego API przeznaczonego do obliczeń. Ten pakiet zawiera kod do | |
57 | uruchamiania programów OpenCL na procesorach graficznych (GPU) firmy | |
58 | Intel; kod ten zasadniczo definiuje i implementuje funkcje hosta | |
59 | OpenCL wymagane do zainicjowania urządzenia, tworzenia kolejek | |
60 | poleceń, jądra i programów oraz uruchamia je na GPU. | |
61 | ||
22ed1ab0 | 62 | %prep |
039979b7 | 63 | %setup -qn Beignet-%{version}-Source |
22ed1ab0 | 64 | |
b4439341 JK |
65 | %patch0 -p1 |
66 | %patch1 -p1 | |
67 | ||
9dfe627a | 68 | |
22ed1ab0 JK |
69 | %build |
70 | install -d build | |
71 | cd build | |
72 | %cmake \ | |
73 | -DLIB_INSTALL_DIR=%{_libdir} \ | |
978e36e0 JK |
74 | -DCMAKE_CXX_FLAGS_PLD="%{rpmcxxflags} -DNDEBUG -DGBE_DEBUG=0" \ |
75 | -DCMAKE_C_FLAGS_PLD="%{rpmcxxflags} -DNDEBUG -DGBE_DEBUG=0" \ | |
039979b7 | 76 | -DGEN_PCI_ID=%{gen_pci_id} \ |
22ed1ab0 JK |
77 | ../ |
78 | %{__make} | |
79 | ||
80 | %install | |
81 | rm -rf $RPM_BUILD_ROOT | |
82 | ||
83 | %{__make} -C build install \ | |
84 | DESTDIR=$RPM_BUILD_ROOT | |
85 | ||
9dfe627a | 86 | %{__rm} -r $RPM_BUILD_ROOT%{_includedir} |
22ed1ab0 JK |
87 | |
88 | %clean | |
89 | rm -rf $RPM_BUILD_ROOT | |
90 | ||
91 | %files | |
92 | %defattr(644,root,root,755) | |
93 | %doc docs/* | |
94 | %dir %{_libdir}/%{name} | |
95 | %{_libdir}/%{name}/beignet.bc | |
96 | %attr(755,root,root) %{_libdir}/%{name}/libcl.so | |
978e36e0 JK |
97 | %attr(755,root,root) %{_libdir}/%{name}/libgbe.so |
98 | %attr(755,root,root) %{_libdir}/%{name}/libgbeinterp.so | |
b4439341 JK |
99 | %{_libdir}/%{name}/beignet.pch |
100 | %{_libdir}/%{name}/beignet_20.bc | |
101 | %{_libdir}/%{name}/beignet_20.pch | |
102 | %{_libdir}/%{name}/include | |
22ed1ab0 | 103 | /etc/OpenCL/vendors/intel-beignet.icd |