From 5913ac09d1688a89134049c431ab501f1eeac358 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=96mer=20G=C3=96K?= Date: Tue, 5 Nov 2024 03:31:59 +0300 Subject: [PATCH] add support for dnf5 --- Makefile | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 14de1b6..5bc7917 100644 --- a/Makefile +++ b/Makefile @@ -4,6 +4,7 @@ curpwd := $(shell pwd) kver := $(shell uname -r) commitcount := $(shell git rev-list --all --count) commithash := $(shell git rev-parse --short HEAD) +fedoraver := $(shell sed -n 's/.*Fedora release \([^ ]*\).*/\1/p' /etc/fedora-release) build: @@ -21,7 +22,12 @@ clean: akmod/build: - sudo dnf groupinstall -y "Development Tools" + @if [ $(fedoraver) -gt 40 ]; then \ + echo "Fedora version $(fedoraver) is greater than 40, using dnf5 command"; \ + sudo dnf install -y @development-tools; \ + else \ + sudo dnf groupinstall -y "Development Tools"; \ + fi sudo dnf install -y rpmdevtools kmodtool mkdir -p ${curpwd}/.tmp/nct6687d-1.0.${commitcount}/nct6687d cp LICENSE Makefile nct6687.c ${curpwd}/.tmp/nct6687d-1.0.${commitcount}/nct6687d