Why alter the dependencies

The original dependencies of the package are:

Depends: libc6 (>= 2.7-1), libice6 (>= 1:1.0.0), libgtk2.0-0 (>= 2.12.0), libsm6, libx11-6, libxext6, libxmu6, libxpm4, libasound2, libxerces-c3.1, libcurl3 (>= 7.19.1), libstdc++6, libwebkit-1.0-2 | libwebkitgtk-1.0-0

I have no idea why e.g. that libwebkit* is in there. I can't find which program depends on it, the plugin runs well without it, and this particular dependency breaks apt on my system when spelling checkers (hunspell, ispell) are also installed. So I decided to dissect the package a bit...

Procedure 7.  Wrenching actual dependencies from a binary-only package
  1. apprentice@host:~$ mkdir -p ~/icaclient/i386/debian
    apprentice@host:~$ dpkg -X icaclient_13.0.0.256735_i386.deb ~/icaclient/i386
    apprentice@host:~$ dpkg -e icaclient_13.0.0.256735_i386.deb ~/icaclient/i386/debian
    apprentice@host:~$ cd ~/icaclient/i386

  2. To use dpkg-gensymbols, we need to create a place where it'll look, then copy libraries there:

    apprentice@host:~/icaclient/i386$ mkdir debian/tmp/usr/lib/{amd64,i386}-linux-gnu
    apprentice@host:~/icaclient/i386$ cp -i $(find -type f -exec file {} \;|grep 'ELF .* shared object'|grep 32-bit|awk -F: '{print $1}') debian/tmp/usr/lib/i386-linux-gnu/
    apprentice@host:~/icaclient/i386$ cp -i $(find -type f -exec file {} \;|grep 'ELF .* shared object'|grep 64-bit|awk -F: '{print $1}') debian/tmp/usr/lib/amd64-linux-gnu/

    Then we run dpkg-gensymbols:

    apprentice@host:~/icaclient/i386$ mkdir debian/tmp/DEBIAN/symbols
    apprentice@host:~/icaclient/i386$ dpkg-gensymbols -ai386 > debian/tmp/DEBIAN/symbols

  3. Now that we have the symbols that are available from the package itself, we create some symlinks to fool dpkg-shlibdeps a bit, and then we use that to create the dependencies:

    apprentice@host:~/icaclient/i386$ cd debian ; ln -s tmp icaclient ; cd ..
    apprentice@host:~/icaclient/i386$ ln -s debian/tmp/DEBIAN ./
    apprentice@host:~/icaclient/i386$ find -type f -exec file {} \;|grep ELF|grep executable|awk -F: '{print $1}' >debian/binaries
    apprentice@host:~/icaclient/i386$ dpkg-shlibdeps -S. --ignore-missing-info -l./opt/Citrix/ICAClient -l./opt/Citrix/ICAClient/lib -l./opt/Citrix/ICAClient/util $(cat debian/binaries)

    Initially, this will fail with error messages saying that libwhatever.so.<n> cannot be found. So use apt-file search libwhatever.so.<n> to look up the package that contains it, install that package, and retry. This is usually done automatically when a package is being built from source, but there is no source here.

    When dpkg-shlibdeps finally stopped complaining, it gave me (in debian/substvars):

    shlibs:Depends=libatk1.0-0 (>= 1.12.4), libc6 (>= 2.3.6-6~), libc6 (>= 2.11), libcairo2 (>= 1.2.4), libfontconfig1 (>= 2.9.0), libfreetype6 (>= 2.2.1), libgcc1 (>= 1:4.1.1), libgdk-pixbuf2.0-0 (>= 2.22.0), libglib2.0-0 (>= 2.14.0), libgstreamer-plugins-base0.10-0 (>= 0.10.23), libgstreamer0.10-0 (>= 0.10.24), libgtk2.0-0 (>= 2.24.0), libpango-1.0-0 (>= 1.14.0), libpangocairo-1.0-0 (>= 1.14.0), libpangoft2-1.0-0 (>= 1.14.0), libpng12-0 (>= 1.2.13-4), libstdc++6 (>= 4.4.0), libx11-6, libxaw7, libxerces-c3.1, libxext6, libxinerama1, libxml2 (>= 2.7.4), libxmu6, libxrender1, libxt6

    Those version numbers are just the versions of packages on the machine we're working at. If we remove them, the package may run on more versions of Ubuntu, and the danger of having the wrong libraries doesn't increase much beyond the danger that was already there anyway because the dynamic linker is going to find different version of libraries than the executables were linked against.

  4. Instead of running dpkg-shlibdeps on all binaries in the package, you might as well assume that only wfica is used, and run dpkg-shlibdeps only on that. This gives a much shorter list of packages (which is also in my script, commented out). The Receiver ran fine during some limited tests with that shorter list on an otherwise reasonably complete Ubuntu Trusty.

All in all, I still don't know how the libwebkit dependency in the original package should be detected from the binaries. There are other libraries dpkg-shlibdeps says are uselessly linked against, but libwebkit* isn't listed. I can't even find it with ldd $(find -type f -exec file {} \; |grep ELF|awk -F: '{print $1}')|grep webkit

When I open the configuration for our virtual Windows site from a browser, all I get is the HTML5 interface. I think it would be best to split the package into several, and to use proper dependencies for each. But I will not spend more time on this with Citrix just spending time on more profitable endeavours.