diff --git a/CMakeLists.txt b/CMakeLists.txt index 7877002..39fd10a 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -81,7 +81,11 @@ set(CPACK_OUTPUT_FILE_PREFIX "${CMAKE_CURRENT_SOURCE_DIR}/package") set(CPACK_GENERATOR DEB CACHE STRING "CPack Generator") -set(CPACK_DEBIAN_PACKAGE_DEPENDS "libgtk-3-0, libusb-0.1-4, dkms") +# A choice has to be made here of either requiring DKMS, effectively making the driver a necessity +# or not requiring DKMS, meaning the driver won't be installed automatically and the user will have +# to install it manually, if they want to use the advanced features of OpenSuperClone. +# set(CPACK_DEBIAN_PACKAGE_DEPENDS "libgtk-3-0, libusb-0.1-4, dkms") +set(CPACK_DEBIAN_PACKAGE_DEPENDS "libgtk-3-0, libusb-0.1-4") set(CPACK_DEBIAN_PACKAGE_RELEASE 1) set(CPACK_DEBIAN_FILE_NAME DEB-DEFAULT) set(CPACK_DEBIAN_PACKAGE_SECTION "utils") diff --git a/src/oscdriver/postinst.in b/src/oscdriver/postinst.in index 95da0a4..2a41867 100644 --- a/src/oscdriver/postinst.in +++ b/src/oscdriver/postinst.in @@ -1,3 +1,8 @@ #!/bin/sh -dkms install oscdriver/@OSC_DRIVER_VERSION@ \ No newline at end of file +if command -v dkms >/dev/null; then + dkms install oscdriver/@OSC_DRIVER_VERSION@ +else + echo "WARNING: DKMS is not installed, skipping driver installation." + echo "To use the advanced features of OpenSuperClone you will have to install the driver manually." +fi \ No newline at end of file diff --git a/src/oscdriver/prerm.in b/src/oscdriver/prerm.in index 88ceca8..bdb5b59 100644 --- a/src/oscdriver/prerm.in +++ b/src/oscdriver/prerm.in @@ -1,3 +1,8 @@ #!/bin/sh -dkms remove oscdriver/@OSC_DRIVER_VERSION@ --all \ No newline at end of file +if command -v dkms >/dev/null; then + dkms remove oscdriver/@OSC_DRIVER_VERSION@ --all +else + echo "WARNING: DKMS is not installed, skipping driver removal." + echo "If the driver was installed manually, it will not be removed." +fi \ No newline at end of file