Build system fixes

This commit is contained in:
Julian Frohmüller
2025-01-13 13:30:33 +01:00
parent 72df3e5c8d
commit edc46a055f
7 changed files with 23 additions and 25 deletions
+5 -1
View File
@@ -16,4 +16,8 @@ pkg_check_modules(LIBCONFIG REQUIRED libconfig)
add_subdirectory(opensuperclone)
add_subdirectory(oscdriver)
add_subdirectory(oscviewer)
add_subdirectory(mininvme)
add_subdirectory(mininvme)
# Configure the postinst and prerm scripts for the DEB package and put them in the root of the build directory
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/postinst.in ${CMAKE_BINARY_DIR}/postinst)
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/prerm.in ${CMAKE_BINARY_DIR}/prerm)
+4 -4
View File
@@ -1,16 +1,16 @@
set(SOURCES
driver.h
ioctl.c
ioctl.h
main.c
minipci.h
nvme.c
nvme.h
)
# Configure the DKMS config file
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/dkms.conf.in ${CMAKE_CURRENT_BINARY_DIR}/dkms.conf)
# Configure the postinst and prerm scripts for the DEB package and put them in the root of the build directory
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/postinst.in ${CMAKE_BINARY_DIR}/postinst)
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/prerm.in ${CMAKE_BINARY_DIR}/prerm)
# Install the driver to the source directory
install(FILES ${CMAKE_CURRENT_BINARY_DIR}/dkms.conf DESTINATION ${CMAKE_INSTALL_PREFIX}/src/mininvme-${OSC_DRIVER_VERSION})
install(FILES ${SOURCES} DESTINATION ${CMAKE_INSTALL_PREFIX}/src/mininvme-${OSC_DRIVER_VERSION})
-8
View File
@@ -1,8 +0,0 @@
#!/bin/sh
if command -v dkms >/dev/null; then
dkms install mininvme/@MININVME_VERSION@
else
echo "WARNING: DKMS is not installed, skipping driver installation."
echo "To use native NVMe support you will have to install the driver manually."
fi
-8
View File
@@ -1,8 +0,0 @@
#!/bin/sh
if command -v dkms >/dev/null; then
dkms remove mininvme/@MININVME_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
-4
View File
@@ -8,10 +8,6 @@ configure_file(${CMAKE_CURRENT_SOURCE_DIR}/config.h.in ${CMAKE_CURRENT_BINARY_DI
# Configure the DKMS config file
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/dkms.conf.in ${CMAKE_CURRENT_BINARY_DIR}/dkms.conf)
# Configure the postinst and prerm scripts for the DEB package and put them in the root of the build directory
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/postinst.in ${CMAKE_BINARY_DIR}/postinst)
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/prerm.in ${CMAKE_BINARY_DIR}/prerm)
# Install the driver to the source directory
install(FILES ${CMAKE_CURRENT_BINARY_DIR}/config.h DESTINATION ${CMAKE_INSTALL_PREFIX}/src/oscdriver-${OSC_DRIVER_VERSION})
install(FILES ${CMAKE_CURRENT_BINARY_DIR}/dkms.conf DESTINATION ${CMAKE_INSTALL_PREFIX}/src/oscdriver-${OSC_DRIVER_VERSION})
@@ -6,3 +6,10 @@ 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
if command -v dkms >/dev/null; then
dkms install mininvme/@MININVME_VERSION@
else
echo "WARNING: DKMS is not installed, skipping driver installation."
echo "To use native NVMe support you will have to install the driver manually."
fi
+7
View File
@@ -6,3 +6,10 @@ else
echo "WARNING: DKMS is not installed, skipping driver removal."
echo "If the driver was installed manually, it will not be removed."
fi
if command -v dkms >/dev/null; then
dkms remove mininvme/@MININVME_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