-
Notifications
You must be signed in to change notification settings - Fork 11
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: add rtl8814au wifi driver (#9)
* add rtl8814au driver spec files * add kernel version override to makefile --------- Co-authored-by: Sean Radigan <[email protected]>
- Loading branch information
Showing
2 changed files
with
93 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,64 @@ | ||
%global srccommit 866a9100c7b3f6508b81b31a22cae19dcacdacb9 | ||
%global modname rtl8814au | ||
%global srcname 8814au | ||
|
||
%if 0%{?fedora} | ||
%global buildforkernels akmod | ||
%global debug_package %{nil} | ||
%endif | ||
|
||
# name should have a -kmod suffix | ||
Name: %{modname}-kmod | ||
# Version comes from include/rtw_version.h | ||
Version: 5.8.5.1.git | ||
Release: 1%{?dist} | ||
Summary: Realtek RTL8814AU Driver | ||
Group: System Environment/Kernel | ||
License: GPLv2 | ||
URL: https://github.com/morrownr/8814au | ||
Source0: %{url}/archive/%{srccommit}.zip | ||
|
||
BuildRequires: kmodtool | ||
|
||
%{expand:%(kmodtool --target %{_target_cpu} --kmodname %{name} %{?buildforkernels:--%{buildforkernels}} %{?kernels:--for-kernels "%{?kernels}"} 2>/dev/null) } | ||
|
||
%description | ||
Realtek RTL8814AU Driver | ||
|
||
%prep | ||
# error out if there was something wrong with kmodtool | ||
%{?kmodtool_check} | ||
|
||
# print kmodtool output for debugging purposes: | ||
kmodtool --target %{_target_cpu} --kmodname %{name} %{?buildforkernels:--%{buildforkernels}} %{?kernels:--for-kernels "%{?kernels}"} 2>/dev/null | ||
|
||
%autosetup -c %{modname} | ||
|
||
for kernel_version in %{?kernel_versions} ; do | ||
mkdir -p _kmod_build_${kernel_version%%___*} | ||
cp -a %{srcname}-%{srccommit} _kmod_build_${kernel_version%%___*}/ | ||
done | ||
|
||
%build | ||
for kernel_version in %{?kernel_versions} ; do | ||
pushd _kmod_build_${kernel_version%%___*}/ | ||
cd %{srcname}-%{srccommit} | ||
make clean | ||
make KVER=${kernel_version%%___*} | ||
# Rename the module to have rtl prefix for Realtek | ||
mv %{srcname}.ko %{modname}.ko | ||
popd | ||
done | ||
|
||
%install | ||
for kernel_version in %{?kernel_versions}; do | ||
mkdir -p %{buildroot}%{kmodinstdir_prefix}/${kernel_version%%___*}/%{kmodinstdir_postfix}/ | ||
install -D -m 755 _kmod_build_${kernel_version%%___*}/%{srcname}-%{srccommit}/%{modname}.ko %{buildroot}%{kmodinstdir_prefix}/${kernel_version%%___*}/%{kmodinstdir_postfix}/ | ||
chmod a+x %{buildroot}%{kmodinstdir_prefix}/${kernel_version%%___*}/%{kmodinstdir_postfix}/%{modname}.ko | ||
done | ||
%{?akmod_install} | ||
|
||
%clean | ||
rm -rf "%{buildroot}" | ||
|
||
%changelog |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
%global modname rtl8814au | ||
|
||
%if 0%{?fedora} | ||
%global debug_package %{nil} | ||
%endif | ||
|
||
Name: %{modname} | ||
Version: 5.8.5.1.git | ||
Release: 1%{?dist} | ||
Summary: Realtek RTL8814AU Driver | ||
License: GPLv2 | ||
URL: https://github.com/morrownr/8814au | ||
Source0: https://raw.githubusercontent.com/morrownr/8814au/main/LICENSE | ||
|
||
Provides: %{name}-kmod-common = %{version} | ||
Requires: %{name}-kmod >= %{version} | ||
|
||
BuildRequires: systemd-rpm-macros | ||
|
||
%description | ||
Realtek RTL8814AU Driver | ||
|
||
%build | ||
install -D -m 0644 %{SOURCE0} %{buildroot}%{_datarootdir}/licenses/%{modname}/LICENSE | ||
|
||
%files | ||
%license LICENSE | ||
|
||
%changelog |