Skip to content

Commit

Permalink
Merge pull request #7 from robotology/feat/yarp3.6.0
Browse files Browse the repository at this point in the history
YARP 3.6.0: create the bundle script
  • Loading branch information
Nicogene authored Feb 10, 2022
2 parents 7cec27c + e8142ba commit a905f53
Show file tree
Hide file tree
Showing 2 changed files with 74 additions and 15 deletions.
63 changes: 63 additions & 0 deletions linux/conf/bundle-3-6-0.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
#!/bin/bash

###------------------- Handle YCM ----------------------###
YCM_PACKAGE="ycm-cmake-modules"
YCM_PACKAGE_URL_bionic="https://github.com/robotology/ycm/releases/download/v0.13.0/${YCM_PACKAGE}_0.13.0-1.ubuntu18.04.robotology1_all.deb"
YCM_PACKAGE_URL_focal="https://github.com/robotology/ycm/releases/download/v0.13.0/${YCM_PACKAGE}_0.13.0-1.ubuntu20.04.robotology1_all.deb"
# issues with libjs-sphinxdoc
YCM_PACKAGE_URL_buster="https://github.com/robotology/ycm/releases/download/v0.13.0/${YCM_PACKAGE}_0.13.0-1.debian10.robotology1_all.deb"


DEPENDENCIES_COMMON="libjs-sphinxdoc libjs-underscore qml-module-qt-labs-settings libqcustomplot-dev qml-module-qt-labs-folderlistmodel qtbase5-dev qtdeclarative5-dev qtmultimedia5-dev libqt5svg5 libtinyxml-dev libace-dev git dpkg wget libeigen3-dev qml-module-qtquick2 qml-module-qtquick-window2 qml-module-qtmultimedia qml-module-qtquick-dialogs qml-module-qtquick-controls qml-module-qt-labs-folderlistmodel qml-module-qt-labs-settings libjpeg-dev libopencv-dev libopenni2-dev portaudio19-dev libsdl1.2-dev libi2c-dev libv4l-dev libgstreamer1.0-dev libgstreamer-plugins-base1.0-dev gstreamer1.0-plugins-base gstreamer1.0-plugins-good gstreamer1.0-plugins-bad gstreamer1.0-libav gstreamer1.0-tools libgraphviz-dev libsqlite3-dev libqcustomplot-dev"
# Leave empty if you don't use dependancies from backports otherwise fill the following with the line that add backports in the distro sources.list (platform dependant)
DEPENDENCIES_buster=""
DEPENDENCIES_bionic=""
DEPENDENCIES_focal=""
CMAKE_MIN_REQ_VER="3.16.0"
export YARP_PACKAGE_VERSION=3.6.0
# always use a revision number >=1
export YARP_DEB_REVISION=2
YARP_CMAKE_OPTIONS="\
-DYARP_COMPILE_GUIS:BOOL=ON \
-DYARP_USE_SYSTEM_SQLite:BOOL=ON \
-DYARP_COMPILE_libYARP_math:BOOL=ON \
-DYARP_COMPILE_CARRIER_PLUGINS:BOOL=ON \
-DENABLE_yarpcar_bayer:BOOL=ON \
-DENABLE_yarpcar_tcpros:BOOL=ON \
-DENABLE_yarpcar_xmlrpc:BOOL=ON \
-DENABLE_yarpcar_priority:BOOL=ON \
-DENABLE_yarpcar_bayer:BOOL=ON \
-DENABLE_yarpcar_mjpeg:BOOL=ON \
-DENABLE_yarpcar_portmonitor:BOOL=ON \
-DENABLE_yarppm_depthimage_to_mono:BOOL=ON \
-DENABLE_yarppm_depthimage_to_rgb:BOOL=ON \
-DENABLE_yarpidl_thrift:BOOL=ON \
-DYARP_COMPILE_DEVICE_PLUGINS:BOOL=ON \
-DENABLE_yarpcar_human:BOOL=ON \
-DENABLE_yarpcar_rossrv:BOOL=ON \
-DENABLE_yarpmod_fakebot:BOOL=ON \
-DENABLE_yarpmod_imuBosch_BNO055:BOOL=ON \
-DENABLE_yarpmod_SDLJoypad:BOOL=ON \
-DENABLE_yarpmod_serialport:BOOL=ON \
-DENABLE_yarpmod_AudioPlayerWrapper:BOOL=ON \
-DENABLE_yarpmod_AudioRecorderWrapper:BOOL=ON \
-DENABLE_yarpmod_portaudio:BOOL=ON \
-DENABLE_yarpmod_portaudioPlayer:BOOL=ON \
-DENABLE_yarpmod_portaudioRecorder:BOOL=ON \
-DENABLE_yarpmod_fakeAnalogSensor:BOOL=ON \
-DENABLE_yarpmod_fakeBattery:BOOL=ON \
-DENABLE_yarpmod_fakeDepthCamera:BOOL=ON \
-DENABLE_yarpmod_fakeFrameGrabber:BOOL=ON \
-DENABLE_yarpmod_fakeIMU:BOOL=ON \
-DENABLE_yarpmod_fakeLaser:BOOL=ON \
-DENABLE_yarpmod_fakeLocalizer:BOOL=ON \
-DENABLE_yarpmod_fakeMicrophone:BOOL=ON \
-DENABLE_yarpmod_fakeMotionControl:BOOL=ON \
-DENABLE_yarpmod_fakeNavigation:BOOL=ON \
-DENABLE_yarpmod_fakeSpeaker:BOOL=ON \
-DYARP_COMPILE_EXPERIMENTAL_WRAPPERS:BOOL=ON \
-DYARP_USE_I2C:BOOL=ON \
-DYARP_USE_SDL:BOOL=ON \
-DENABLE_yarpmod_usbCamera:BOOL=ON \
-DENABLE_yarpmod_usbCameraRaw:BOOL=ON \
"
26 changes: 11 additions & 15 deletions linux/src/build_yarp.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
#
# Compile YARP within a chroot.
#
# Command line arguments:
# Command line arguments:
# build_yarp.sh ${OPT_PLATFORM} ${OPT_CHROOT_DIRECTORY}
# Example:
# build_yarp.sh etch chroot_etch
Expand Down Expand Up @@ -68,7 +68,7 @@ sudo cp -a $CHROOT_DIR build_chroot || exit 1
# Helper for running a command within the build chroot
function run_in_chroot {
CUR_DIR=$(pwd)
echo "We are in [$CUR_DIR]"
echo "We are in [$CUR_DIR]"
echo "Running [$2] in [$1]"
sudo chroot $1 bash -c "$2"
}
Expand All @@ -86,27 +86,23 @@ fi

