Skip to content

Commit c5696e7

Browse files
committed
Updated debian post install script to create libudev.so.0 symbolic link when needed.
1 parent 12b5103 commit c5696e7

1 file changed

Lines changed: 20 additions & 1 deletion

File tree

cefpython/cef3/linux/installer/debian.postinst

Lines changed: 20 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#!/bin/sh
1+
#!/bin/bash
22

33
# Exit immediately if a command exits with a non-zero status
44
set -e
@@ -13,6 +13,25 @@ chmod 755 /usr/share/pyshared/cefpython3/subprocess
1313
chmod 777 /usr/share/pyshared/cefpython3/examples/
1414
chmod 777 /usr/share/pyshared/cefpython3/examples/wx/
1515

16+
# Check if libudev.so.0 exists and if not, create
17+
# a symbolic link to libudev.so.1. See issues 145
18+
# and 105 in the CEFPython Issue Tracker.
19+
# -- Sequence of these dirs does matter, on first
20+
# -- match searching should be stopped.
21+
declare -a libdirs=("/lib/x86_64-linux-gnu" "/usr/lib64"
22+
"/lib/i386-linux-gnu" "/usr/lib")
23+
for libdir in "${libdirs[@]}"
24+
do
25+
libudev_1="$libdir/libudev.so.1"
26+
libudev_0="$libdir/libudev.so.0"
27+
if [ -f $libudev_1 ] && ! [ -f $libudev_0 ];
28+
then
29+
echo "ln -sf $libudev_1 $libudev_0"
30+
ln -sf "$libudev_1" "$libudev_0"
31+
break
32+
fi
33+
done
34+
1635
# This creates symbolic links in /usr/lib/pymodules/.../cefpython3/
1736
# for all the files. This is no more required, as in make-deb.py
1837
# we're modify the deb archive and moving the /usr/lib/pyshared/.../

0 commit comments

Comments
 (0)