|
%bcond_with git |
|
|
%if %{with git} |
|
|
%define gitdate 20120228 |
|
|
%endif |
|
1 |
# Use nouveau driver by default |
# Use nouveau driver by default |
2 |
%bcond_with nvidia |
%bcond_with nvidia |
3 |
|
|
|
|
|
4 |
Name: bumblebee |
Name: bumblebee |
5 |
Summary: Support for NVidia Optimus laptops on Linux |
Summary: Support for NVidia Optimus laptops on Linux |
6 |
Group: System/Kernel and hardware |
Group: System/Kernel and hardware |
7 |
Version: 3.0.1 |
Version: 3.0.1 |
8 |
Release: %mkrel 2 |
Release: %mkrel 2 |
9 |
License: GPLv3 |
License: GPLv3+ |
10 |
URL: https://github.com/Bumblebee-Project/bumblebee |
URL: https://github.com/Bumblebee-Project/bumblebee |
11 |
# source from git repo git://github.com/Bumblebee-Project/Bumblebee.git |
# source from git repo git://github.com/Bumblebee-Project/Bumblebee.git |
12 |
# we need to change to develop branch to allow changing to nouveau without |
# we need to change to develop branch to allow changing to nouveau without |
13 |
# using nvidia paths |
# using nvidia paths |
14 |
Source0: https://github.com/downloads/Bumblebee-Project/Bumblebee/%{name}-%{!?with_git:%{version}}%{?with_git:%{gitdate}}.tar.%{?with_git:xz}%{!?with_git:gz} |
Source0: https://github.com/downloads/Bumblebee-Project/Bumblebee/%{name}-%{version}.tar.gz |
15 |
BuildRequires: pkgconfig(x11) |
BuildRequires: pkgconfig(x11) |
16 |
BuildRequires: pkgconfig(glib-2.0) |
BuildRequires: pkgconfig(glib-2.0) |
17 |
BuildRequires: pkgconfig(libbsd) |
BuildRequires: pkgconfig(libbsd) |
28 |
Requires: x11-driver-video-nouveau |
Requires: x11-driver-video-nouveau |
29 |
%endif |
%endif |
30 |
Requires: kmod(bbswitch) |
Requires: kmod(bbswitch) |
31 |
Requires: kmod(acpi_call) |
# Seems broken with current kernels (maybe not needed anymore?) |
32 |
|
#Requires: kmod(acpi_call) |
33 |
|
|
34 |
%description |
%description |
35 |
Bumblebee daemon is a rewrite of the original Bumblebee service, providing |
Bumblebee daemon is a rewrite of the original Bumblebee service, providing |
83 |
/usr/sbin/groupdel bumblebee |
/usr/sbin/groupdel bumblebee |
84 |
fi |
fi |
85 |
|
|
86 |
# Simple: we need to ensure bumblebee group isnt removed when upgrading |
# Simple: we need to ensure bumblebee group isn't removed when upgrading |
87 |
# This doesnt need exist for Mageia 2 |
# This doesnt need exist for Mageia 2 |
88 |
%triggerpostun -- %{name} < 3.0-9 |
%triggerpostun -- %{name} < 3.0-9 |
89 |
%_pre_groupadd %{name} |
%_pre_groupadd %{name} |
94 |
|
|
95 |
#-------------------------------------------------------------------- |
#-------------------------------------------------------------------- |
96 |
%prep |
%prep |
97 |
%setup -q%{?with_git:n %{name}} |
%setup -q |
98 |
|
|
99 |
%build |
%build |
|
%{?with_git:NOCONFIGURE=1 autoreconf -fi} |
|
100 |
%configure2_5x \ |
%configure2_5x \ |
101 |
%if %{with nvidia} |
%if %{with nvidia} |
102 |
CONF_DRIVER=nvidia \ |
CONF_DRIVER=nvidia \ |
112 |
CONF_MODPATH_NVIDIA=%{_usr}/lib/nvidia-current/xorg,%{_usr}/lib/xorg/modules,%{_usr}/lib/xorg/extra-modules |
CONF_MODPATH_NVIDIA=%{_usr}/lib/nvidia-current/xorg,%{_usr}/lib/xorg/modules,%{_usr}/lib/xorg/extra-modules |
113 |
%endif |
%endif |
114 |
|
|
115 |
%make |
%make CFLAGS="%{optflags}" |
116 |
|
|
117 |
%install |
%install |
|
rm -rf %{buildroot} |
|
118 |
%makeinstall_std |
%makeinstall_std |
119 |
|
|
120 |
install -D -m644 scripts/systemd/bumblebeed.service %{buildroot}/lib/systemd/system/bumblebeed.service |
install -D -m644 scripts/systemd/bumblebeed.service %{buildroot}/lib/systemd/system/bumblebeed.service |