From 211a4bd15e169d50ba40efd9c734cc4149ced3e0 Mon Sep 17 00:00:00 2001 From: Jerzy Jamroz Date: Mon, 19 Feb 2024 16:06:51 +0100 Subject: [PATCH] refactor: Package DRV_NAME changed to KMOD_NAME to avoid confusions. --- mrmShared/linux/CONFIG | 6 ++++-- mrmShared/linux/dkms-rpm/Makefile | 2 +- mrmShared/linux/dkms-rpm/dkms.conf.in | 4 ++-- mrmShared/linux/dkms-rpm/mrf.spec.in | 2 +- 4 files changed, 8 insertions(+), 6 deletions(-) diff --git a/mrmShared/linux/CONFIG b/mrmShared/linux/CONFIG index adb006512..66d4780f7 100644 --- a/mrmShared/linux/CONFIG +++ b/mrmShared/linux/CONFIG @@ -3,6 +3,8 @@ DRV_VERSION := 3 # Package control vars -PKG_NAME := mrf-dkms #PKG_NAME follows the drv name -DRV_NAME := mrf # DRV_NAME has to be set as mrf due to hardcoded dependencies +## PKG_NAME follows the drv name +PKG_NAME := mrf-dkms +## KMOD_NAME has to be set as mrf due to hardcoded dependencies +KMOD_NAME := mrf DRV_GROUP := mrf diff --git a/mrmShared/linux/dkms-rpm/Makefile b/mrmShared/linux/dkms-rpm/Makefile index e3cde5acd..4c1f30cc6 100644 --- a/mrmShared/linux/dkms-rpm/Makefile +++ b/mrmShared/linux/dkms-rpm/Makefile @@ -28,7 +28,7 @@ clean: SED_SUBSTS = SED_SUBSTS += s/@@DRV_VERSION@@/$(DRV_VERSION)/g; -SED_SUBSTS += s/@@DRV_NAME@@/$(DRV_NAME)/g; +SED_SUBSTS += s/@@KMOD_NAME@@/$(KMOD_NAME)/g; SED_SUBSTS += s/@@RPM_VERSION@@/$(RPM_VERSION)/g; SED_SUBSTS += s/@@DRV_GROUP@@/$(DRV_GROUP)/g; SED_SUBSTS += s/@@RPM_RELEASE@@/$(RPM_RELEASE)/g; diff --git a/mrmShared/linux/dkms-rpm/dkms.conf.in b/mrmShared/linux/dkms-rpm/dkms.conf.in index 2b65b3e24..aa75be587 100644 --- a/mrmShared/linux/dkms-rpm/dkms.conf.in +++ b/mrmShared/linux/dkms-rpm/dkms.conf.in @@ -1,7 +1,7 @@ DESCRIPTION="DKMS mrfioc2 kernel module." -PACKAGE_NAME="@@DRV_NAME@@" +PACKAGE_NAME="@@KMOD_NAME@@" PACKAGE_VERSION="@@RPM_VERSION@@" -BUILT_MODULE_NAME[0]="@@DRV_NAME@@" +BUILT_MODULE_NAME[0]="@@KMOD_NAME@@" DEST_MODULE_LOCATION[0]="/extra" MAKE[0]="make -j1 KERNEL_DIR=$kernel_source_dir VERSION=@@DRV_VERSION@@ DRV_VERSION=@@DRV_VERSION@@" AUTOINSTALL=YES diff --git a/mrmShared/linux/dkms-rpm/mrf.spec.in b/mrmShared/linux/dkms-rpm/mrf.spec.in index bea976fe9..cb1af7507 100644 --- a/mrmShared/linux/dkms-rpm/mrf.spec.in +++ b/mrmShared/linux/dkms-rpm/mrf.spec.in @@ -1,4 +1,4 @@ -%define kmod_name @@DRV_NAME@@ +%define kmod_name @@KMOD_NAME@@ %define udev_rules_update \ /sbin/udevadm control --reload-rules && \ /sbin/udevadm trigger