/[packages]/cauldron/bumblebee/current/SPECS/bumblebee.spec
ViewVC logotype

Contents of /cauldron/bumblebee/current/SPECS/bumblebee.spec

Parent Directory Parent Directory | Revision Log Revision Log


Revision 565729 - (show annotations) (download)
Wed Jan 8 23:35:55 2014 UTC (10 years, 9 months ago) by akien
File size: 4289 byte(s)
- Update to upstream 3.2.1: https://raw.github.com/Bumblebee-Project/Bumblebee/master/doc/RELEASE_NOTES_3_2_1
- Changelog for 3.1: https://raw.github.com/Bumblebee-Project/Bumblebee/master/doc/RELEASE_NOTES_3_2
- Changelog for 3.2: https://raw.github.com/Bumblebee-Project/Bumblebee/master/doc/RELEASE_NOTES_3_1

1 # Use nouveau driver by default
2 %bcond_with nvidia
3
4 Name: bumblebee
5 Summary: Support for NVidia Optimus laptops on Linux
6 Group: System/Kernel and hardware
7 Version: 3.2.1
8 Release: %mkrel 3
9 License: GPLv3+
10 URL: https://github.com/Bumblebee-Project/bumblebee
11 # source from git repo git://github.com/Bumblebee-Project/Bumblebee.git
12 Source0: https://github.com/downloads/Bumblebee-Project/Bumblebee/%{name}-%{version}.tar.gz
13 BuildRequires: pkgconfig(x11)
14 BuildRequires: pkgconfig(glib-2.0)
15 BuildRequires: pkgconfig(libbsd)
16 BuildRequires: help2man
17 Requires(pre): update-alternatives
18 Requires(post): systemd-units
19 Requires(preun):systemd-units
20 Requires(pre): rpm-helper
21 Requires: virtualgl
22 Requires: %mklibname virtualgl
23 # Suggests: primus
24 %if %{with nvidia}
25 Suggests: x11-driver-video-nvidia-current
26 %else
27 Requires: x11-driver-video-nouveau
28 %endif
29 Requires: kmod(bbswitch)
30 # Seems broken with current kernels (maybe not needed anymore?)
31 # Requires: kmod(acpi_call)
32
33 %description
34 Bumblebee daemon is a rewrite of the original Bumblebee service, providing
35 an elegant and stable means of managing Optimus hybrid graphics chip sets.
36 A primary goal of this project is to not only enable use of the discrete
37 GPU for rendering, but also to enable smart power management of the dGPU
38 when it's not in use.
39
40 %files
41 %doc README.markdown doc/RELEASE_NOTES_3_2_1
42 %{_sysconfdir}/bash_completion.d/bumblebee
43 %dir %{_sysconfdir}/bumblebee/
44 %config(noreplace) %{_sysconfdir}/bumblebee/bumblebee.conf
45 %config(noreplace) %{_sysconfdir}/bumblebee/xorg.conf.d/10-dummy.conf
46 %config(noreplace) %{_sysconfdir}/bumblebee/xorg.conf.nouveau
47 %config(noreplace) %{_sysconfdir}/bumblebee/xorg.conf.nvidia
48 /lib/udev/rules.d/99-bumblebee-nvidia-dev.rules
49 /lib/systemd/system/bumblebeed.service
50 %{_sbindir}/bumblebeed
51 %{_bindir}/optirun
52 %{_bindir}/bumblebee-bugreport
53 %{_mandir}/man1/bumblebeed.1.*
54 %{_mandir}/man1/optirun.1.*
55
56 %pre
57 %_pre_groupadd %{name}
58 if [ "$1" -eq "1" ];then
59 users=$(getent passwd | awk -F: '$3 >= 500 && $3 < 60000 {print $1}')
60 for user in $users; do
61 gpasswd -a $user bumblebee
62 done
63 /usr/sbin/update-alternatives --set gl_conf %{_sysconfdir}/ld.so.conf.d/GL/standard.conf
64 fi
65
66 %post
67 %_post_service bumblebeed
68 # Simple: still needs this since in release 3 services were not set
69 # enabled and seams that still isnt properly handeled in %%_post_service
70 if [ "$1" -ge "1" ]; then
71 # Enable (but don't start) the unit by default
72 /bin/systemctl enable bumblebeed.service
73 # Start bumblebeed service
74 /bin/systemctl start bumblebeed.service
75 fi
76
77 %preun
78 %_preun_service bumblebeed
79
80 %postun
81 # We need this since "%%_postun_groupdel %%{name}" doesnt remove the group if
82 # set to a user
83 if [ "$1" -eq "0" ];then
84 /usr/sbin/groupdel bumblebee
85 fi
86
87 # Simple: we need to ensure bumblebee group isn't removed when upgrading
88 # This doesnt need exist for Mageia 2
89 %triggerpostun -- %{name} < 3.0-9
90 %_pre_groupadd %{name}
91 users=$(getent passwd | awk -F: '$3 >= 500 && $3 < 60000 {print $1}')
92 for user in $users; do
93 gpasswd -a $user bumblebee
94 done
95
96 #--------------------------------------------------------------------
97 %prep
98 %setup -q
99
100 %build
101 %configure2_5x \
102 %if %{with nvidia}
103 CONF_DRIVER=nvidia \
104 CONF_DRIVER_MODULE_NVIDIA=nvidia-current \
105 %else
106 CONF_DRIVER=nouveau \
107 %endif
108 %ifarch x86_64
109 CONF_LDPATH_NVIDIA=%{_usr}/lib/nvidia-current:%{_libdir}/nvidia-current \
110 CONF_MODPATH_NVIDIA=%{_usr}/lib/nvidia-current/xorg,%{_libdir}/nvidia-current/xorg,%{_usr}/lib/xorg/modules,%{_libdir}/xorg/modules,%{_usr}/lib/xorg/extra-modules,%{_usr}/xorg/extra-modules
111 # CONF_MODPATH_NVIDIA=%%{_usr}/lib/nvidia-current/xorg,%%{_libdir}/nvidia-current/xorg,%%{_usr}/lib/xorg/modules,%%{_libdir}/xorg/modules,%%{_usr}/lib/xorg/extra-modules,%%{_usr}/xorg/extra-modules \
112 # CONF_PRIMUS_LD_PATH=%%{_usr}/lib/primus:%%{_libdir}/primus
113 %else
114 CONF_LDPATH_NVIDIA=%{_usr}/lib/nvidia-current \
115 CONF_MODPATH_NVIDIA=%{_usr}/lib/nvidia-current/xorg,%{_usr}/lib/xorg/modules,%{_usr}/lib/xorg/extra-modules
116 # CONF_MODPATH_NVIDIA=%%{_usr}/lib/nvidia-current/xorg,%%{_usr}/lib/xorg/modules,%%{_usr}/lib/xorg/extra-modules \
117 # CONF_PRIMUS_LD_PATH=%%{_usr}/lib/primus
118 %endif
119
120 %make CFLAGS="%{optflags}"
121
122 %install
123 %makeinstall_std
124
125 install -D -m644 scripts/systemd/bumblebeed.service %{buildroot}/lib/systemd/system/bumblebeed.service

  ViewVC Help
Powered by ViewVC 1.1.30