From 4e97248a7db66425d397f1eb4fef2ecdb95ef044 Mon Sep 17 00:00:00 2001 From: mob41 Date: Wed, 16 Mar 2022 20:25:05 +0000 Subject: [PATCH] Add the module in dkms --- Makefile | 3 ++- dkms-multicolor-template.conf | 14 ++++++++++++++ 2 files changed, 16 insertions(+), 1 deletion(-) create mode 100644 dkms-multicolor-template.conf diff --git a/Makefile b/Makefile index 1303c0f..d40a9e3 100644 --- a/Makefile +++ b/Makefile @@ -25,7 +25,6 @@ prepare: mkdir -p $(DEB_BUILD_PATH)/DEBIAN mkdir -p $(DKMS_SRC_PATH) # generate config and scripts from templates - sed -e "s/@@PACKAGE@@/$(PACKAGE)/g" -e "s/@@VERSION@@/$(VERSION)/g" dkms-template.conf > $(DKMS_SRC_PATH)/dkms.conf; \ sed -e "s/@@PACKAGE@@/$(PACKAGE)/g" -e "s/@@VERSION@@/$(VERSION)/g" control-template > $(DEB_BUILD_PATH)/DEBIAN/control; \ sed -e "s/@@PACKAGE@@/$(PACKAGE)/g" -e "s/@@VERSION@@/$(VERSION)/g" pre-uninstall-template.sh > $(DEB_BUILD_PATH)/DEBIAN/prerm; \ sed -e "s/@@PACKAGE@@/$(PACKAGE)/g" -e "s/@@VERSION@@/$(VERSION)/g" post-install-template.sh > $(DEB_BUILD_PATH)/DEBIAN/postinst @@ -41,8 +40,10 @@ prepare: cp -v src/playstation-joy-dkms/leds.h $(DKMS_SRC_PATH)/; \ cp -v src/playstation-joy-dkms/led-class-multicolor.* $(DKMS_SRC_PATH)/; \ cp -v src/playstation-joy-dkms/Makefile.multicolor $(DKMS_SRC_PATH)/Makefile; \ + sed -e "s/@@PACKAGE@@/$(PACKAGE)/g" -e "s/@@VERSION@@/$(VERSION)/g" dkms-multicolor-template.conf > $(DKMS_SRC_PATH)/dkms.conf; \ else \ cp -v src/playstation-joy-dkms/Makefile.default $(DKMS_SRC_PATH)/Makefile; \ + sed -e "s/@@PACKAGE@@/$(PACKAGE)/g" -e "s/@@VERSION@@/$(VERSION)/g" dkms-template.conf > $(DKMS_SRC_PATH)/dkms.conf; \ fi cp -v src/playstation-joy-dkms/hid-* $(DKMS_SRC_PATH)/ # copy modprobe config diff --git a/dkms-multicolor-template.conf b/dkms-multicolor-template.conf new file mode 100644 index 0000000..0ee4ab2 --- /dev/null +++ b/dkms-multicolor-template.conf @@ -0,0 +1,14 @@ +PACKAGE_NAME="@@PACKAGE@@" +PACKAGE_VERSION="@@VERSION@@" +MAKE="make -C $kernel_source_dir M=$dkms_tree/$PACKAGE_NAME/$PACKAGE_VERSION/build/ modules" +CLEAN="make -C $kernel_source_dir M+$dkms_tree/$PACKAGE_NAME/$PACKAGE_VERSION/build/ clean" +BUILT_MODULE_NAME[0]="hid-playstation-joy" +BUILT_MODULE_LOCATION[0]="" +DEST_MODULE_LOCATION[0]="/kernel/drivers/hid/" +BUILT_MODULE_NAME[1]="hid-sony-joy" +BUILT_MODULE_LOCATION[1]="" +DEST_MODULE_LOCATION[1]="/kernel/drivers/hid/" +BUILT_MODULE_NAME[2]="led-class-multicolor" +BUILT_MODULE_LOCATION[2]="" +DEST_MODULE_LOCATION[2]="/kernel/drivers/leds/" +AUTOINSTALL="yes"