summaryrefslogtreecommitdiffstats
path: root/debian/scripts/get_libebook_dep.sh
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-07 09:07:31 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-07 09:07:31 +0000
commitedaebb65d92a48d7075c8c1f64c5ffd87054827b (patch)
tree045c941e1851cde1665bea22d97a2976b7a5bb69 /debian/scripts/get_libebook_dep.sh
parentAdding upstream version 4:7.4.7. (diff)
downloadlibreoffice-edaebb65d92a48d7075c8c1f64c5ffd87054827b.tar.xz
libreoffice-edaebb65d92a48d7075c8c1f64c5ffd87054827b.zip
Adding debian version 4:7.4.7-1+deb12u1.debian/4%7.4.7-1+deb12u1debian
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to '')
-rwxr-xr-xdebian/scripts/get_libebook_dep.sh33
1 files changed, 33 insertions, 0 deletions
diff --git a/debian/scripts/get_libebook_dep.sh b/debian/scripts/get_libebook_dep.sh
new file mode 100755
index 000000000..8eb2ef20e
--- /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
+