blob: c60b6c67f1ce932ac4f71ff1aa8af1a8baa49d5e (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
|
Name: bumblebee
Summary: Bumblebee - support for NVidia Optimus laptops on Linux!
Group: System/Kernel and hardware
Version: 3.0
Release: 1
URL: https://github.com/Bumblebee-Project/bumblebee
License: GPLv3
# source from git repo git://github.com/Bumblebee-Project/Bumblebee.git
Source0: Bumblebee.tar.xz
BuildRequires: X11-devel
BuildRequires: pkgconfig(glib-2.0)
BuildRequires: pkgconfig(libbsd)
BuildRequires: help2man
Requires(pre): update-alternatives
Requires(post): systemd-units
Requires(preun):systemd-units
Requires(postun):systemd-units
Requires: virtualgl
Requires: x11-driver-video-nvidia-current
Requires: dkms-bbswitch
Requires: dkms-acpi_call
%description
Bumblebee daemon is a rewrite of the original Bumblebee service,
providing an elegant and stable means of managing Optimus hybrid
graphics chipsets.
A primary goal of this project is to not only enable use of the
discrete GPU for rendering, but also to enable smart power management
of the dGPU when it's not in use.
%prep
%setup -qn Bumblebee
%build
autoreconf -fi
%configure \
CONF_DRIVER=nvidia \
CONF_DRIVER_MODULE_NVIDIA=nvidia-current \
CONF_LDPATH_NVIDIA=/usr/lib/nvidia-current:/usr/lib64/nvidia-current \
CONF_MODPATH_NVIDIA=/usr/lib/nvidia-current/xorg,/usr/lib64/nvidia-current/xorg,/usr/lib/xorg/modules,/usr/lib64/xorg/modules,/usr/lib/xorg/extra-modules,/usr/lib64/xorg/extra-modules
%make
%install
rm -rf %{buildroot}
%makeinstall_std
install -m644 -D scripts/systemd/bumblebeed.service %{buildroot}%{_sysconfdir}/systemd/system/bumblebeed.service
install -m644 -D scripts/sysvinit/bumblebeed %{buildroot}%{_initrddir}/%{name}/bumblebeed
%files
%doc README.markdown doc/RELEASE_NOTES_3_0
%config(noreplace) %{_sysconfdir}/bash_completion.d/bumblebee
%dir %{_sysconfdir}/bumblebee/
%config(noreplace) %{_sysconfdir}/bumblebee/bumblebee.conf
%config(noreplace) %{_sysconfdir}/bumblebee/xorg.conf.nouveau
%config(noreplace) %{_sysconfdir}/bumblebee/xorg.conf.nvidia
%{_sysconfdir}/systemd/system/bumblebeed.service
%{_initrddir}/%{name}/
%{_sbindir}/bumblebeed
%{_bindir}/optirun
%{_bindir}/bumblebee-bugreport
%{_mandir}/man1/bumblebeed.1*
%{_mandir}/man1/optirun.1*
%pre
%_pre_groupadd %{name}
if [ "$1" -eq "1" ];then
/usr/sbin/update-alternatives --set gl_conf %{_sysconfdir}/ld.so.conf.d/GL/standard.conf
fi
%post
%_post_service bumblebeed
if [ $1 -eq 1 ]; then
# Initial set
# Enable (but don't start) the unit by default
/bin/systemctl enable bumblebeed.service
fi
%preun
%_preun_service bumblebeed
if [ $1 -eq 0 ]; then
# Package removal, not upgrade
/bin/systemctl --no-reload disable bumblebeed.service
/bin/systemctl stop bumblebeed.service
fi
%postun
%_postun_groupdel %{name}
/bin/systemctl daemon-reload
if [ $1 -ge 1 ]; then
# Package upgrade, not uninstall
/bin/systemctl try-restart bumblebeed.service
fi
%changelog
* Mon Mar 19 2012 Simple <simplew8@gmailcom> 3.0-1
- 3.0 (from git), initial package
|