Possible to specify a path to tdadmin in the udev.sh script
This commit is contained in:
parent
64306bd7d6
commit
e89d0a29f8
2 changed files with 10 additions and 4 deletions
|
@ -32,7 +32,7 @@ ELSEIF (APPLE)
|
||||||
)
|
)
|
||||||
ELSEIF (CMAKE_SYSTEM_NAME MATCHES "FreeBSD")
|
ELSEIF (CMAKE_SYSTEM_NAME MATCHES "FreeBSD")
|
||||||
# FreeBSD does not have argp in base libc; port devel/argp-standalone is required.
|
# FreeBSD does not have argp in base libc; port devel/argp-standalone is required.
|
||||||
FIND_LIBRARY(ARGP_LIBRARY argp)
|
FIND_LIBRARY(ARGP_LIBRARY argp)
|
||||||
TARGET_LINK_LIBRARIES(tdadmin
|
TARGET_LINK_LIBRARIES(tdadmin
|
||||||
${CMAKE_BINARY_DIR}/client/libtelldus-core.so
|
${CMAKE_BINARY_DIR}/client/libtelldus-core.so
|
||||||
${ARGP_LIBRARY}
|
${ARGP_LIBRARY}
|
||||||
|
@ -60,14 +60,20 @@ INSTALL(TARGETS tdadmin RUNTIME DESTINATION sbin)
|
||||||
|
|
||||||
IF (UNIX AND NOT APPLE)
|
IF (UNIX AND NOT APPLE)
|
||||||
SET(UDEV_RULES_DIR "/etc/udev/rules.d" CACHE PATH "The directory where udev store its rules" )
|
SET(UDEV_RULES_DIR "/etc/udev/rules.d" CACHE PATH "The directory where udev store its rules" )
|
||||||
|
SET(TDADMIN_PATH "" CACHE STRING "The directory where tdadmin is stored" )
|
||||||
CONFIGURE_FILE(
|
CONFIGURE_FILE(
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}/05-tellstick.rules
|
${CMAKE_CURRENT_SOURCE_DIR}/05-tellstick.rules
|
||||||
${CMAKE_BINARY_DIR}/parsed/05-tellstick.rules
|
${CMAKE_BINARY_DIR}/parsed/05-tellstick.rules
|
||||||
)
|
)
|
||||||
|
CONFIGURE_FILE(
|
||||||
|
${CMAKE_CURRENT_SOURCE_DIR}/udev.sh
|
||||||
|
${CMAKE_BINARY_DIR}/parsed/udev.sh
|
||||||
|
@ONLY
|
||||||
|
)
|
||||||
INSTALL(FILES ${CMAKE_BINARY_DIR}/parsed/05-tellstick.rules
|
INSTALL(FILES ${CMAKE_BINARY_DIR}/parsed/05-tellstick.rules
|
||||||
DESTINATION ${UDEV_RULES_DIR}
|
DESTINATION ${UDEV_RULES_DIR}
|
||||||
)
|
)
|
||||||
INSTALL(PROGRAMS udev.sh
|
INSTALL(PROGRAMS ${CMAKE_BINARY_DIR}/parsed/udev.sh
|
||||||
DESTINATION share/telldus-core/helpers/
|
DESTINATION share/telldus-core/helpers/
|
||||||
)
|
)
|
||||||
ENDIF (UNIX AND NOT APPLE)
|
ENDIF (UNIX AND NOT APPLE)
|
||||||
|
|
|
@ -2,8 +2,8 @@
|
||||||
|
|
||||||
if [ "${ID_VENDOR_ID}" == "1781" ]; then
|
if [ "${ID_VENDOR_ID}" == "1781" ]; then
|
||||||
if [ "${ACTION}" == "add" ]; then
|
if [ "${ACTION}" == "add" ]; then
|
||||||
tdadmin controller connect --pid=${ID_MODEL_ID} --vid=${ID_VENDOR_ID} --serial=${ID_SERIAL_SHORT}
|
@TDADMIN_PATH@tdadmin controller connect --pid=${ID_MODEL_ID} --vid=${ID_VENDOR_ID} --serial=${ID_SERIAL_SHORT}
|
||||||
elif [ "${ACTION}" == "remove" ]; then
|
elif [ "${ACTION}" == "remove" ]; then
|
||||||
tdadmin controller disconnect --pid=${ID_MODEL_ID} --vid=${ID_VENDOR_ID} --serial=${ID_SERIAL_SHORT}
|
@TDADMIN_PATH@tdadmin controller disconnect --pid=${ID_MODEL_ID} --vid=${ID_VENDOR_ID} --serial=${ID_SERIAL_SHORT}
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue