From 0e05dd0e4d67d88ca51780dafe4029744269e6fa Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Mon, 15 Apr 2024 07:55:35 +0200 Subject: Adding debian version 4:24.2.0-1. Signed-off-by: Daniel Baumann --- debian/scripts/get_libebook_dep.sh | 33 +++++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) create mode 100755 debian/scripts/get_libebook_dep.sh (limited to 'debian/scripts/get_libebook_dep.sh') diff --git a/debian/scripts/get_libebook_dep.sh b/debian/scripts/get_libebook_dep.sh new file mode 100755 index 0000000000..8eb2ef20ee --- /dev/null +++ b/debian/scripts/get_libebook_dep.sh @@ -0,0 +1,33 @@ +#!/bin/sh + +libs=`grep libebook.*\.so connectivity/source/drivers/evoab2/EApi.cxx | perl -pe 's/\s+\"(.*)\".*/$1/'` + +for l in $libs; do + if [ -e "/usr/lib/`dpkg-architecture -qDEB_HOST_MULTIARCH`/$l" ]; then + p=/usr/lib/`dpkg-architecture -qDEB_HOST_MULTIARCH` + else + if [ -e /usr/lib/$l ]; then + p=/usr/lib + else + continue + fi + fi + # sanity check: do the libs match with what we would get + # for our libebook version if we followed the .so symlink? + l1=`readlink $p/$l` + l2_tmp=`echo $l | perl -pe 's/(.*)\.\d+$/$1/'` + l2=`readlink $p/$l2_tmp` + l3=`readlink $p/$l2` + if [ "$l1" = "$l2" -o "$l1" = "$l3" ]; then + dep=`dpkg -S $p/$l | cut -d: -f1` + fi +done + +if [ -n "$dep" ]; then + echo $dep +else + echo "Cannot find libebook dependency. None of the following libs found:" + echo $libs + exit 1 +fi + -- cgit v1.2.3