diff --git a/kmod.spec b/kmod.spec index 3597670..e335857 100644 --- a/kmod.spec +++ b/kmod.spec @@ -4,8 +4,10 @@ # turn it on there by default. %if 0%{?rhel} %bcond_without weak_modules +%bcond_without dist_conf %else %bcond_with weak_modules +%bcond_with dist_conf %endif @@ -18,6 +20,7 @@ License: GPLv2+ URL: https://git.kernel.org/pub/scm/utils/kernel/kmod/kmod.git Source0: https://www.kernel.org/pub/linux/utils/kernel/kmod/%{name}-%{version}.tar.xz Source1: weak-modules +Source2: depmod.conf.dist Exclusiveos: Linux BuildRequires: gcc @@ -92,6 +95,10 @@ mkdir -p $RPM_BUILD_ROOT%{_prefix}/lib/modprobe.d install -pm 755 %{SOURCE1} $RPM_BUILD_ROOT%{_sbindir}/weak-modules %endif +%if %{with dist_conf} +install -m 0644 %{SOURCE2} $RPM_BUILD_ROOT%{_sysconfdir}/depmod.d/dist.conf +%endif + %files %dir %{_sysconfdir}/depmod.d %dir %{_sysconfdir}/modprobe.d @@ -107,6 +114,9 @@ install -pm 755 %{SOURCE1} $RPM_BUILD_ROOT%{_sbindir}/weak-modules %{_sbindir}/weak-modules %endif %{_datadir}/bash-completion/ +%if %{with dist_conf} +%{_sysconfdir}/depmod.d/dist.conf +%endif %attr(0644,root,root) %{_mandir}/man5/*.5* %attr(0644,root,root) %{_mandir}/man8/*.8* %doc NEWS README TODO