From f0b72b032d800db91677d3c545083765df361952 Mon Sep 17 00:00:00 2001 From: Aitor Martinez Date: Wed, 11 Oct 2017 13:01:59 +0200 Subject: [PATCH 1/2] solved bugs in packages --- Deps/python/Modules/opencv_py/CMakeLists.txt | 4 ++-- cmake/cpack_metainfo/libs.cmake | 18 +++++------------- cmake/cpackit.cmake | 4 ++++ .../jderobot-zeroc-ice-python.info.in | 16 ++++++++++++++++ 4 files changed, 27 insertions(+), 15 deletions(-) create mode 100644 scripts/metapackages/jderobot-zeroc-ice-python.info.in diff --git a/Deps/python/Modules/opencv_py/CMakeLists.txt b/Deps/python/Modules/opencv_py/CMakeLists.txt index ef4a7d364..39790d8f5 100644 --- a/Deps/python/Modules/opencv_py/CMakeLists.txt +++ b/Deps/python/Modules/opencv_py/CMakeLists.txt @@ -7,6 +7,6 @@ string(TOUPPER ${module} module_upper) if(PY_${module_upper}) SET (OpenCV_PY_MODULES PY_${module_upper}) - list(APPEND DEPS opencv-python) - list(APPEND DEPS_DEV opencv-python) + #list(APPEND DEPS opencv-python) + #list(APPEND DEPS_DEV opencv-python) endif(PY_${module_upper}) diff --git a/cmake/cpack_metainfo/libs.cmake b/cmake/cpack_metainfo/libs.cmake index a669e718d..f4f13e314 100644 --- a/cmake/cpack_metainfo/libs.cmake +++ b/cmake/cpack_metainfo/libs.cmake @@ -13,7 +13,7 @@ SET(CPACK_COMPONENT_CONFIG_DESCRIPTION "Library for read Yaml config files Home page https://jderobot.org") -SET(CPACK_DEBIAN_CONFIG-PYTHON_PACKAGE_DEPENDS "jderobot-setup") +SET(CPACK_DEBIAN_CONFIG-PYTHON_PACKAGE_DEPENDS "jderobot-setup, python-yaml") SET(CPACK_COMPONENT_CONFIG-PYTHON_DESCRIPTION "Library for read Yaml config files Home page https://jderobot.org") @@ -23,13 +23,10 @@ SET(CPACK_COMPONENT_COMM_DESCRIPTION "Library for communications. You can use ROS or ICE Home page https://jderobot.org") -SET(CPACK_DEBIAN_COMM-PYTHON_PACKAGE_DEPENDS "jderobot-types-python,jderobot-config-python, jderobot-setup") +SET(CPACK_DEBIAN_COMM-PYTHON_PACKAGE_DEPENDS "jderobot-types-python,jderobot-config-python, jderobot-setup, jderobot-zeroc-ice-python") SET(CPACK_COMPONENT_COMM-PYTHON_DESCRIPTION "Library for communications. You can use ROS or ICE Home page https://jderobot.org") -SET(CPACK_DEBIAN_COMM-PYTHON_PACKAGE_CONTROL_EXTRA - "${CMAKE_CURRENT_SOURCE_DIR}/scripts/cmake/ice/postinst" - "${CMAKE_CURRENT_SOURCE_DIR}/scripts/cmake/ice/postrm") SET(CPACK_DEBIAN_CVBLOB_PACKAGE_DEPENDS "jderobot-setup") SET(CPACK_COMPONENT_CVBLOB_DESCRIPTION @@ -51,13 +48,11 @@ SET(CPACK_COMPONENT_EASYICE_DESCRIPTION "Library for Home page https://jderobot.org") -SET(CPACK_DEBIAN_EASYICE-PYTHON_PACKAGE_DEPENDS "jderobot-setup") +SET(CPACK_DEBIAN_EASYICE-PYTHON_PACKAGE_DEPENDS "jderobot-setup, jderobot-zeroc-ice-python") SET(CPACK_COMPONENT_EASYICE-PYTHON_DESCRIPTION "Library for Home page https://jderobot.org") -SET(CPACK_DEBIAN_EASYICE-PYTHON_PACKAGE_CONTROL_EXTRA - "${CMAKE_CURRENT_SOURCE_DIR}/scripts/cmake/ice/postinst" - "${CMAKE_CURRENT_SOURCE_DIR}/scripts/cmake/ice/postrm") + SET(CPACK_DEBIAN_FUZZYLIB_PACKAGE_DEPENDS "jderobot-setup") SET(CPACK_COMPONENT_FUZZYLIB_DESCRIPTION @@ -99,13 +94,10 @@ SET(CPACK_COMPONENT_PARALLELICE_DESCRIPTION "Library for Home page https://jderobot.org") -SET(CPACK_DEBIAN_PARALLELICE-PYTHON_PACKAGE_DEPENDS "jderobot-setup") +SET(CPACK_DEBIAN_PARALLELICE-PYTHON_PACKAGE_DEPENDS "jderobot-setup, jderobot-zeroc-ice-python") SET(CPACK_COMPONENT_PARALLELICE-PYTHON_DESCRIPTION "Library for Home page https://jderobot.org") -SET(CPACK_DEBIAN_PARALLELICE-PYTHON_PACKAGE_CONTROL_EXTRA - "${CMAKE_CURRENT_SOURCE_DIR}/scripts/cmake/ice/postinst" - "${CMAKE_CURRENT_SOURCE_DIR}/scripts/cmake/ice/postrm") SET(CPACK_DEBIAN_PIONEER_PACKAGE_DEPENDS "jderobot-setup") SET(CPACK_COMPONENT_PIONEER_DESCRIPTION diff --git a/cmake/cpackit.cmake b/cmake/cpackit.cmake index d1e2cdc51..bdcba0b08 100644 --- a/cmake/cpackit.cmake +++ b/cmake/cpackit.cmake @@ -93,6 +93,10 @@ set(CPACK_DEBIAN_SETUP_PACKAGE_CONTROL_EXTRA "${CMAKE_CURRENT_SOURCE_DIR}/scripts/cmake/postinst" "${CMAKE_CURRENT_SOURCE_DIR}/scripts/cmake/postrm") +SET(CPACK_DEBIAN_ZEROC-ICE-PYTHON_PACKAGE_CONTROL_EXTRA + "${CMAKE_CURRENT_SOURCE_DIR}/scripts/cmake/ice/postinst" + "${CMAKE_CURRENT_SOURCE_DIR}/scripts/cmake/ice/postrm") + ## Include Git HEAD into description (feature: traceback builds) execute_process(COMMAND git rev-parse HEAD diff --git a/scripts/metapackages/jderobot-zeroc-ice-python.info.in b/scripts/metapackages/jderobot-zeroc-ice-python.info.in new file mode 100644 index 000000000..f4154bc86 --- /dev/null +++ b/scripts/metapackages/jderobot-zeroc-ice-python.info.in @@ -0,0 +1,16 @@ +Package: ${PROJECT_NAME}-zeroc-ice-python +Version: ${PACKAGE_VERSION} +Architecture: all +Provides: ${PROJECT_NAME}-zeroc-ice-python +Conflicts: ${PROJECT_NAME}-zeroc-ice-python +Replaces: ${PROJECT_NAME}-zeroc-ice-python +Section: net +Priority: extra +Size: 0 +Installed-Size: 0 +Depends: +Maintainer: Francisco Perez +Homepage: http://jderobot.org +Description: Metapackage that intalls with pip zeroc-ice. + Get it from https://github.com/JdeRobot/JdeRobot.git + From fd84d0d466988f7f21bc17bea11b924af53f20b0 Mon Sep 17 00:00:00 2001 From: Aitor Martinez Date: Wed, 11 Oct 2017 15:05:29 +0200 Subject: [PATCH 2/2] solved more package bugs --- cmake/cpackit.cmake | 1 + .../cmake/{ice => zeroc-ice-python}/postinst | 2 +- scripts/cmake/{ice => zeroc-ice-python}/postrm | 0 scripts/metapackages/make_packages.sh | 18 +++++++++++++++--- 4 files changed, 17 insertions(+), 4 deletions(-) rename scripts/cmake/{ice => zeroc-ice-python}/postinst (55%) rename scripts/cmake/{ice => zeroc-ice-python}/postrm (100%) diff --git a/cmake/cpackit.cmake b/cmake/cpackit.cmake index bdcba0b08..95e66aca5 100644 --- a/cmake/cpackit.cmake +++ b/cmake/cpackit.cmake @@ -135,6 +135,7 @@ configure_file(${MAKE_PACKAGE_CONFIG_DIR}/jderobot-deps-dev.info.in ${CMAKE_BINA configure_file(${MAKE_PACKAGE_CONFIG_DIR}/jderobot-libs.info.in ${CMAKE_BINARY_DIR}/jderobot-libs_${PACKAGE_VERSION}_all.info) configure_file(${MAKE_PACKAGE_CONFIG_DIR}/jderobot-tools.info.in ${CMAKE_BINARY_DIR}/jderobot-tools_${PACKAGE_VERSION}_all.info) configure_file(${MAKE_PACKAGE_CONFIG_DIR}/jderobot-drivers.info.in ${CMAKE_BINARY_DIR}/jderobot-drivers_${PACKAGE_VERSION}_all.info) +configure_file(${MAKE_PACKAGE_CONFIG_DIR}/jderobot-zeroc-ice-python.info.in ${CMAKE_BINARY_DIR}/jderobot-zeroc-ice-python_${PACKAGE_VERSION}_all.info) execute_process( COMMAND ${MAKE_PACKAGE_EXECUTABLE} diff --git a/scripts/cmake/ice/postinst b/scripts/cmake/zeroc-ice-python/postinst similarity index 55% rename from scripts/cmake/ice/postinst rename to scripts/cmake/zeroc-ice-python/postinst index fd67bd7d7..35cc465a7 100644 --- a/scripts/cmake/ice/postinst +++ b/scripts/cmake/zeroc-ice-python/postinst @@ -1,4 +1,4 @@ #!/bin/sh pip2 install --upgrade pip -pip2 install zeroc-ice +pip2 install zeroc-ice==3.6.3 diff --git a/scripts/cmake/ice/postrm b/scripts/cmake/zeroc-ice-python/postrm similarity index 100% rename from scripts/cmake/ice/postrm rename to scripts/cmake/zeroc-ice-python/postrm diff --git a/scripts/metapackages/make_packages.sh b/scripts/metapackages/make_packages.sh index 8d6612900..eee99a9e9 100755 --- a/scripts/metapackages/make_packages.sh +++ b/scripts/metapackages/make_packages.sh @@ -27,16 +27,28 @@ build=.dpkg_pkgs mkdir -p $build mkdir -p debs -post=../scripts/cmake/postinst for pkginfo in *.info do pkgname=${pkginfo%.info} + dr=${pkginfo%_*_*.info} + drname=$(echo $dr | sed 's/jderobot-//') # echo $pkgname + echo $drname target=$build/$pkgname/DEBIAN mkdir -p $target cp $pkginfo $target/control - cp $post $target - chmod 555 $target/postinst + FILE=../scripts/cmake/$drname/postinst + if [ -f $FILE ]; then + cp $FILE $target + chmod 555 $target/postinst + fi + + FILE=../scripts/cmake/$drname/postrm + if [ -f $FILE ]; then + cp $FILE $target + chmod 555 $target/postrm + fi + dpkg --build $build/$pkgname cp $build/${pkgname}.deb ./debs done