Do not require tools for building the driver in package.

This commit is contained in:
Julian Frohmüller
2022-12-12 11:46:12 +01:00
parent b2f413753a
commit 219ee8b8f7
3 changed files with 17 additions and 3 deletions
+5 -1
View File
@@ -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")
+6 -1
View File
@@ -1,3 +1,8 @@
#!/bin/sh
dkms install oscdriver/@OSC_DRIVER_VERSION@
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
+6 -1
View File
@@ -1,3 +1,8 @@
#!/bin/sh
dkms remove oscdriver/@OSC_DRIVER_VERSION@ --all
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