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 |
%define date 20131127 |
11 |
%define libname %mklibname %{name} |
%define libname %mklibname %{name} |
12 |
%define _provides_exceptions \\.so |
%define _provides_exceptions \\.so |
21 |
URL: https://github.com/amonakov/primus |
URL: https://github.com/amonakov/primus |
22 |
License: ISC |
License: ISC |
23 |
Source0: %{name}-master.tar.gz |
Source0: %{name}-master.tar.gz |
24 |
Patch0: %{name}-0.1-mga-fdr-primuslibglfix.patch |
Patch0: %{name}-0.1-mga-libgl-nouveau.patch |
25 |
|
Patch1: %{name}-0.1-mga-libgl-nvidia.patch |
26 |
BuildRequires: pkgconfig(gl) |
BuildRequires: pkgconfig(gl) |
27 |
BuildRequires: pkgconfig(x11) |
BuildRequires: pkgconfig(x11) |
|
Requires: bumblebee |
|
28 |
Requires: %{libname} = %{version}-%{release} |
Requires: %{libname} = %{version}-%{release} |
29 |
|
Requires: %{name}-bin = %{version}-%{release} |
30 |
|
|
31 |
%description |
%description |
32 |
Primus is a shared library that provides OpenGL and GLX APIs and |
Primus is a shared library that provides OpenGL and GLX APIs and |
37 |
copied onto the drawable it was supposed to be rendered on in the first |
copied onto the drawable it was supposed to be rendered on in the first |
38 |
place. |
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} |
%package -n %{libname} |
47 |
Summary: Shared library for Primus |
Summary: Shared library for Primus |
48 |
Group: System/Libraries |
Group: System/Libraries |
49 |
|
Requires: %{name} |
50 |
|
|
51 |
%description -n %{libname} |
%description -n %{libname} |
52 |
Libraries injected by Primus into applications that are ran through it. |
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. |
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 |
66 |
|
|
67 |
|
%description %{driver} |
68 |
|
primusrun script patched against the %{driver} driver. |
69 |
|
|
70 |
|
%files %{driver} |
71 |
|
%{_bindir}/primusrun |
72 |
|
|
73 |
|
#-------------------------------------------------------------------- |
74 |
%prep |
%prep |
75 |
%setup -qn primus-master |
%setup -qn primus-master |
76 |
%apply_patches |
%if "%{?distro_section}" == "nonfree" |
77 |
|
%patch1 -p1 |
78 |
|
%else |
79 |
|
%patch0 -p1 |
80 |
|
%endif |
81 |
|
|
82 |
%build |
%build |
83 |
LIBDIR=%{_lib} %make CFLAGS="%{optflags}" |
LIBDIR=%{_lib} %make CFLAGS="%{optflags}" |
84 |
|
|
85 |
%install |
%install |
|
install -Dm755 %{_lib}/libGL.so.1 %{buildroot}%{_libdir}/%{name}/libGL.so.1 |
|
86 |
install -Dm755 primusrun %{buildroot}%{_bindir}/primusrun |
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 |
install -Dm644 primusrun.1 %{buildroot}%{_mandir}/man1/primusrun.1 |
90 |
install -Dm644 primus.bash-completion %{buildroot}%{_sysconfdir}/bash_completion.d/%{name} |
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 |
|
91 |
|
%endif |