]> git.pld-linux.org Git - packages/bbswitch.git/blob - bbswitch.spec
ver. 0.8
[packages/bbswitch.git] / bbswitch.spec
1 #
2 # Conditional build:
3 %bcond_without  dist_kernel     # allow non-distribution kernel
4 %bcond_without  kernel          # don't build kernel modules
5 %bcond_with     verbose         # verbose build (V=1)
6
7 # nothing to be placed to debuginfo package
8 %define         _enable_debug_packages  0
9
10 %define         rel     1
11 %define         modname bbswitch
12 Summary:        Disable discrete graphics (currently nVidia only)
13 Name:           %{modname}%{_alt_kernel}
14 Version:        0.8
15 Release:        %{rel}
16 License:        GPL v2+
17 Group:          Base/Kernel
18 Source0:        https://github.com/Bumblebee-Project/bbswitch/archive/v%{version}.tar.gz?/%{modname}-%{version}.tgz
19 # Source0-md5:  5b116b31ace3604ddf9d1fc1f4bc5807
20 URL:            https://github.com/Bumblebee-Project/bbswitch
21 %{?with_dist_kernel:BuildRequires:      kernel%{_alt_kernel}-module-build >= 3:2.6.20.2}
22 BuildRequires:  rpmbuild(macros) >= 1.379
23 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
24
25 %description
26 bbswitch is a kernel module which automatically detects the required
27 ACPI calls for two kinds of Optimus laptops. It has been verified to
28 work with "real" Optimus and "legacy" Optimus laptops.
29
30 %package -n kernel%{_alt_kernel}-misc-%{modname}
31 Summary:        Disable discrete graphics (currently nVidia only)
32 Release:        %{rel}@%{_kernel_ver_str}
33 Group:          Base/Kernel
34 Requires(post,postun):  /sbin/depmod
35 %if %{with dist_kernel}
36 %requires_releq_kernel
37 Requires(postun):       %releq_kernel
38 %endif
39
40 %description -n kernel%{_alt_kernel}-misc-%{modname}
41 bbswitch is a kernel module which automatically detects the required
42 ACPI calls for two kinds of Optimus laptops. It has been verified to
43 work with "real" Optimus and "legacy" Optimus laptops.
44
45 %prep
46 %setup -qn %{modname}-%{version}
47
48 %build
49 %if %{with kernel}
50 %build_kernel_modules -m %{modname}
51 %endif
52
53 %install
54 rm -rf $RPM_BUILD_ROOT
55 %if %{with kernel}
56 %install_kernel_modules -m %{modname} -d misc
57 %endif
58
59 %clean
60 rm -rf $RPM_BUILD_ROOT
61
62 %post   -n kernel%{_alt_kernel}-misc-%{modname}
63 %depmod %{_kernel_ver}
64
65 %postun -n kernel%{_alt_kernel}-misc-%{modname}
66 %depmod %{_kernel_ver}
67
68 %if %{with kernel}
69 %files -n kernel%{_alt_kernel}-misc-%{modname}
70 %defattr(644,root,root,755)
71 /lib/modules/%{_kernel_ver}/misc/*.ko*
72 %endif
This page took 0.140257 seconds and 3 git commands to generate.