Skip to content

Commit

Permalink
Revert deletion of lenovolegionlinux-dkms.spec
Browse files Browse the repository at this point in the history
Signed-off-by: Gonçalo Duarte <[email protected]>
  • Loading branch information
MrDuartePT committed Dec 4, 2023
1 parent 7e7302c commit a73be02
Show file tree
Hide file tree
Showing 2 changed files with 36 additions and 1 deletion.
2 changes: 1 addition & 1 deletion deploy/build_packages/build_rpm_LLL.sh
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ cp -r ${REPODIR}/kernel_module lenovolegionlinux-kmod-${TAG}-x86_64

#Dkms change version
sudo sed -i "s/DKMS_VERSION/${TAG}/g" ./lenovolegionlinux-kmod-${TAG}-x86_64/dkms.conf
mv ${REPODIR}/deploy/build_packages/lenovolegionlinux-dkms.spec rpmbuild/SPECS/lenovolegionlinux.spec
cp ${REPODIR}/deploy/build_packages/lenovolegionlinux-dkms.spec rpmbuild/SPECS/lenovolegionlinux.spec
#Change version according to tag
sed -i "s/_VERSION/${TAG}/g" rpmbuild/SPECS/lenovolegionlinux.spec

Expand Down
35 changes: 35 additions & 0 deletions deploy/build_packages/lenovolegionlinux-dkms.spec
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
# norootforbuild
%global dkms_name lenovolegionlinux

Name: dkms-lenovolegionlinux
License: GPL
Group: System/Kernel
Summary: LenovoLegionLinux Kernel Module Package
Version: _VERSION
Release: 0
Source0: %{dkms_name}-kmod-%{version}-x86_64.tar.gz

Requires: dkms

%description
Driver for controlling Lenovo Legion laptops including fan control and power mode.

%prep
%autosetup -p0 -n %{dkms_name}-kmod-%{version}-x86_64

%install
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 || :

%files
%{_usrsrc}/%{dkms_name}-%{version}

0 comments on commit a73be02

Please sign in to comment.