Skip to content

Commit

Permalink
Add the module in dkms
Browse files Browse the repository at this point in the history
  • Loading branch information
mob41 committed Mar 16, 2022
1 parent d7d4262 commit 4e97248
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 1 deletion.
3 changes: 2 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand Down
14 changes: 14 additions & 0 deletions dkms-multicolor-template.conf
Original file line number Diff line number Diff line change
@@ -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"

0 comments on commit 4e97248

Please sign in to comment.