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