-
Notifications
You must be signed in to change notification settings - Fork 60
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
c4c01b5
commit e1bba4b
Showing
3 changed files
with
34 additions
and
39 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
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 |
---|---|---|
@@ -1,45 +1,41 @@ | ||
# norootforbuild | ||
%global dkms_name lenovolegionlinux | ||
|
||
Name: lenovolegionlinux | ||
Name: dkms-lenovolegionlinux | ||
License: GPL | ||
Group: System/Kernel | ||
Summary: LenovoLegionLinux Kernel Module Package | ||
Version: 1.0 | ||
Version: 1.0.0 | ||
Release: 0 | ||
BuildRoot: %{_tmppath}/%{name}-%{version}-build | ||
Source0: %{dkms_name}-kmod-%{version}-x86_64.tar.gz | ||
|
||
%description | ||
Driver for controlling Lenovo Legion laptops including fan control and power mode. | ||
|
||
%package KMP | ||
Summary: LenovoLegionLinux Kernel Module | ||
Group: System/Kernel | ||
Provides: %{dkms_name}-kmod = %{?epoch:%{epoch}:}%{version} | ||
Requires: %{dkms_name}-kmod-common = %{?epoch:%{epoch}:}%{version} | ||
Requires: dkms | ||
|
||
%description KMP | ||
This is one of the subpackages require for LenovoLegionLinux [kernel module/driver] | ||
%description | ||
Driver for controlling Lenovo Legion laptops including fan control and power mode. | ||
|
||
%prep | ||
set -- * | ||
mkdir source | ||
mv "$@" source/ | ||
mkdir obj | ||
|
||
%build | ||
for flavor in %flavors_to_build; do | ||
rm -rf obj/$flavor | ||
cp -r source obj/$flavor | ||
make -C /usr/src/linux/%_target_cpu/$flavor M=$PWD/obj/$flavor | ||
done | ||
%autosetup -p0 -n %{dkms_name}-kmod-%{version}-x86_64 | ||
|
||
%install | ||
export INSTALL_MOD_PATH=$RPM_BUILD_ROOT | ||
export INSTALL_MOD_DIR=updates | ||
for flavor in %flavors_to_build; do | ||
make -C /usr/src/linux/%_target_cpu/$flavor install M=$PWD/obj/$flavor | ||
done | ||
mkdir -p %{buildroot}%{_usrsrc}/%{dkms_name}-%{version}/ | ||
cp -fr * %{buildroot}%{_usrsrc}/%{dkms_name}-%{version}/ | ||
|
||
%post | ||
dkms add -m %{dkms_name} -v %{version} -q || : | ||
# Rebuild and make available for the currently running kernel: | ||
dkms build -m %{dkms_name} -v %{version} -q || : | ||
dkms install -m %{dkms_name} -v %{version} -q --force || : | ||
|
||
%preun | ||
# Remove all versions from DKMS registry: | ||
dkms remove -m %{dkms_name} -v %{version} -q --all || : | ||
|
||
%clean | ||
rm -rf %{buildroot} | ||
%files | ||
%{_usrsrc}/%{dkms_name}-%{version} | ||
|
||
%changelog | ||
Intial Release | ||
* Sat Aug 25 2023 Gonçalo Negrier Duarte <gonegrier.duarte@gmail.com> - 1.0.0 | ||
- Intial Release 1.0.0. |
File renamed without changes.