# -------------------- Handle CMAKE --------------------###
if [ ! -e "build_chroot/$CHROOT_BUILD/tmp/cmake.done" ]; then
#if [ -e build_chroot/$CHROOT_BUILD/local_cmake ]; then
# CMAKE=`cd build_chroot/$CHROOT_BUILD/; echo cmake-*/bin/cmake`
#else
#run_in_chroot build_chroot "cd $CHROOT_BUILD && ( wget https://cmake.org/files/v3.12/cmake-3.12.0-Linux-x86_64.tar.gz && tar xzvf cmake-3.12.0-Linux-x86_64.tar.gz && touch local_cmake )"
if [ "$PLATFORM_KEY" == "bionic" ]; then
run_in_chroot build_chroot "DEBIAN_FRONTEND=noninteractive; apt-get -y install software-properties-common apt-transport-https ca-certificates gnupg wget"
run_in_chroot build_chroot "wget -O - https://apt.kitware.com/keys/kitware-archive-latest.asc 2>/dev/null | gpg --dearmor - | tee /etc/apt/trusted.gpg.d/kitware.gpg >/dev/null"
run_in_chroot build_chroot "apt-add-repository 'deb https://apt.kitware.com/ubuntu/ bionic main'"
run_in_chroot build_chroot "apt-add-repository 'deb https://apt.kitware.com/ubuntu/ $PLATFORM_KEY main'"
elif [ "$PLATFORM_KEY" == "buster" ]; then
run_in_chroot build_chroot "apt-add-repository 'deb http://deb.debian.org/debian buster-backports main'"
run_in_chroot build_chroot "DEBIAN_FRONTEND=noninteractive; apt-get -y update && apt-get -y install -t buster-backports cmake && touch /tmp/cmake.done"
else
run_in_chroot build_chroot "apt-get -y update"
run_in_chroot build_chroot "DEBIAN_FRONTEND=noninteractive; apt-get -y install cmake && touch /tmp/cmake.done"
fi
run_in_chroot build_chroot "apt-get -y update"
run_in_chroot build_chroot "DEBIAN_FRONTEND=noninteractive; apt-get -y install cmake && touch /tmp/cmake.done"
if [ ! -e "build_chroot/$CHROOT_BUILD/tmp/cmake.done" ]; then
echo "ERROR: problem installing cmake"
exit 1
fi
fi

#if [ -e build_chroot/$CHROOT_BUILD/local_cmake ]; then
# CMAKE=$CHROOT_BUILD/`cd build_chroot/$CHROOT_BUILD/; echo cmake-*/bin/cmake`
#fi


# -------------------- Handle deps --------------------###
# Install basic dependencies
Expand Down Expand Up @@ -159,9 +155,9 @@ run_in_chroot build_chroot "cd $CHROOT_BUILD && make -j" || exit 1

# Go ahead and generate .deb
PACKAGE_DEPENDENCIES="libace-dev (>= 5.6), libgsl-dev (>= 1.11), libgtkmm-2.4-dev (>= 2.14.1)"
#PACKAGE_DEPENDENCIES=$( echo "$DEPENDENCIES_COMMON ${!DEPENDENCIES_DISTRIB}" | sed -e "s/ /,/g" | sed -e "s/,$//g")
#PACKAGE_DEPENDENCIES=$( echo "$DEPENDENCIES_COMMON ${!DEPENDENCIES_DISTRIB}" | sed -e "s/ /,/g" | sed -e "s/,$//g")
PACKAGE_DEPENDENCIES="$PACKAGE_DEPENDENCIES, cmake (>=${CMAKE_MIN_REQ_VER})"
DEBIAN_PACKAGE_VERSION="${YARP_PACKAGE_VERSION}-${YARP_DEB_REVISION}~${PLATFORM_KEY}"
DEBIAN_PACKAGE_VERSION="${YARP_PACKAGE_VERSION}-${YARP_DEB_REVISION}~${PLATFORM_KEY}"

run_in_chroot build_chroot "cd $CHROOT_BUILD && $CMAKE -DCPACK_GENERATOR='DEB' -DCPACK_DEBIAN_PACKAGE_VERSION=${DEBIAN_PACKAGE_VERSION} -DCPACK_PACKAGE_CONTACT='[email protected]' -DCPACK_DEBIAN_PACKAGE_MAINTAINER='[email protected]' -DCPACK_DEBIAN_PACKAGE_DEPENDS:STRING='$PACKAGE_DEPENDENCIES' ." || exit 1
run_in_chroot build_chroot "cd $CHROOT_BUILD && rm -f *.deb && make package" || exit 1
Expand Down

0 comments on commit a905f53

Please sign in to comment.