Skip to content

Commit ade596e

Browse files
committedApr 1, 2023
Fix make package
Fixes: CPack: Create package using ZIP CPack: Install projects CPack: - Run preinstall target for: direwolf CPack: - Install project: direwolf [] CMake Error at .../build/conf/cmake_install.cmake:54 (file): file INSTALL cannot copy file ".../conf/99-direwolf-cmedia.rules" to "/etc/udev/rules.d/99-direwolf-cmedia.rules": Permission denied. Call Stack (most recent call first): .../build/cmake_install.cmake:74 (include) CPack Error: Error when generating package: direwolf make: *** [Makefile:71: package] Errore 1
1 parent 11468f2 commit ade596e

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed
 

‎CMakeLists.txt

+1
Original file line numberDiff line numberDiff line change
@@ -260,6 +260,7 @@ else()
260260
set(INSTALL_MAN_DIR "share/man/man1")
261261
endif()
262262
set(INSTALL_DATA_DIR "share/${PROJECT_NAME}")
263+
set(INSTALL_UDEV_DIR "etc/udev/rules.d/")
263264
endif(WIN32 OR CYGWIN)
264265

265266
# requirements

‎conf/CMakeLists.txt

+1-1
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ file(WRITE "${CMAKE_BINARY_DIR}/direwolf.conf" "${file_content}")
2626

2727
# install udev rules for CM108
2828
if(LINUX)
29-
install(FILES "${CUSTOM_CONF_DIR}/99-direwolf-cmedia.rules" DESTINATION /etc/udev/rules.d/)
29+
install(FILES "${CUSTOM_CONF_DIR}/99-direwolf-cmedia.rules" DESTINATION ${INSTALL_UDEV_DIR})
3030
endif()
3131

3232
install(FILES "${CMAKE_BINARY_DIR}/direwolf.conf" DESTINATION ${INSTALL_CONF_DIR})

0 commit comments

Comments
 (0)