diff --git a/CMakeLists.txt b/CMakeLists.txt index 2021c99..151d901 100755 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -118,12 +118,21 @@ configure_file(openarm-can.pc.in ${CMAKE_CURRENT_BINARY_DIR}/openarm-can.pc install(FILES ${CMAKE_CURRENT_BINARY_DIR}/openarm-can.pc DESTINATION ${CMAKE_INSTALL_LIBDIR}/pkgconfig) +set(OPENARM_CAN_LIBEXEC_DIR "${CMAKE_INSTALL_LIBEXECDIR}/openarm-can") + add_executable(motor-check setup/motor_check.cpp) target_link_libraries(motor-check openarm_can) +install(TARGETS motor-check DESTINATION ${OPENARM_CAN_LIBEXEC_DIR}) # Add motor control example executable add_executable(openarm-demo examples/demo.cpp) target_link_libraries(openarm-demo openarm_can) +install(TARGETS openarm-demo DESTINATION ${OPENARM_CAN_LIBEXEC_DIR}) + +# Install scripts +install(PROGRAMS setup/change_baudrate.py setup/configure_socketcan.sh + setup/configure_socketcan_4_arms.sh setup/set_zero.sh + DESTINATION ${OPENARM_CAN_LIBEXEC_DIR}) # Add tests if(BUILD_TESTING) diff --git a/packages/debian/libopenarm-can-dev.install b/packages/debian/libopenarm-can-dev.install index ddb040f..96ccec6 100644 --- a/packages/debian/libopenarm-can-dev.install +++ b/packages/debian/libopenarm-can-dev.install @@ -12,7 +12,7 @@ # See the License for the specific language governing permissions and # limitations under the License. -usr/include/* +usr/include/ usr/lib/*/lib*.so -usr/lib/*/pkgconfig/* -usr/lib/*/cmake/OpenArmCAN/* +usr/lib/*/pkgconfig/ +usr/lib/*/cmake/OpenArmCAN/ diff --git a/packages/debian/openarm-can-utils.install b/packages/debian/openarm-can-utils.install index 9793dd1..47c0bc3 100644 --- a/packages/debian/openarm-can-utils.install +++ b/packages/debian/openarm-can-utils.install @@ -12,6 +12,4 @@ # See the License for the specific language governing permissions and # limitations under the License. -setup/configure_socketcan.sh usr/libexec/openarm-can -setup/set_zero.sh usr/libexec/openarm-can -setup/change_baudrate.py usr/libexec/openarm-can +usr/libexec/ diff --git a/packages/fedora/openarm-can.spec b/packages/fedora/openarm-can.spec index 6f856ff..1fc160a 100644 --- a/packages/fedora/openarm-can.spec +++ b/packages/fedora/openarm-can.spec @@ -36,6 +36,12 @@ Requires: %{name}%{?_isa} = %{version}-%{release} %description devel Header files and development libraries for OpenARM CAN control library. +%package utils +Summary: Setup and configuration utility scripts + +%description utils +Setup and configuration utility scripts. + %prep %autosetup @@ -60,5 +66,9 @@ Header files and development libraries for OpenARM CAN control library. %{_libdir}/libopenarm_can.so %{_libdir}/pkgconfig/openarm-can.pc +%files utils +%license LICENSE.txt +%{_libexecdir}/openarm-can/ + %changelog %autochangelog