--- /dev/null
+# nvidiabl module options:
+#
+# - model (charp)
+# backlight model, must be empty for autodetection, nv4x, or nv5x
+#
+# - type (string)
+# Backlight type (raw|platform|firmware) default is raw
+#
+# - off (long)
+# value to put in the register to disable the backlight, negative value is
+# interpreted as percentage of maximum, -101 for default, autodetect otherwise
+#
+# - min (long)
+# minimum register value for the backlight, negative value is interpreted as
+# percentage of maximum, -101 for default, autodetect otherwise
+
+# - screen_type (long)
+#
+# - max (long)
+# maximum register value for the backlight, -101 for default, autodetect
+# otherwise
+#
+# - pci_id (ulong)
+# PCI ID of the Nvidia card - usefull only when not using autodetection and
+# more than one Nvidia PCI device
+
+#options nvidiabl max=180
URL: https://github.com/guillaumezin/nvidiabl
Source0: https://github.com/guillaumezin/nvidiabl/archive/v%{version}.tar.gz?/%{modname}-%{version}.tgz
# Source0-md5: f72d90c0fe34b36a0ff3b6d7034e99c4
+Source1: modprobe.conf
Patch0: nvidiabl-dkmsconf.patch
Group: Base/Kernel
%{?with_dist_kernel:BuildRequires: kernel%{_alt_kernel}-module-build >= 3:2.6.20.2}
rm -rf $RPM_BUILD_ROOT
%if %{with kernel}
%install_kernel_modules -m nvidiabl -d misc
+install -d $RPM_BUILD_ROOT/etc/modprobe.d/%{_kernel_ver}
+cp -p %{SOURCE1} $RPM_BUILD_ROOT/etc/modprobe.d/%{_kernel_ver}/%{pname}.conf
%endif
%if %{with dkms}
install -d $RPM_BUILD_ROOT%{_usrsrc}/%{modname}-%{version}-%{rel}
-cp -a Makefile *.[ch] $RPM_BUILD_ROOT%{_usrsrc}/%{modname}-%{version}-%{rel}
+cp -p Makefile *.[ch] $RPM_BUILD_ROOT%{_usrsrc}/%{modname}-%{version}-%{rel}
sed -e 's|@MODNAME@|%{modname}|g' -e 's|@MODVERSION@|%{version}-%{rel}|g' \
dkms.conf > $RPM_BUILD_ROOT%{_usrsrc}/%{modname}-%{version}-%{rel}/dkms.conf
%endif
%files -n kernel%{_alt_kernel}-video-nvidiabl
%defattr(644,root,root,755)
/lib/modules/%{_kernel_ver}/misc/*.ko*
+%config(noreplace) %verify(not md5 mtime size) /etc/modprobe.d/%{_kernel_ver}/%{pname}.conf
%endif