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

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 585501 - (hide annotations) (download)
Fri Feb 7 20:41:43 2014 UTC (10 years, 1 month ago) by akien
Original Path: cauldron/primus/current/SPECS/primus.spec
File size: 3016 byte(s)
Adapt spec to package both nouveau (core) and nvidia (nonfree) versions
1 akien 585501 # 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 akien 584812 %define date 20131127
11 akien 584823 %define libname %mklibname %{name}
12 akien 585374 %define _provides_exceptions \\.so
13 akien 584812
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 akien 585501 Patch0: %{name}-0.1-mga-libgl-nouveau.patch
25     Patch1: %{name}-0.1-mga-libgl-nvidia.patch
26 akien 584812 BuildRequires: pkgconfig(gl)
27     BuildRequires: pkgconfig(x11)
28 akien 584823 Requires: %{libname} = %{version}-%{release}
29 akien 585501 Requires: %{name}-bin = %{version}-%{release}
30 akien 584812
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 akien 585501 %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 akien 584823 %package -n %{libname}
47 akien 584812 Summary: Shared library for Primus
48     Group: System/Libraries
49 akien 585501 Requires: %{name}
50 akien 584812
51 akien 584823 %description -n %{libname}
52 akien 584812 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 akien 585501 %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
66    
67     %description %{driver}
68     primusrun script patched against the %{driver} driver.
69    
70     %files %{driver}
71     %{_bindir}/primusrun
72    
73     #--------------------------------------------------------------------
74 akien 584812 %prep
75     %setup -qn primus-master
76 akien 585501 %if "%{?distro_section}" == "nonfree"
77     %patch1 -p1
78     %else
79     %patch0 -p1
80     %endif
81 akien 584812
82     %build
83     LIBDIR=%{_lib} %make CFLAGS="%{optflags}"
84    
85     %install
86 akien 585501 install -Dm755 primusrun %{buildroot}%{_bindir}/primusrun
87     %if "%{?distro_section}" != "nonfree"
88 akien 584812 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 akien 585501 %endif

  ViewVC Help
Powered by ViewVC 1.1.30