/[packages]/backports/4/primus/current/SPECS/primus.spec
ViewVC logotype

Contents of /backports/4/primus/current/SPECS/primus.spec

Parent Directory Parent Directory | Revision Log Revision Log


Revision 585502 - (show annotations) (download)
Fri Feb 7 20:44:13 2014 UTC (10 years, 1 month ago) by akien
Original Path: cauldron/primus/current/SPECS/primus.spec
File size: 3023 byte(s)
- Version the Provides
- SILENT: Remove trailing spaces

1 # This spec needs to be built once against core for the nouveau version of the script
2 # and once against nonfree for the nvidia version
3 # The script in itself is not nonfree content, but the nonfree repo must be self-contained
4 %if "%{?distro_section}" == "nonfree"
5 %define driver nvidia
6 %else
7 %define driver nouveau
8 %endif
9
10 %define date 20131127
11 %define libname %mklibname %{name}
12 %define _provides_exceptions \\.so
13
14 Name: primus
15 Summary: Minimalistic and efficient OpenGL offloading for Bumblebee
16 Group: System/Kernel and hardware
17 # Primus has no stable release and only a 0.1 tag
18 # Staying with version number 0.1 until another tag is published
19 Version: 0.1
20 Release: %mkrel -c %{date} 1
21 URL: https://github.com/amonakov/primus
22 License: ISC
23 Source0: %{name}-master.tar.gz
24 Patch0: %{name}-0.1-mga-libgl-nouveau.patch
25 Patch1: %{name}-0.1-mga-libgl-nvidia.patch
26 BuildRequires: pkgconfig(gl)
27 BuildRequires: pkgconfig(x11)
28 Requires: %{libname} = %{version}-%{release}
29 Requires: %{name}-bin = %{version}-%{release}
30
31 %description
32 Primus is a shared library that provides OpenGL and GLX APIs and
33 implements low-overhead local-only client-side OpenGL offloading via GLX
34 forking, similar to VirtualGL. It intercepts GLX calls and redirects GL
35 rendering to a secondary X display, presumably driven by a faster GPU.
36 On swapping buffers, rendered contents are read back using a PBO and
37 copied onto the drawable it was supposed to be rendered on in the first
38 place.
39
40 %if "%{?distro_section}" != "nonfree"
41 %files
42 %doc README.md technotes.md
43 %{_mandir}/man1/primusrun.1.xz
44 %{_sysconfdir}/bash_completion.d/%{name}
45
46 %package -n %{libname}
47 Summary: Shared library for Primus
48 Group: System/Libraries
49 Requires: %{name}
50
51 %description -n %{libname}
52 Libraries injected by Primus into applications that are ran through it.
53 Lib packages allow installing 32 and 64 bit libraries at the same time.
54
55 %files -n %{libname}
56 %dir %{_libdir}/%{name}
57 %{_libdir}/%{name}/libGL.so.1
58 %endif
59
60 %package %{driver}
61 Summary: primusrun script adapted to %{driver} driver
62 Group: System/Kernel and hardware
63 Requires: %{name}
64 Requires: bumblebee-%{driver}
65 Provides: %{name}-bin = %{version}
66
67 %description %{driver}
68 primusrun script patched against the %{driver} driver.
69
70 %files %{driver}
71 %{_bindir}/primusrun
72
73 #--------------------------------------------------------------------
74 %prep
75 %setup -qn primus-master
76 %if "%{?distro_section}" == "nonfree"
77 %patch1 -p1
78 %else
79 %patch0 -p1
80 %endif
81
82 %build
83 LIBDIR=%{_lib} %make CFLAGS="%{optflags}"
84
85 %install
86 install -Dm755 primusrun %{buildroot}%{_bindir}/primusrun
87 %if "%{?distro_section}" != "nonfree"
88 install -Dm755 %{_lib}/libGL.so.1 %{buildroot}%{_libdir}/%{name}/libGL.so.1
89 install -Dm644 primusrun.1 %{buildroot}%{_mandir}/man1/primusrun.1
90 install -Dm644 primus.bash-completion %{buildroot}%{_sysconfdir}/bash_completion.d/%{name}
91 %endif

  ViewVC Help
Powered by ViewVC 1.1.30