diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index d3b3f13e2a9ec479abc1c17efce51054d3ef554a..0bbd398cc7eb23ce3347aa74537580ea84f9fd67 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -1,4 +1,4 @@ -image: docker.io/labrobotica/labrobotica +image: docker.io/labrobotica/labrobotica:latest variables: GIT_SUBMODULE_STRATEGY: recursive @@ -11,8 +11,9 @@ stages: build-package: stage: build script: - - apt update - #- apt -y install iri-iriutils-dev iri-comm-dev #fill dependencies + - apt update || apt -y install ca-certificates && apt update +# Uncomment to install dependencies +# - apt -y install iri-<package_name>-dev - apt-get -y install libboost-all-dev - wget http://static.matrix-vision.com/mvIMPACT_Acquire/2.26.0/mvGenTL_Acquire-x86_64_ABI2-2.26.0.tgz - wget http://static.matrix-vision.com/mvIMPACT_Acquire/2.26.0/install_mvGenTL_Acquire.sh @@ -36,6 +37,6 @@ update_repo: script: - cd build - "scp -i /root/.ssh/iriLabKeyNopwd -r *mvbluefox3*.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 mvbluefox3" + - "ssh irilabo@labrepo.iri.upc.edu -i /root/.ssh/iriLabKeyNopwd -tt /home/irilabo/repo_scripts/update_repo.sh mvbluefox3 $(lsb_release -cs)" only: - - tags \ No newline at end of file + - tags diff --git a/CMakeLists.txt b/CMakeLists.txt index 776ec391ab6e05fb397f2f57321ce38f79256cdc..929132f4ca4400b9722ed8b3983769ff5a4e972c 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -72,7 +72,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}/scripts/debian/preinst;${CMAKE_SOURCE_DIR}/scripts/debian/postinst;${CMAKE_SOURCE_DIR}/scripts/debian/prerm;${CMAKE_SOURCE_DIR}/scripts/debian/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..b838bd7f78c17c912257117aebef5ceadc74f4b2 --- /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 mvbluefox3 -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..eb6a9822a2f64d158250e5b37a600ac902bcc1eb --- /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 mvbluefox3 -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