blob: 9ffc1f7ab426e10dcacb570fee23a25740829f0c (
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
|
%define oname bbswitch
Name: dkms-%{oname}
Summary: bbswitch - Optimus GPU power switcher
Group: System/Kernel and hardware
Version: 0.4.1
Release: %mkrel 1
License: GPLv3
URL: https://github.com/Bumblebee-Project/bbswitch
# source from git repo git://github.com/Bumblebee-Project/bbswitch.git
Source0: %{oname}.tar.xz
BuildArch: noarch
Requires(post): dkms
Requires(preun):dkms
%description
bbswitch is a kernel module which automatically detects the required
ACPI calls for two kinds of Optimus laptops. It has been verified to
work with "real" Optimus and "legacy" Optimus laptops (at least, that
is how I call them).
%files
%{_usrsrc}/%{oname}-%{version}/*
%post
set -x
dkms add -m %{oname} -v %{version} --rpm_safe_upgrade || :
dkms build -m %{oname} -v %{version} --rpm_safe_upgrade || :
dkms install -m %{oname} -v %{version} --rpm_safe_upgrade || :
/sbin/modprobe %{oname} || :
%preun
dkms remove --binary -m %{oname} -v %{version} --rpm_safe_upgrade --all || :
/sbin/rmmod %{oname} || :
%prep
%setup -qn %{oname}
sed -i 's/#MODULE_VERSION#/%{version}/g' dkms/dkms.conf
%install
rm -rf %{buildroot}
mkdir -p %{buildroot}%{_usrsrc}/%{oname}-%{version}
cp *.c %{buildroot}%{_usrsrc}/%{oname}-%{version}
cp Makefile %{buildroot}%{_usrsrc}/%{oname}-%{version}
cp dkms/dkms.conf %{buildroot}%{_usrsrc}/%{oname}-%{version}/dkms.conf
%changelog
* Mon Mar 19 2012 Simple <simplew8@gmail.com> 0.4.1-1
- initial package
|