mirror of
https://github.com/ublue-os/packages.git
synced 2026-11-03 21:49:48 -09:00
chore: remove framework kmod stuff (#1357)
This commit is contained in:
parent
56952e204e
commit
26bbcd0194
2 changed files with 0 additions and 80 deletions
|
|
@ -1,27 +0,0 @@
|
|||
%global real_name framework-laptop
|
||||
|
||||
Name: %{real_name}-kmod-common
|
||||
Version: {{{ git_dir_version }}}
|
||||
Release: 1%{?dist}
|
||||
Summary: Kernel module to expose more Framework Laptop stuff
|
||||
License: GPLv2
|
||||
URL: https://github.com/KyleGospo/framework-laptop-kmod
|
||||
BuildArch: noarch
|
||||
|
||||
Source: %{url}/archive/refs/heads/main.tar.gz
|
||||
|
||||
Requires: %{real_name}-kmod = %{?epoch:%{epoch}:}%{version}
|
||||
Provides: %{real_name}-kmod-common = %{?epoch:%{epoch}:}%{version}
|
||||
|
||||
%description
|
||||
A kernel module that exposes the Framework Laptop (13, 16)'s battery charge limit and LEDs to userspace.
|
||||
|
||||
%prep
|
||||
%autosetup -p1 -n %{real_name}-kmod-main
|
||||
|
||||
%files
|
||||
%license LICENSE
|
||||
%doc README.md
|
||||
|
||||
%changelog
|
||||
{{{ git_dir_changelog }}}
|
||||
|
|
@ -1,53 +0,0 @@
|
|||
# Build only the akmod package and no kernel module packages:
|
||||
%define buildforkernels akmod
|
||||
%global real_name framework-laptop
|
||||
%global modname framework_laptop
|
||||
|
||||
%global debug_package %{nil}
|
||||
|
||||
Name: %{real_name}-kmod
|
||||
Version: {{{ git_dir_version }}}
|
||||
Release: 1%{?dist}
|
||||
Summary: Kernel module to expose more Framework Laptop stuff
|
||||
License: GPLv2
|
||||
URL: https://github.com/KyleGospo/framework-laptop-kmod
|
||||
|
||||
Source: %{url}/archive/refs/heads/main.tar.gz
|
||||
|
||||
# Get the needed BuildRequires (in parts depending on what we build for):
|
||||
BuildRequires: kmodtool
|
||||
|
||||
# kmodtool does its magic here
|
||||
%{expand:%(kmodtool --target %{_target_cpu} --kmodname %{name} %{?buildforkernels:--%{buildforkernels}} %{?kernels:--for-kernels "%{?kernels}"} 2>/dev/null) }
|
||||
|
||||
%description
|
||||
A kernel module that exposes the Framework Laptop (13, 16)'s battery charge limit and LEDs to userspace.
|
||||
|
||||
%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 -p1 -n %{real_name}-kmod-main
|
||||
|
||||
for kernel_version in %{?kernel_versions} ; do
|
||||
mkdir -p _kmod_build_${kernel_version%%___*}
|
||||
cp -a %{modname}.c Makefile _kmod_build_${kernel_version%%___*}/
|
||||
done
|
||||
|
||||
%build
|
||||
for kernel_version in %{?kernel_versions} ; do
|
||||
make V=1 %{?_smp_mflags} -C ${kernel_version##*___} M=${PWD}/_kmod_build_${kernel_version%%___*} VERSION=v%{version} modules
|
||||
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%%___*}/%{modname}.ko %{buildroot}%{kmodinstdir_prefix}/${kernel_version%%___*}/%{kmodinstdir_postfix}/
|
||||
chmod a+x %{buildroot}%{kmodinstdir_prefix}/${kernel_version%%___*}/%{kmodinstdir_postfix}/%{modname}.ko
|
||||
done
|
||||
%{?akmod_install}
|
||||
|
||||
%changelog
|
||||
{{{ git_dir_changelog }}}
|
||||
Loading…
Reference in a new issue