dkms/dkms.spec

155 lines
5.1 KiB
RPMSpec

Name: dkms
Version: 2.8.4
Release: 1mamba
Summary: Dynamic Kernel Module Support
Group: System/Tools
Vendor: openmamba
Distribution: openmamba
Packager: Ercole 'ercolinux' Carpanetto <ercole69@gmail.com>
URL: http://linux.dell.com/projects.shtml#dkms
Source: https://github.com/dell/dkms.git/v%{version}/dkms-%{version}.tar.bz2
Source1: dkms.service
Source2: dkms.systemd
Patch0: dkms-2.4.0-dont_fail_if_module_source_removed.patch
Patch1: dkms-2.8.3-kernel-5.4.patch
License: GPL
## AUTOBUILDREQ-BEGIN
## AUTOBUILDREQ-END
Requires: kernelheaders
Requires: gcc
BuildRoot: %{_tmppath}/%{name}-%{version}-root
%description
DKMS stands for Dynamic Kernel Module Support. It is designed to create a framework where kernel dependent module source can reside so that it is very easy to rebuild modules as you upgrade kernels. This will allow Linux vendors to provide driver drops without having to wait for new kernel releases while also taking out the guesswork for customers attempting to recompile modules for new kernels.
%prep
%setup -q
#%patch0 -p1
%patch1 -p1
%build
%install
[ "%{buildroot}" != / ] && rm -rf "%{buildroot}"
make install-redhat-systemd DESTDIR=%{buildroot} SYSTEMD=%{buildroot}%{_unitdir}
#install -D -m0644 %{SOURCE1} %{buildroot}%{_unitdir}/dkms.service
#install -D -m0755 %{SOURCE2} %{buildroot}%{_prefix}/lib/systemd/scripts/dkms
#rm -f %{buildroot}%{_initrddir}/dkms_autoinstaller
install -d %{buildroot}%{_presetdir}
cat > %{buildroot}%{_presetdir}/50-dkms.preset << _EOF
enable dkms.service
_EOF
%clean
[ "%{buildroot}" != / ] && rm -rf "%{buildroot}"
%post
%systemd_post %{name}
if [ $1 -ge 1 ]; then
systemctl -q enable %{name}
systemctl -q start %{name}
fi
:
%preun
%systemd_preun %{name}
:
%postun
%systemd_postun %{name}
:
%posttrans
# clean old sysv broken links
find /etc/rc[0-6].d/ -type l -xtype l -exec rm -f {} \;
# clean old badly uninstalled modules
find /var/lib/dkms/*/*/source -xtype l | while read line; do ls -ld ${line/source}; done
find /var/lib/dkms -xtype l -exec rm -f {} \;
:
%files
%defattr(-,root,root)
%dir %{_sysconfdir}/dkms
%{_sysconfdir}/dkms/kernel_install.d_dkms
%{_sysconfdir}/dkms/sign_helper.sh
%{_sysconfdir}/dkms/template-dkms-mkrpm.spec
%{_sysconfdir}/dkms/template-dkms-redhat-kmod.spec
%{_sysconfdir}/dkms/framework.conf
%{_sysconfdir}/kernel/postinst.d/dkms
%{_sysconfdir}/kernel/prerm.d/dkms
%{_sbindir}/dkms
%dir %{_prefix}/lib/dkms
%{_prefix}/lib/dkms/common.postinst
%{_prefix}/lib/dkms/dkms_autoinstaller
%{_prefix}/lib/dkms/find-provides
%{_prefix}/lib/dkms/lsb_release
%{_prefix}/lib/dkms/mkkerneldoth
%dir %{_localstatedir}/lib/dkms
%{_localstatedir}/lib/dkms/dkms_dbversion
%{_presetdir}/50-dkms.preset
%{_unitdir}/dkms.service
%{_datadir}/bash-completion/completions/dkms
#%{_prefix}/lib/systemd/scripts/dkms
%{_mandir}/man8/dkms.8*
%doc AUTHORS COPYING
#README.dkms TODO
%changelog
* Fri Dec 18 2020 Automatic Build System <autodist@mambasoft.it> 2.8.4-1mamba
- automatic version update by autodist
* Fri Jul 24 2020 Silvan Calarco <silvan.calarco@mambasoft.it> 2.8.3-2mamba
- patched to automatically fix dkms.conf containing SUBDIRS by replacing with M as required since kernel 5.4
* Fri Jul 17 2020 Automatic Build System <autodist@mambasoft.it> 2.8.3-1mamba
- automatic version update by autodist
* Sat Nov 02 2019 Automatic Build System <autodist@mambasoft.it> 2.8.1-1mamba
- automatic version update by autodist
* Wed Jun 12 2019 Automatic Build System <autodist@mambasoft.it> 2.7.1-1mamba
- automatic version update by autodist
* Sat Jan 13 2018 Silvan Calarco <silvan.calarco@mambasoft.it> 2.5-2mamba
- clean broken links in /var/lib/dkms in posttrans
* Sun Dec 24 2017 Automatic Build System <autodist@mambasoft.it> 2.5-1mamba
- automatic version update by autodist
* Sun Jun 18 2017 Silvan Calarco <silvan.calarco@mambasoft.it> 2.4.0-2mamba
- reapply patch to skip modules with sources removed and cleanup old broken modules in posttrans
* Sat Jun 17 2017 Silvan Calarco <silvan.calarco@mambasoft.it> 2.4.0-1mamba
- update to 2.4.0
* Sat Dec 17 2016 Silvan Calarco <silvan.calarco@mambasoft.it> 2.3-1mamba
- update to 2.3
* Sat Dec 13 2014 Silvan Calarco <silvan.calarco@mambasoft.it> 2.2.0.3-4mamba
- sysv -> systemd switch
* Sat Apr 13 2013 Silvan Calarco <silvan.calarco@mambasoft.it> 2.2.0.3-3mamba
- added a patch to avoid failed with dkms status and remove if missing source directory
* Thu Apr 04 2013 Silvan Calarco <silvan.calarco@mambasoft.it> 2.2.0.3-2mamba
- install and configure init script (by using make install-redhat)
* Fri Jun 15 2012 Automatic Build System <autodist@mambasoft.it> 2.2.0.3-1mamba
- automatic version update by autodist
* Sat Oct 08 2011 Silvan Calarco <silvan.calarco@mambasoft.it> 2.2.0.2-2mamba
- added requirements for kernelheaders and gcc
* Fri Oct 07 2011 Silvan Calarco <silvan.calarco@mambasoft.it> 2.2.0.2-1mamba
- update to 2.2.0.2
* Fri Apr 04 2009 Ercole 'ercolinux' Carpanetto <ercole69@gmail.com> 2.0.21.1-2mamba
- modified Group and Packager
* Wed Apr 01 2009 Ercole 'ercolinux' Carpanetto <ercole69@gmail.com> 2.0.21.1-1mamba
- package created by autospec