]> git.pld-linux.org Git - packages/bbswitch.git/blame - bbswitch.spec
ver. 0.8
[packages/bbswitch.git] / bbswitch.spec
CommitLineData
e694d3ce
JP
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
ad0394a8 12Summary: Disable discrete graphics (currently nVidia only)
e694d3ce 13Name: %{modname}%{_alt_kernel}
7c628bc3 14Version: 0.8
e694d3ce
JP
15Release: %{rel}
16License: GPL v2+
ad0394a8 17Group: Base/Kernel
e694d3ce 18Source0: https://github.com/Bumblebee-Project/bbswitch/archive/v%{version}.tar.gz?/%{modname}-%{version}.tgz
7c628bc3 19# Source0-md5: 5b116b31ace3604ddf9d1fc1f4bc5807
ad0394a8 20URL: https://github.com/Bumblebee-Project/bbswitch
e694d3ce
JP
21%{?with_dist_kernel:BuildRequires: kernel%{_alt_kernel}-module-build >= 3:2.6.20.2}
22BuildRequires: rpmbuild(macros) >= 1.379
23BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
24
25%description
ad0394a8
ER
26bbswitch is a kernel module which automatically detects the required
27ACPI calls for two kinds of Optimus laptops. It has been verified to
28work with "real" Optimus and "legacy" Optimus laptops.
e694d3ce
JP
29
30%package -n kernel%{_alt_kernel}-misc-%{modname}
ad0394a8 31Summary: Disable discrete graphics (currently nVidia only)
e694d3ce
JP
32Release: %{rel}@%{_kernel_ver_str}
33Group: Base/Kernel
34Requires(post,postun): /sbin/depmod
35%if %{with dist_kernel}
36%requires_releq_kernel
37Requires(postun): %releq_kernel
38%endif
39
40%description -n kernel%{_alt_kernel}-misc-%{modname}
ad0394a8
ER
41bbswitch is a kernel module which automatically detects the required
42ACPI calls for two kinds of Optimus laptops. It has been verified to
43work with "real" Optimus and "legacy" Optimus laptops.
e694d3ce
JP
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
54rm -rf $RPM_BUILD_ROOT
55%if %{with kernel}
56%install_kernel_modules -m %{modname} -d misc
57%endif
58
59%clean
60rm -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.083761 seconds and 4 git commands to generate.