1 |
%define date 20131127 |
2 |
%define libname %mklibname %{name} |
3 |
|
4 |
Name: primus |
5 |
Summary: Minimalistic and efficient OpenGL offloading for Bumblebee |
6 |
Group: System/Kernel and hardware |
7 |
# Primus has no stable release and only a 0.1 tag |
8 |
# Staying with version number 0.1 until another tag is published |
9 |
Version: 0.1 |
10 |
Release: %mkrel -c %{date} 1 |
11 |
URL: https://github.com/amonakov/primus |
12 |
License: ISC |
13 |
Source0: %{name}-master.tar.gz |
14 |
Patch0: %{name}-0.2-mga-fdr-primuslibglfix.patch |
15 |
BuildRequires: pkgconfig(gl) |
16 |
BuildRequires: pkgconfig(x11) |
17 |
Requires: bumblebee |
18 |
Requires: libdri-drivers |
19 |
Requires: libmesagl |
20 |
Requires: %{libname} = %{version}-%{release} |
21 |
|
22 |
%description |
23 |
Primus is a shared library that provides OpenGL and GLX APIs and |
24 |
implements low-overhead local-only client-side OpenGL offloading via GLX |
25 |
forking, similar to VirtualGL. It intercepts GLX calls and redirects GL |
26 |
rendering to a secondary X display, presumably driven by a faster GPU. |
27 |
On swapping buffers, rendered contents are read back using a PBO and |
28 |
copied onto the drawable it was supposed to be rendered on in the first |
29 |
place. |
30 |
|
31 |
%package -n %{libname} |
32 |
Summary: Shared library for Primus |
33 |
Group: System/Libraries |
34 |
|
35 |
%description -n %{libname} |
36 |
Libraries injected by Primus into applications that are ran through it. |
37 |
Lib packages allow installing 32 and 64 bit libraries at the same time. |
38 |
|
39 |
%prep |
40 |
%setup -qn primus-master |
41 |
%apply_patches |
42 |
|
43 |
%build |
44 |
LIBDIR=%{_lib} %make CFLAGS="%{optflags}" |
45 |
|
46 |
%install |
47 |
install -Dm755 %{_lib}/libGL.so.1 %{buildroot}%{_libdir}/%{name}/libGL.so.1 |
48 |
install -Dm755 primusrun %{buildroot}%{_bindir}/primusrun |
49 |
install -Dm644 primusrun.1 %{buildroot}%{_mandir}/man1/primusrun.1 |
50 |
install -Dm644 primus.bash-completion %{buildroot}%{_sysconfdir}/bash_completion.d/%{name} |
51 |
|
52 |
%files |
53 |
%doc README.md technotes.md |
54 |
%{_bindir}/primusrun |
55 |
%{_mandir}/man1/primusrun.1.xz |
56 |
%{_sysconfdir}/bash_completion.d/%{name} |
57 |
|
58 |
%files -n %{libname} |
59 |
%dir %{_libdir}/%{name} |
60 |
%{_libdir}/%{name}/libGL.so.1 |