# Package should be built in nonfree only, as it only provides features for nvidia-current # Increment bigrel when snapshot changes, snaprel for a new release of the same snapshot %define date 20210112 %define bigrel 18 %define rel 1 Name: bumblebee Version: 3.2.1 Release: %mkrel %{bigrel}.%{date}.%{rel} Summary: Daemon managing Nvidia Optimus hybrid graphics cards for nvidia-current driver Group: System/Kernel and hardware License: GPLv3+ URL: https://github.com/Bumblebee-Project/bumblebee # Taken from tip of https://github.com/Bumblebee-Project/Bumblebee/tree/develop # git archive --format=tar.xz -o %%{real_name}-%%{version}+%%{date}.tar.xz --prefix=%%{real_name}-%%{version}+%%{date}/ develop Source0: %{name}-%{version}+%{date}.tar.xz ExclusiveArch: x86_64 BuildRequires: help2man BuildRequires: pkgconfig(x11) BuildRequires: pkgconfig(glib-2.0) BuildRequires: pkgconfig(libbsd) BuildRequires: pkgconfig(libkmod) Requires(pre): rpm-helper Requires(pre): update-alternatives Requires(post): systemd-units Requires(preun):systemd-units Requires: kmod(bbswitch.ko) Requires: %{name}-bin # VirtualGl is the default bridge for upstream, the alternative being primus # As of now (3.2.1-5) primus shows better performances and compability, so we use it as default Recommends: virtualgl Recommends: %mklibname virtualgl # Files were moved Conflicts: %{name}-nvidia < 3.2.1-15 %description Bumblebee is an effort to make NVIDIA Optimus enabled laptops work in GNU/Linux systems. These laptops are built in such a way that the NVIDIA graphics card can be used on demand so that battery life is improved and temperature is kept low. It disables the discrete graphics card if no client is detected, and start an X server making use of NVIDIA card if requested then let software GL implementations (such as VirtualGL or primus) copy frames to the visible display that runs on the integrated graphics. This package only provides features for using the proprietary nvidia drivers. Users of the libre nouveau driver should prefer using DRI PRIME over Bumblebee: https://nouveau.freedesktop.org/wiki/Optimus %files %doc README.install.urpmi README.markdown doc/RELEASE_NOTES_3_2_1 %{_sysconfdir}/bash_completion.d/optirun %{_sysconfdir}/modprobe.d/%{name}.conf %dir %{_sysconfdir}/bumblebee/ %config(noreplace) %{_sysconfdir}/bumblebee/xorg.conf.nouveau %config(noreplace) %{_sysconfdir}/bumblebee/xorg.conf.nvidia %config(noreplace) %{_sysconfdir}/bumblebee/xorg.conf.d/10-dummy.conf %{_udevrulesdir}/99-bumblebee-nvidia-dev.rules %{_unitdir}/bumblebeed.service %{_sbindir}/bumblebeed %{_bindir}/bumblebee-bugreport %{_bindir}/optirun %{_mandir}/man1/optirun.1.* %{_mandir}/man8/bumblebeed.8.* %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 # simplew: still needs this since in release 3 services were not set # enabled and seams that still isnt properly handeled in %%_post_service if [ "$1" -ge "1" ]; then # Enable (but don't start) the unit by default /bin/systemctl enable bumblebeed.service # Start bumblebeed service /bin/systemctl start bumblebeed.service fi %preun %_preun_service bumblebeed %postun # We need this since "%%_postun_groupdel %%{name}" doesnt remove the group if # set to a user if [ "$1" -eq "0" ];then /usr/sbin/groupdel bumblebee fi #-------------------------------------------------------------------- %package nvidia Summary: Bumblebee configuration files and binaries for nvidia-current driver Group: System/Kernel and hardware Requires: %{name} = %{version} Requires: x11-driver-video-nvidia-current Requires: primus-nvidia Obsoletes: %{name}-nouveau < 3.2.1-16.20160519.2 Provides: %{name}-bin = %{version} %description nvidia Bumblebee configuration files and binaries built against the nvidia-current driver. %files nvidia %config(noreplace) %{_sysconfdir}/bumblebee/bumblebee.conf %{_bindir}/nvidia-settings-bumblebee #-------------------------------------------------------------------- %prep %setup -q -n %{name}-%{version}+%{date} %build autoreconf -vfi %configure \ --with-udev-rules=%{_udevrulesdir} \ CONF_BRIDGE=primus \ CONF_DRIVER=nvidia \ CONF_DRIVER_MODULE_NVIDIA=nvidia-current \ %ifarch x86_64 CONF_LDPATH_NVIDIA=%{_libdir}:%{_usr}/lib \ CONF_MODPATH_NVIDIA=%{_libdir}/nvidia-current/xorg,%{_usr}/lib/nvidia-current/xorg,%{_libdir}/xorg/modules,%{_usr}/lib/xorg/modules \ CONF_PRIMUS_LD_PATH=%{_libdir}/primus:%{_usr}/lib/primus %else CONF_LDPATH_NVIDIA=%{_libdir} \ CONF_MODPATH_NVIDIA=%{_libdir}/nvidia-current/xorg,%{_libdir}/xorg/modules \ CONF_PRIMUS_LD_PATH=%{_libdir}/primus %endif %make_build %install %make_install install -D -m644 scripts/systemd/bumblebeed.service %{buildroot}%{_unitdir}/bumblebeed.service install -d %{buildroot}%{_sysconfdir}/modprobe.d cat << EOF > %{buildroot}%{_sysconfdir}/modprobe.d/%{name}.conf blacklist nvidia blacklist nvidia-drm blacklist nvidia-modeset blacklist nvidia-uvm blacklist nvidia-current blacklist nouveau # Map removal of modules to correct command # This allows modprobe -r nvidia to work remove nvidia rmmod nvidia # Needed for bumblebee as it tries to remove nvidia-current, which is the module # load name. The driver is still "nvidia" once loaded, thus the removal fails. remove nvidia-current rmmod nvidia # Switch card off when booting, on when unloading bbswitch (shutdown) options bbswitch load_state=0 unload_state=1 EOF # Tell users to add themselves to the bumblebee group on new installs cat << EOF > README.install.urpmi To be able to use bumblebee via the 'optirun' or 'primusrun' commands, user accounts must be part of the "bumblebee" group. You can add yourself (or any user) to the "bumblebee" group with: # gpasswd -a <username> bumblebee For more information, please refer to https://wiki.mageia.org/en/Bumblebee. EOF install -D -m644 conf/bumblebee.conf %{buildroot}%{_sysconfdir}/bumblebee/bumblebee.conf # Create nvidia-settings launcher script cat << EOF > nvidia-settings-bumblebee #!/bin/sh optirun -b none %{_bindir}/nvidia-settings -c :8 EOF install -D -m755 nvidia-settings-bumblebee %{buildroot}%{_bindir}/nvidia-settings-bumblebee %changelog * Thu Feb 04 2021 daviddavid <daviddavid> 3.2.1-18.20210112.1.mga8 + Revision: 1674800 - update to latest git snapshot: 3.2.1+git20210112 - fix nvidia libraries path and nvidia-settings binary path * Fri Feb 21 2020 umeabot <umeabot> 3.2.1-18.20161107.8.mga8.nonfree + Revision: 1548603 - Mageia 8 Mass Rebuild + wally <wally> - replace deprecated %%configure2_5x * Wed Apr 24 2019 daviddavid <daviddavid> 3.2.1-18.20161107.7.mga7.nonfree + Revision: 1395085 - x11-driver-video-nvidia-current is now only available on x86_64 arch so make it Exclusive Arch on x86_64 * Fri Apr 05 2019 daviddavid <daviddavid> 3.2.1-18.20161107.6.mga7.nonfree + Revision: 1385883 - blacklist some more nvidia modules to fix conflicting driver during boot like in bumblebee-nvidia390 * Fri Mar 29 2019 daviddavid <daviddavid> 3.2.1-18.20161107.5.mga7.nonfree + Revision: 1380992 - drop aarch64 and arm support, nvidia driver is only available on x86 and x86_64 arches * Thu Mar 28 2019 daviddavid <daviddavid> 3.2.1-18.20161107.4.mga7.nonfree + Revision: 1380806 - bumblebee-nvidia works only with nvidia-current driver * Sat Jan 12 2019 tmb <tmb> 3.2.1-18.20161107.3.mga7.nonfree + Revision: 1355648 - bubmlebee-nvidia: require x11-driver-video-nvidia-bumblebee * Thu Oct 04 2018 daviddavid <daviddavid> 3.2.1-18.20161107.2.mga7.nonfree + Revision: 1317713 - Mageia 7 Mass Rebuild * Sun Jan 01 2017 akien <akien> 3.2.1-18.20161107.1.mga6.nonfree + Revision: 1079227 - New snapshot * Wed Sep 21 2016 akien <akien> 3.2.1-17.20160724.1.mga6.nonfree + Revision: 1054848 - New dev snapshot * Sat Jul 16 2016 akien <akien> 3.2.1-16.20160519.1.mga6.nonfree + Revision: 1042282 - Drop and obsolete the -nouveau flavour o nouveau developers mentioned that using nouveau with Bumblebee was pointless, users would get much better performance using DRI Prime: https://nouveau.freedesktop.org/wiki/Optimus - New develop snapshot, 20160519 - New buildrequires libkmod * Sat Nov 28 2015 akien <akien> 3.2.1-15.20150120.2.mga6 + Revision: 906834 - Drop the hack that automatically adds users with UID>=500 to the bumblebee group o It is replaced by a README.install.urpmi which tells the user to it themselves * Tue Nov 24 2015 akien <akien> 3.2.1-15.20150120.1.mga6 + Revision: 905865 - Increase main release for bogus conflict * Tue Nov 24 2015 akien <akien> 3.2.1-14.20150120.3.mga6 + Revision: 905807 - Disable debuginfo for nonfree package - Move optirun and bumblebeed binaries to main package (same size, not 100%% identical according to diff but core binaries seem to work fine for nvidia driver) - Improve modprobe config file to properly unload the nvidia module (patch by luke_nukem, mga#16094) - Simplify the spec file a bit regarding core/nonfree builds to prepare for nvidia340 package addition * Tue Feb 24 2015 akien <akien> 3.2.1-14.20150120.2.mga5 + Revision: 816834 - Fix name of blacklisted nvidia-current module * Wed Feb 18 2015 akien <akien> 3.2.1-14.20150120.1.mga5 + Revision: 815645 - Blacklist nvidia and nouveau to let bumblebee handle them - New snapshot 20150120 * Sat Jan 10 2015 akien <akien> 3.2.1-13.20150101.1.mga5 + Revision: 809724 - 20150101 snapshot from develop branch * Wed Oct 15 2014 umeabot <umeabot> 3.2.1-12.mga5 + Revision: 744598 - Second Mageia 5 Mass Rebuild * Wed Sep 24 2014 tmb <tmb> 3.2.1-11.mga5 + Revision: 724179 - adapt to new kmod provides * Tue Sep 16 2014 umeabot <umeabot> 3.2.1-10.mga5.nonfree + Revision: 678248 - Mageia 5 Mass Rebuild + tv <tv> - s/uggests:/Recommends:/ * Thu Mar 13 2014 akien <akien> 3.2.1-9.mga5.nonfree + Revision: 602744 - Restrict nvidia-settings-bumblebee script to bumblebee-nvidia only (and not bumblebee-nouveau) * Wed Mar 12 2014 akien <akien> 3.2.1-8.mga5.nonfree + Revision: 602718 - Rename nvidia-settings script to prevent conflict with actual binary * Wed Mar 12 2014 akien <akien> 3.2.1-7.mga5.nonfree + Revision: 602593 - Add nvidia-settings launcher script to bumblebee-nvidia * Fri Feb 14 2014 akien <akien> 3.2.1-6.mga5.nonfree + Revision: 591358 - Repair buggy modpath introduced in r590786 - Remove inefficient linking of virtualgl's fakelib * Fri Feb 14 2014 akien <akien> 3.2.1-5.mga5 + Revision: 591336 - Switching default bridge to primus which shows overall better performance - virtualgl now as Suggests, and primus as Requires * Fri Feb 07 2014 akien <akien> 3.2.1-4.mga5.nonfree + Revision: 585515 - Enable primus-specific configuration and add it as a Suggests - Move /lib to /usr/lib - Versioned Provides - Adapt spec to package both nouveau (core) and nvidia (nonfree) versions - Remove %%triggerpostun needed only for bumblebee < 3.0-9 (never submitted to a stable mga release) - Replace description with Debian'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 * Fri Jan 11 2013 umeabot <umeabot> 3.0.1-2.mga3 + Revision: 347224 - Mass Rebuild - https://wiki.mageia.org/en/Feature:Mageia3MassRebuild * Wed Sep 26 2012 shlomif <shlomif> 3.0.1-1.mga3 + Revision: 298415 - New version 3.0.1 * Wed Sep 05 2012 shlomif <shlomif> 3.0-11.mga3 + Revision: 288592 - Add a dependency on libvirtualgl. - Spelling correction in the comment - Fix by simple to the group deletion. * Sun Jul 01 2012 shlomif <shlomif> 3.0-9.mga3 + Revision: 265738 - Prevent group from getting deleted. Thanks to simplew. * Sat Jun 30 2012 shlomif <shlomif> 3.0-8.mga3 + Revision: 265607 - Add trailing backslashes - thanks to simplew * Sat Jun 30 2012 shlomif <shlomif> 3.0-7.mga3 + Revision: 265470 - Bump the release - Made nouveau the default. Patch thanks to simplew. * Wed Jun 20 2012 tmb <tmb> 3.0-6.mga3 + Revision: 262387 - switch requires to suggests on x11-driver-video-nvidia-current as core must be selfcontained so a core package cant require nonfree packgage * Sun Jun 17 2012 shlomif <shlomif> 3.0-5.mga3 + Revision: 261203 - imported package bumblebee * Fri Apr 13 2012 Simple <simplew8@gmailcom> 3.0-5 - Nvidia libGL is used only in optirun - dont use CRT-0,there are machines that dont detect it - set post script to install/upgrade to enable systemd - fix buildrequire for X * Fri Apr 13 2012 Simple <simplew8@gmailcom> 3.0-4 - seams that systemd macros work properly so lets use them - add requires for scriplets - fix source link * Fri Apr 13 2012 Simple <simplew8@gmailcom> 3.0-3 - move to develop branch (more bug fixes) * Mon Mar 19 2012 Simple <simplew8@gmailcom> 3.0-2 - set to build with nvidia proprietary driver by default - clean scriptlets since systemd service is handled by default - clean SysVinit service since systemd is used by default - main systemd default main dir is not in /etc * Mon Mar 19 2012 Simple <simplew8@gmailcom> 3.0-1 - 3.0 (from git), initial package