/[packages]/cauldron/dkms-bbswitch/current/SPECS/dkms-bbswitch.spec
ViewVC logotype

Contents of /cauldron/dkms-bbswitch/current/SPECS/dkms-bbswitch.spec

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1946242 - (show annotations) (download)
Thu Mar 2 09:40:24 2023 UTC (13 months, 3 weeks ago) by danf
File size: 1958 byte(s)
Update URL (SILENT)
1 %define oname bbswitch
2
3 Name: dkms-%{oname}
4 Summary: bbswitch - Optimus GPU power switcher
5 Group: System/Kernel and hardware
6 Version: 0.8
7 Release: %mkrel 15
8 License: GPLv2+
9 URL: https://github.com/Bumblebee-Project/bbswitch
10 Source0: https://github.com/Bumblebee-Project/bbswitch/archive/refs/tags/v%{version}.tar.gz#/%{oname}-%{version}.tar.gz
11 Patch0: bbswitch-0.8-fix-uaccess-inclusion.patch
12 Patch1: bbswitch-0.8-kernel-5.6.patch
13 Patch2: bbswitch-0.8-kernel-5.7.patch
14 Patch3: bbswitch-0.8-kernel-5.18.patch
15 BuildArch: noarch
16 Provides: kmod(%{oname}.ko) = %{version}
17 Requires: dkms
18 Obsoletes: dkms-acpi_call <= 0.1
19
20 %description
21 bbswitch is a kernel module which automatically detects the required
22 ACPI calls for two kinds of Optimus laptops : "real" (e.g. Nvidia GT 425M)
23 and "legacy" (e.g. Nvidia GT 310M) Optimus laptops.
24 The universal calls should work for every laptop model supporting either
25 Optimus calls.
26
27 This package uses DKMS to automatically build the bbswitch kernel module.
28
29 %files
30 %doc NEWS README.md
31 %{_usrsrc}/%{oname}-%{version}-%{release}/*
32
33 %post
34 dkms add -m %{oname} -v %{version}-%{release} --rpm_safe_upgrade &&
35 dkms build -m %{oname} -v %{version}-%{release} --rpm_safe_upgrade &&
36 dkms install -m %{oname} -v %{version}-%{release} --rpm_safe_upgrade --force
37 true
38 /sbin/modprobe %{oname} ||:
39
40 %preun
41 dkms remove --binary -m %{oname} -v %{version}-%{release} --rpm_safe_upgrade --all
42 true
43 /sbin/rmmod %{oname} ||:
44
45 #--------------------------------------------------------------------
46 %prep
47 %setup -q -n %{oname}-%{version}
48 sed -i 's/#MODULE_VERSION#/%{version}-%{release}/g' dkms/dkms.conf
49 %autopatch -p1
50
51 %install
52 %define installdir %{buildroot}%{_usrsrc}/%{oname}-%{version}-%{release}
53 install -d %{installdir}
54 install -m644 %{oname}.c %{installdir}
55 install -m644 Makefile %{installdir}
56 install -m644 dkms/dkms.conf %{installdir}

  ViewVC Help
Powered by ViewVC 1.1.30