%define oname bbswitch Name: dkms-%{oname} Summary: bbswitch - Optimus GPU power switcher Group: System/Kernel and hardware Version: 0.8 Release: %mkrel 13 License: GPLv2+ URL: https://github.com/Bumblebee-Project/bbswitch # source from git repo git://github.com/Bumblebee-Project/bbswitch.git Source0: https://github.com/Bumblebee-Project/bbswitch/v%{version}/%{oname}-%{version}.tar.gz Patch0: bbswitch-0.8-fix-uaccess-inclusion.patch Patch1: bbswitch-0.8-kernel-5.6.patch Patch2: bbswitch-0.8-kernel-5.7.patch BuildArch: noarch Provides: kmod(%{oname}.ko) = %{version} Requires: dkms Obsoletes: dkms-acpi_call <= 0.1 %description bbswitch is a kernel module which automatically detects the required ACPI calls for two kinds of Optimus laptops : "real" (e.g. Nvidia GT 425M) and "legacy" (e.g. Nvidia GT 310M) Optimus laptops. The universal calls should work for every laptop model supporting either Optimus calls. This package uses DKMS to automatically build the bbswitch kernel module. %files %doc NEWS README.md %{_usrsrc}/%{oname}-%{version}-%{release}/* %post dkms add -m %{oname} -v %{version}-%{release} --rpm_safe_upgrade && dkms build -m %{oname} -v %{version}-%{release} --rpm_safe_upgrade && dkms install -m %{oname} -v %{version}-%{release} --rpm_safe_upgrade --force true /sbin/modprobe %{oname} ||: %preun dkms remove --binary -m %{oname} -v %{version}-%{release} --rpm_safe_upgrade --all true /sbin/rmmod %{oname} ||: #-------------------------------------------------------------------- %prep %setup -q -n %{oname}-%{version} sed -i 's/#MODULE_VERSION#/%{version}-%{release}/g' dkms/dkms.conf %autopatch -p1 %install %define installdir %{buildroot}%{_usrsrc}/%{oname}-%{version}-%{release} install -d %{installdir} install -m644 %{oname}.c %{installdir} install -m644 Makefile %{installdir} install -m644 dkms/dkms.conf %{installdir} %changelog * Sun Jun 14 2020 pterjan <pterjan> 0.8-13.mga8 + Revision: 1593288 - Apply the patch... * Sat Jun 13 2020 pterjan <pterjan> 0.8-12.mga8 + Revision: 1593163 - Fix build with kernel 5.7 * Sun Apr 19 2020 tmb <tmb> 0.8-11.mga8 + Revision: 1569815 - fix build with kernel 5.6 (mga#26498) * Wed Feb 12 2020 umeabot <umeabot> 0.8-10.mga8 + Revision: 1501359 - Mageia 8 Mass Rebuild * Thu Sep 20 2018 umeabot <umeabot> 0.8-9.mga7 + Revision: 1278025 - Mageia 7 Mass Rebuild * Thu Dec 14 2017 tmb <tmb> 0.8-8.mga7 + Revision: 1182645 - fix inclusion of uaccess.h * Mon Feb 01 2016 umeabot <umeabot> 0.8-7.mga6 + Revision: 929719 - Mageia 6 Mass Rebuild * Wed Oct 15 2014 umeabot <umeabot> 0.8-6.mga5 + Revision: 750105 - Second Mageia 5 Mass Rebuild * Wed Sep 24 2014 tmb <tmb> 0.8-5.mga5 + Revision: 724180 - adapt to new kmod provides * Tue Sep 16 2014 umeabot <umeabot> 0.8-3.mga5 + Revision: 678763 - Mageia 5 Mass Rebuild * Tue Mar 11 2014 akien <akien> 0.8-2.mga5 + Revision: 602552 - Obsolete dkms-acpi_call * Thu Feb 06 2014 akien <akien> 0.8-1.mga5 + Revision: 584524 - Add documentation files - Rewrite description - Version change to GPLv2+ - Update to version 0.8: https://github.com/Bumblebee-Project/bbswitch/blob/0c38f97c3a647aebbc298b830ac7496bfcb86a7d/NEWS * Fri Oct 18 2013 umeabot <umeabot> 0.4.2-2.mga4 + Revision: 502353 - Mageia 4 Mass Rebuild * Sun Jun 17 2012 shlomif <shlomif> 0.4.2-1.mga3 + Revision: 261229 - Get rid of trailing space - imported package dkms-bbswitch