]> git.pld-linux.org Git - packages/nvidiabl.git/blame_incremental - nvidiabl.spec
- rebuild for kernel-3.9.6-1
[packages/nvidiabl.git] / nvidiabl.spec
... / ...
CommitLineData
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%bcond_with dkms # build dkms package
7
8# nothing to be placed to debuginfo package
9%define _enable_debug_packages 0
10
11%define rel 16
12%define modname nvidiabl
13Summary: Linux driver for nVidia display back-lights
14Name: %{modname}%{_alt_kernel}
15Version: 0.81
16Release: %{rel}
17License: GPL v2+
18URL: https://github.com/guillaumezin/nvidiabl
19Source0: https://github.com/guillaumezin/nvidiabl/archive/v%{version}.tar.gz?/%{modname}-%{version}.tgz
20# Source0-md5: f72d90c0fe34b36a0ff3b6d7034e99c4
21Source1: modprobe.conf
22Patch0: nvidiabl-dkmsconf.patch
23Group: Base/Kernel
24%{?with_dist_kernel:BuildRequires: kernel%{_alt_kernel}-module-build >= 3:2.6.20.2}
25BuildRequires: rpmbuild(macros) >= 1.379
26BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
27
28%description
29This driver drives the smartdimmer register found on modern mobile
30nVidia graphics adapters such as NV40, NV41, NV43, NV44, NV46, NV47,
31NV49, NV4B, C51, G84, G86, G92, G94, G96, GT200 architectures to
32adjust the display backlight.
33
34On Apple machines this driver allows more fine-grained brightness
35adjustment than the (mbp_nvidia_bl) driver and is generally preferred.
36
37%package -n dkms-%{modname}
38Summary: DKMS-ready driver for nVidia display back-lights
39License: GPL v2+
40Group: Base/Kernel
41Requires(pre): dkms
42Requires(post): dkms
43%if "%{_rpmversion}" >= "5"
44BuildArch: noarch
45%endif
46
47%description -n dkms-%{modname}
48This package contains a DKMS-ready driver for nvidia laptop display
49back-lights.
50
51This driver drives the smartdimmer register found on modern mobile
52Nvidia graphics adapters such as NV40, NV41, NV43, NV44, NV46, NV47,
53NV49, NV4B, C51, G84, G86, G92, G94, G96, GT200 architectures to
54adjust the display backlight.
55
56On Apple machines this driver allows more fine-grained brightness
57adjustment than the mbp-nvidia-bl-dkms (mbp_nvidia_bl) driver and is
58generally preferred.
59
60
61%package -n kernel%{_alt_kernel}-video-nvidiabl
62Summary: Linux driver for nVidia display back-lights
63Summary(pl.UTF-8): Sterownik dla Linuksa do nvidiabl
64Release: %{rel}@%{_kernel_ver_str}
65Group: Base/Kernel
66Requires(post,postun): /sbin/depmod
67%if %{with dist_kernel}
68%requires_releq_kernel
69Requires(postun): %releq_kernel
70%endif
71
72%description -n kernel%{_alt_kernel}-video-nvidiabl
73This driver drives the smartdimmer register found on modern mobile
74nVidia graphics adapters such as NV40, NV41, NV43, NV44, NV46, NV47,
75NV49, NV4B, C51, G84, G86, G92, G94, G96, GT200 architectures to
76adjust the display backlight.
77
78On Apple machines this driver allows more fine-grained brightness
79adjustment than the (mbp_nvidia_bl) driver and is generally preferred.
80
81%description -n kernel%{_alt_kernel}-video-nvidiabl -l pl.UTF-8
82Sterownik dla Linuksa do nvidiabl.
83
84Ten pakiet zawiera moduł jądra Linuksa.
85
86%prep
87%setup -qn %{modname}-%{version}
88%patch0 -p1
89
90%build
91%if %{with kernel}
92%build_kernel_modules -m nvidiabl
93%endif
94
95%install
96rm -rf $RPM_BUILD_ROOT
97%if %{with kernel}
98%install_kernel_modules -m nvidiabl -d misc
99install -d $RPM_BUILD_ROOT/etc/modprobe.d
100cp -p %{SOURCE1} $RPM_BUILD_ROOT/etc/modprobe.d/%{modname}.conf
101%endif
102
103%if %{with dkms}
104install -d $RPM_BUILD_ROOT%{_usrsrc}/%{modname}-%{version}-%{rel}
105cp -p Makefile *.[ch] $RPM_BUILD_ROOT%{_usrsrc}/%{modname}-%{version}-%{rel}
106sed -e 's|@MODNAME@|%{modname}|g' -e 's|@MODVERSION@|%{version}-%{rel}|g' \
107 dkms.conf > $RPM_BUILD_ROOT%{_usrsrc}/%{modname}-%{version}-%{rel}/dkms.conf
108%endif
109
110%clean
111rm -rf $RPM_BUILD_ROOT
112
113%post -n dkms-%{modname}
114%{_sbindir}/dkms add -m %{modname} -v %{version}-%{rel} --rpm_safe_upgrade && \
115%{_sbindir}/dkms build -m %{modname} -v %{version}-%{rel} --rpm_safe_upgrade && \
116%{_sbindir}/dkms install -m %{modname} -v %{version}-%{rel} --rpm_safe_upgrade || :
117
118%preun -n dkms-%{modname}
119%{_sbindir}/dkms remove -m %{modname} -v %{version}-%{rel} --rpm_safe_upgrade --all || :
120
121%post -n kernel%{_alt_kernel}-video-nvidiabl
122%depmod %{_kernel_ver}
123
124%postun -n kernel%{_alt_kernel}-video-nvidiabl
125%depmod %{_kernel_ver}
126
127%if %{with dkms}
128%files -n dkms-%{modname}
129%defattr(644,root,root,755)
130%{_usrsrc}/%{modname}-%{version}-%{rel}
131%endif
132
133%if %{with kernel}
134%files -n kernel%{_alt_kernel}-video-nvidiabl
135%defattr(644,root,root,755)
136/lib/modules/%{_kernel_ver}/misc/*.ko*
137%config(noreplace) %verify(not md5 mtime size) /etc/modprobe.d/%{modname}.conf
138%endif
This page took 0.212902 seconds and 4 git commands to generate.