|
|
f8fe5a |
%global pkg iwlegacy
|
|
|
f8fe5a |
|
|
|
06449d |
%global kernel_version 4.18.0-305.7.1.el8_4
|
|
|
f8fe5a |
|
|
|
f8fe5a |
%global _use_internal_dependency_generator 0
|
|
|
06449d |
%global __find_requires /usr/lib/rpm/redhat/find-requires
|
|
|
06449d |
%global __find_provides /usr/lib/rpm/redhat/find-provides
|
|
|
f8fe5a |
|
|
|
f8fe5a |
%global debug_package %{nil}
|
|
|
f8fe5a |
|
|
|
f8fe5a |
%global __spec_install_post \
|
|
|
f8fe5a |
%{?__debug_package:%{__debug_install_post}} \
|
|
|
f8fe5a |
%{__arch_install_post} \
|
|
|
f8fe5a |
%{__os_install_post} \
|
|
|
f8fe5a |
%{__mod_compress_install_post}
|
|
|
f8fe5a |
|
|
|
f8fe5a |
%global __mod_compress_install_post find %{buildroot}/lib/modules -type f -name \*.ko -exec xz \{\} \\;
|
|
|
f8fe5a |
|
|
|
f8fe5a |
|
|
|
f8fe5a |
Name: kmod-%{pkg}
|
|
|
f8fe5a |
Version: 5.9
|
|
|
06449d |
Release: 6%{?dist}
|
|
|
f8fe5a |
Summary: Intel WiFi 3945ABG/BG (iwl3945) and 4965AGN (iwl4965) driver
|
|
|
f8fe5a |
|
|
|
f8fe5a |
License: GPLv2
|
|
|
f8fe5a |
URL: https://www.kernel.org/
|
|
|
f8fe5a |
|
|
|
f8fe5a |
Source0: %{pkg}-%{version}.tar.xz
|
|
|
f8fe5a |
|
|
|
f8fe5a |
ExclusiveArch: x86_64
|
|
|
f8fe5a |
|
|
|
f8fe5a |
BuildRequires: elfutils-libelf-devel
|
|
|
f8fe5a |
BuildRequires: gcc
|
|
|
06449d |
BuildRequires: kernel-rpm-macros
|
|
|
f8fe5a |
BuildRequires: kmod
|
|
|
f8fe5a |
BuildRequires: make
|
|
|
f8fe5a |
BuildRequires: redhat-rpm-config
|
|
|
f8fe5a |
BuildRequires: xz
|
|
|
f8fe5a |
|
|
|
06449d |
BuildRequires: kernel-abi-stablelists = %{kernel_version}
|
|
|
f8fe5a |
BuildRequires: kernel-devel = %{kernel_version}
|
|
|
f8fe5a |
BuildRequires: kernel-devel-uname-r = %{kernel_version}.%{_arch}
|
|
|
f8fe5a |
|
|
|
06449d |
Requires: kernel >= %{kernel_version}
|
|
|
06449d |
Requires: kernel-uname-r >= %{kernel_version}.%{_arch}
|
|
|
06449d |
Requires: kernel-modules >= %{kernel_version}
|
|
|
06449d |
Requires: kernel-modules-uname-r >= %{kernel_version}.%{_arch}
|
|
|
f8fe5a |
|
|
|
f8fe5a |
Provides: installonlypkg(kernel-module)
|
|
|
06449d |
Provides: kernel-modules >= %{kernel_version}.%{_arch}
|
|
|
f8fe5a |
|
|
|
06449d |
Requires(post): %{_sbindir}/depmod
|
|
|
06449d |
Requires(postun): %{_sbindir}/depmod
|
|
|
f8fe5a |
|
|
|
06449d |
Requires(post): %{_sbindir}/weak-modules
|
|
|
06449d |
Requires(postun): %{_sbindir}/weak-modules
|
|
|
f8fe5a |
|
|
|
f8fe5a |
Provides: kmod-iwl3945 = %{?epoch:%{epoch}:}%{version}-%{release}
|
|
|
f8fe5a |
Provides: kmod-iwl3945-%{kernel_version}.%{_arch} = %{?epoch:%{epoch}:}%{version}-%{release}
|
|
|
f8fe5a |
|
|
|
f8fe5a |
Supplements: iwl3945-firmware
|
|
|
f8fe5a |
Recommends: iwl3945-firmware
|
|
|
f8fe5a |
|
|
|
f8fe5a |
Provides: kmod-iwl4965 = %{?epoch:%{epoch}:}%{version}-%{release}
|
|
|
f8fe5a |
Provides: kmod-iwl4965-%{kernel_version}.%{_arch} = %{?epoch:%{epoch}:}%{version}-%{release}
|
|
|
f8fe5a |
|
|
|
f8fe5a |
Supplements: iwl4965-firmware
|
|
|
f8fe5a |
Recommends: iwl4965-firmware
|
|
|
f8fe5a |
|
|
|
f8fe5a |
%description
|
|
|
f8fe5a |
This package provides drivers for Intel's WiFi adapter 3945ABG/BG (iwl3945) and
|
|
|
f8fe5a |
4965AGN (iwl4965) including the required Intel WiFi legacy driver (iwlegacy).
|
|
|
f8fe5a |
|
|
|
f8fe5a |
|
|
|
f8fe5a |
%prep
|
|
|
f8fe5a |
%autosetup -p1 -n %{pkg}-%{version}
|
|
|
f8fe5a |
|
|
|
f8fe5a |
|
|
|
f8fe5a |
%build
|
|
|
f8fe5a |
pushd src
|
|
|
f8fe5a |
%{__make} -C /usr/src/kernels/%{kernel_version}.%{_arch} %{?_smp_mflags} M=$PWD modules
|
|
|
f8fe5a |
popd
|
|
|
f8fe5a |
|
|
|
f8fe5a |
|
|
|
f8fe5a |
%install
|
|
|
f8fe5a |
%{__install} -D -t %{buildroot}/lib/modules/%{kernel_version}.%{_arch}/extra/drivers/net/wireless/intel/%{pkg} src/%{pkg}.ko src/iwl3945.ko src/iwl4965.ko
|
|
|
f8fe5a |
|
|
|
f8fe5a |
# Make .ko objects temporarily executable for automatic stripping
|
|
|
f8fe5a |
find %{buildroot}/lib/modules -type f -name \*.ko -exec chmod u+x \{\} \+
|
|
|
f8fe5a |
|
|
|
f8fe5a |
|
|
|
f8fe5a |
%clean
|
|
|
f8fe5a |
%{__rm} -rf %{buildroot}
|
|
|
f8fe5a |
|
|
|
f8fe5a |
|
|
|
f8fe5a |
%post
|
|
|
f8fe5a |
mkdir -p %{_localstatedir}/lib/rpm-state/sig-kmods
|
|
|
06449d |
printf '%s\n' "/lib/modules/%{kernel_version}.%{_arch}/extra/drivers/net/wireless/intel/%{pkg}/%{pkg}.ko.xz" >> %{_localstatedir}/lib/rpm-state/sig-kmods/weak-modules-add
|
|
|
06449d |
printf '%s\n' "/lib/modules/%{kernel_version}.%{_arch}/extra/drivers/net/wireless/intel/%{pkg}/iwl3945.ko.xz" >> %{_localstatedir}/lib/rpm-state/sig-kmods/weak-modules-add
|
|
|
06449d |
printf '%s\n' "/lib/modules/%{kernel_version}.%{_arch}/extra/drivers/net/wireless/intel/%{pkg}/iwl4965.ko.xz" >> %{_localstatedir}/lib/rpm-state/sig-kmods/weak-modules-add
|
|
|
f8fe5a |
|
|
|
f8fe5a |
|
|
|
f8fe5a |
%preun
|
|
|
f8fe5a |
mkdir -p %{_localstatedir}/lib/rpm-state/sig-kmods
|
|
|
06449d |
rpm -ql kmod-%{pkg}-%{?epoch:%{epoch}:}%{version}-%{release}.%{_arch} | grep '/lib/modules/%{kernel_version}.%{_arch}/.*\.ko\.xz$' >> %{_localstatedir}/lib/rpm-state/sig-kmods/weak-modules-remove
|
|
|
f8fe5a |
|
|
|
f8fe5a |
|
|
|
f8fe5a |
%postun
|
|
|
06449d |
if [ -f %{_localstatedir}/lib/rpm-state/sig-kmods/weak-modules-remove ]
|
|
|
f8fe5a |
then
|
|
|
06449d |
modules=( $(cat %{_localstatedir}/lib/rpm-state/sig-kmods/weak-modules-remove) )
|
|
|
06449d |
rm -f %{_localstatedir}/lib/rpm-state/sig-kmods/weak-modules-remove
|
|
|
f8fe5a |
rmdir --ignore-fail-on-non-empty %{_localstatedir}/lib/rpm-state/sig-kmods
|
|
|
06449d |
printf '%s\n' "${modules[@]}" | %{_sbindir}/weak-modules --remove-modules
|
|
|
f8fe5a |
fi
|
|
|
f8fe5a |
|
|
|
f8fe5a |
|
|
|
06449d |
%pretrans -p <lua>
|
|
|
06449d |
posix.unlink("%{_localstatedir}/lib/rpm-state/sig-kmods/weak-modules-add")
|
|
|
06449d |
posix.unlink("%{_localstatedir}/lib/rpm-state/sig-kmods/weak-modules-remove")
|
|
|
06449d |
|
|
|
06449d |
|
|
|
f8fe5a |
%posttrans
|
|
|
06449d |
if [ -f %{_localstatedir}/lib/rpm-state/sig-kmods/weak-modules-add ]
|
|
|
f8fe5a |
then
|
|
|
06449d |
modules=( $(cat %{_localstatedir}/lib/rpm-state/sig-kmods/weak-modules-add) )
|
|
|
06449d |
rm -f %{_localstatedir}/lib/rpm-state/sig-kmods/weak-modules-add
|
|
|
f8fe5a |
rmdir --ignore-fail-on-non-empty %{_localstatedir}/lib/rpm-state/sig-kmods
|
|
|
06449d |
printf '%s\n' "${modules[@]}" | %{_sbindir}/weak-modules --add-modules
|
|
|
f8fe5a |
fi
|
|
|
f8fe5a |
|
|
|
f8fe5a |
|
|
|
f8fe5a |
%files
|
|
|
f8fe5a |
%defattr(644,root,root,755)
|
|
|
f8fe5a |
/lib/modules/%{kernel_version}.%{_arch}
|
|
|
f8fe5a |
%license COPYING
|
|
|
f8fe5a |
|
|
|
f8fe5a |
|
|
|
f8fe5a |
%changelog
|
|
|
06449d |
* Tue Sep 28 2021 Peter Georg <peter.georg@physik.uni-regensburg.de> - 5.9-6
|
|
|
06449d |
- Convert to kABI tracking kmod package (kernel >= 4.18.0-305.7.1.el8_4)
|
|
|
06449d |
|
|
|
7dec0f |
* Wed Sep 15 2021 Peter Georg <peter.georg@physik.uni-regensburg.de> - 5.9-5
|
|
|
7dec0f |
- Rebuild for 4.18.0-305.19.1.el8_4
|
|
|
7dec0f |
|
|
|
88a037 |
* Thu Sep 9 2021 Peter Georg <peter.georg@physik.uni-regensburg.de> - 5.9-4
|
|
|
88a037 |
- Set specific kernel version to use
|
|
|
88a037 |
- Add Provides kernel-modules
|
|
|
88a037 |
- Add .%{_arch} to kernel-modules provides version
|
|
|
88a037 |
- Rebuild for 4.18.0-305.17.1.el8_4
|
|
|
88a037 |
|
|
|
465be8 |
* Tue Aug 17 2021 Peter Georg <peter.georg@physik.uni-regensburg.de> - 5.9-3
|
|
|
465be8 |
- Remove dracut conf file
|
|
|
465be8 |
|
|
|
e00974 |
* Tue Aug 17 2021 Peter Georg <peter.georg@physik.uni-regensburg.de> - 5.9-2
|
|
|
e00974 |
- Rebuild for 4.18.0-305.12.1.el8_4
|
|
|
e00974 |
|
|
|
f8fe5a |
* Thu Aug 12 2021 Peter Georg <peter.georg@physik.uni-regensburg.de> - 5.9-1
|
|
|
f8fe5a |
- Initial version
|