diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index e626a6710fc623b23fde07b1936e40f8d719f64d..3ab0cb197e1d08b4b89bf2d1f49edbfd62475e33 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -1,4 +1,4 @@ -image: docker.io/labrobotica/labrobotica +image: docker.io/labrobotica/labrobotica:latest stages: - build @@ -8,10 +8,9 @@ stages: build-package: stage: build script: + - apt update || apt -y install ca-certificates && apt update # Uncomment to install dependencies -# - apt update # - apt -y install iri-<package_name>-dev - - apt update - apt -y install iri-iriutils-dev iri-comm-dev iri-trajectory-dev iri-dynamixel-dev - apt install -y libxerces-c-dev xsdcxx - mkdir -pv build @@ -30,7 +29,7 @@ update_repo: script: - cd build - "scp -i /root/.ssh/iriLabKeyNopwd -r *dynamixel-motor-cont*.deb irilabo@labrepo.iri.upc.edu:packages/" - - "ssh irilabo@labrepo.iri.upc.edu -i /root/.ssh/iriLabKeyNopwd -tt /home/irilabo/repo_scripts/update_repo.sh dynamixel-motor-cont" + - "ssh irilabo@labrepo.iri.upc.edu -i /root/.ssh/iriLabKeyNopwd -tt /home/irilabo/repo_scripts/update_repo.sh dynamixel-motor-cont $(lsb_release -cs)" only: - tags diff --git a/CMakeLists.txt b/CMakeLists.txt index aa3bc65c856d498c5dfb5f467ba895e1770ee18c..a88a31df8ae47f6589098e24d1c1eff39ece0211 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -86,7 +86,7 @@ IF (UNIX) SET(CPACK_DEBIAN_PACKAGE_MAINTAINER "labrobotica - labrobotica@iri.upc.edu") # Uncomment to add the necessary mantainer scripts -# SET(CPACK_DEBIAN_PACKAGE_CONTROL_EXTRA "${CMAKE_SOURCE_DIR}/package_scripts/preinst;${CMAKE_SOURCE_DIR}/package_scripts/postinst;${CMAKE_SOURCE_DIR}/package_scripts/prerm;${CMAKE_SOURCE_DIR}/package_scripts/postrm") + SET(CPACK_DEBIAN_PACKAGE_CONTROL_EXTRA "${CMAKE_SOURCE_DIR}/scripts/debian/postinst;${CMAKE_SOURCE_DIR}/scripts/debian/prerm") # Uncomment to add dependencies comma separated # SET(CPACK_DEBIAN_PACKAGE_DEPENDS "iri-<package_name>-dev (>= 1.0~${DISTRIB})") diff --git a/scripts/debian/postinst b/scripts/debian/postinst new file mode 100755 index 0000000000000000000000000000000000000000..2920ec9592890acb088e39a326b8a6d787534cdc --- /dev/null +++ b/scripts/debian/postinst @@ -0,0 +1,22 @@ +#!/bin/bash + +set -e + +case "$1" in + configure) + echo " Trying to add library to ldconfig..." + /usr/share/iri/add_lib_to_ld_config.sh -l dynamixel_motor_cont -p && echo " Done." || echo " /usr/share/iri/add_lib_to_ld_config.sh doesn't exists. Download it from iriutils and execute it." + + ;; + abort-upgrade) + + ;; + abort-remove) + + ;; + abort-deconfigure) + + ;; +esac + +exit 0 diff --git a/scripts/debian/prerm b/scripts/debian/prerm new file mode 100644 index 0000000000000000000000000000000000000000..163269025969cf5dc27fceee9e23c7e6b1b30c7b --- /dev/null +++ b/scripts/debian/prerm @@ -0,0 +1,22 @@ +#!/bin/bash + +set -e + +case "$1" in + remove) + echo " Trying to remove library from ldconfig..." + /usr/share/iri/remove_lib_from_ld_config.sh -l dynamixel_motor_cont -p && echo " Done." || echo " /usr/share/iri/remove_lib_from_ld_config.sh doesn't exists. Download it from iriutils and execute it." + + ;; + upgrade) + + ;; + deconfigure) + + ;; + failed-upgrade) + + ;; +esac + +exit 0