File primus.spec of Package primus
#
# spec file for package primus
#
# Copyright (c) 2014 SUSE LINUX Products GmbH, Nuernberg, Germany.
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.
# Please submit bugfixes or comments via http://bugs.opensuse.org/
#
Name: primus
Version: 20131226
Release: 0
Summary: Faster OpenGL offloading for Bumblebee
License: HPND
Group: Hardware/Other
Url: https://github.com/amonakov/primus
Source0: %{name}-master.zip
Source1: primusrun
Source2: baselibs.conf
# PATCH-FIX-UPSTREAM Use % in .type directive since @ is a comment character on arm
Patch0: type-directive.patch
BuildRequires: Mesa-libGL-devel
BuildRequires: gcc-c++
BuildRequires: libX11-devel
BuildRequires: unzip
Requires: bumblebee
BuildRoot: %{_tmppath}/%{name}-%{version}-build
%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.
%prep
%setup -q -n primus-master
%patch0 -p1
cp -p %{SOURCE1} .
%build
export CXXFLAGS="%{optflags}"
make %{?_smp_mflags}
%install
install -D "%{_builddir}/%{name}-master/lib/libGL.so.1" "%{buildroot}%{_libdir}/primus/libGL.so.1"
install -D "%{_builddir}/%{name}-master/primusrun" "%{buildroot}%{_bindir}/primusrun"
%files
%defattr(-,root,root)
%doc LICENSE.txt README.md
%{_libdir}/primus
%{_libdir}/primus/libGL.so.1
%{_bindir}/primusrun
%changelog