%define date 20131127 %define libname %mklibname %{name} Name: primus Summary: Minimalistic and efficient OpenGL offloading for Bumblebee Group: System/Kernel and hardware # Primus has no stable release and only a 0.1 tag # Staying with version number 0.1 until another tag is published Version: 0.1 Release: %mkrel -c %{date} 1 URL: https://github.com/amonakov/primus License: ISC Source0: %{name}-master.tar.gz Patch0: %{name}-0.2-mga-fdr-primuslibglfix.patch BuildRequires: pkgconfig(gl) BuildRequires: pkgconfig(x11) Requires: bumblebee Requires: libdri-drivers Requires: libmesagl Requires: %{libname} = %{version}-%{release} %description Primus is a shared library that provides OpenGL and GLX APIs and implements low-overhead local-only client-side OpenGL offloading via GLX forking, similar to VirtualGL. It intercepts GLX calls and redirects GL rendering to a secondary X display, presumably driven by a faster GPU. On swapping buffers, rendered contents are read back using a PBO and copied onto the drawable it was supposed to be rendered on in the first place. %package -n %{libname} Summary: Shared library for Primus Group: System/Libraries %description -n %{libname} Libraries injected by Primus into applications that are ran through it. Lib packages allow installing 32 and 64 bit libraries at the same time. %prep %setup -qn primus-master %apply_patches %build LIBDIR=%{_lib} %make CFLAGS="%{optflags}" %install install -Dm755 %{_lib}/libGL.so.1 %{buildroot}%{_libdir}/%{name}/libGL.so.1 install -Dm755 primusrun %{buildroot}%{_bindir}/primusrun install -Dm644 primusrun.1 %{buildroot}%{_mandir}/man1/primusrun.1 install -Dm644 primus.bash-completion %{buildroot}%{_sysconfdir}/bash_completion.d/%{name} %files %doc README.md technotes.md %{_bindir}/primusrun %{_mandir}/man1/primusrun.1.xz %{_sysconfdir}/bash_completion.d/%{name} %files -n %{libname} %dir %{_libdir}/%{name} %{_libdir}/%{name}/libGL.so.1